From 3824d8fed4d7a2b6d5eeb7bc3acce5195792176b Mon Sep 17 00:00:00 2001 From: kafeikui Date: Sat, 21 Jun 2025 23:04:57 +0800 Subject: [PATCH 01/11] change block_time in config to milliseconds --- crates/arpa-node/conf/config.yml | 4 ++-- .../src/subscriber/randomness_signature_aggregation.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/arpa-node/conf/config.yml b/crates/arpa-node/conf/config.yml index 48e81190..90b89d17 100644 --- a/crates/arpa-node/conf/config.yml +++ b/crates/arpa-node/conf/config.yml @@ -76,7 +76,7 @@ listeners: use_jitter: true time_limits: - block_time: 3 + block_time: 3000 dkg_timeout_duration: 40 randomness_task_exclusive_window: 10 listener_interval_millis: 10000 @@ -126,7 +126,7 @@ relayed_chains: interval_millis: 1000 use_jitter: true time_limits: - block_time: 2 + block_time: 2000 randomness_task_exclusive_window: 10 listener_interval_millis: 1000 provider_polling_interval_millis: 1000 diff --git a/crates/arpa-node/src/subscriber/randomness_signature_aggregation.rs b/crates/arpa-node/src/subscriber/randomness_signature_aggregation.rs index e590b7da..d8c483db 100644 --- a/crates/arpa-node/src/subscriber/randomness_signature_aggregation.rs +++ b/crates/arpa-node/src/subscriber/randomness_signature_aggregation.rs @@ -118,7 +118,7 @@ impl FulfillRandomnessHandler for GeneralFulfillRandomnessHandler if client.is_task_pending(&randomness_task_request_id).await? { if self.block_cache.read().await.get_block_height() - randomness_task.assignment_block_height - > 86400 / self.block_cache.read().await.get_block_time() + > 86400 * 1000 / self.block_cache.read().await.get_block_time() { self.randomness_signature_cache .write() From 5ed7054fc13907d8e521714a0a5623acd7076de9 Mon Sep 17 00:00:00 2001 From: kafeikui Date: Sat, 21 Jun 2025 23:20:44 +0800 Subject: [PATCH 02/11] add randomness_aggregation_waiting_block_number --- crates/arpa-node/conf/config.yml | 2 ++ crates/arpa-node/src/context/chain/types.rs | 8 ++++++++ .../src/listener/randomness_signature_aggregation.rs | 10 +++++++++- crates/core/src/types/config.rs | 9 +++++++++ crates/dal/sqlite/src/result/b3.rs | 6 +++++- crates/dal/sqlite/src/result/base.rs | 6 +++++- crates/dal/sqlite/src/result/loot.rs | 6 +++++- crates/dal/sqlite/src/result/main.rs | 6 +++++- crates/dal/sqlite/src/result/op.rs | 6 +++++- crates/dal/sqlite/src/result/redstone.rs | 6 +++++- crates/dal/sqlite/src/result/taiko.rs | 6 +++++- crates/dal/src/cache.rs | 4 +++- 12 files changed, 66 insertions(+), 9 deletions(-) diff --git a/crates/arpa-node/conf/config.yml b/crates/arpa-node/conf/config.yml index 90b89d17..64b6a9f0 100644 --- a/crates/arpa-node/conf/config.yml +++ b/crates/arpa-node/conf/config.yml @@ -79,6 +79,7 @@ time_limits: block_time: 3000 dkg_timeout_duration: 40 randomness_task_exclusive_window: 10 + randomness_aggregation_waiting_block_number: 0 listener_interval_millis: 10000 dkg_wait_for_phase_interval_millis: 10000 provider_polling_interval_millis: 10000 @@ -128,6 +129,7 @@ relayed_chains: time_limits: block_time: 2000 randomness_task_exclusive_window: 10 + randomness_aggregation_waiting_block_number: 0 listener_interval_millis: 1000 provider_polling_interval_millis: 1000 provider_reconnection_interval_millis: 30000 diff --git a/crates/arpa-node/src/context/chain/types.rs b/crates/arpa-node/src/context/chain/types.rs index 4199cd70..21bcac66 100644 --- a/crates/arpa-node/src/context/chain/types.rs +++ b/crates/arpa-node/src/context/chain/types.rs @@ -278,10 +278,14 @@ where ListenerType::RandomnessSignatureAggregation => { let id_address = self.get_node_cache().read().await.get_id_address().unwrap(); + let randomness_aggregation_waiting_block_number = + self.time_limits.randomness_aggregation_waiting_block_number; + let p_randomness_signature_aggregation = RandomnessSignatureAggregationListener::new( listener, id_address, + randomness_aggregation_waiting_block_number, self.get_block_cache(), self.get_group_cache(), self.get_randomness_result_cache(), @@ -700,10 +704,14 @@ where ListenerType::RandomnessSignatureAggregation => { let id_address = self.get_node_cache().read().await.get_id_address().unwrap(); + let randomness_aggregation_waiting_block_number = + self.time_limits.randomness_aggregation_waiting_block_number; + let p_randomness_signature_aggregation = RandomnessSignatureAggregationListener::new( listener, id_address, + randomness_aggregation_waiting_block_number, self.get_block_cache(), self.get_group_cache(), self.get_randomness_result_cache(), diff --git a/crates/arpa-node/src/listener/randomness_signature_aggregation.rs b/crates/arpa-node/src/listener/randomness_signature_aggregation.rs index fd381d1f..72aadfe1 100644 --- a/crates/arpa-node/src/listener/randomness_signature_aggregation.rs +++ b/crates/arpa-node/src/listener/randomness_signature_aggregation.rs @@ -17,6 +17,7 @@ use tokio::sync::RwLock; pub struct RandomnessSignatureAggregationListener { listener_descriptor: ListenerDescriptor, id_address: Address, + randomness_aggregation_waiting_block_number: usize, block_cache: Arc>>, group_cache: Arc>>>, randomness_signature_cache: @@ -35,6 +36,7 @@ impl RandomnessSignatureAggregationListener { pub fn new( listener_descriptor: ListenerDescriptor, id_address: Address, + randomness_aggregation_waiting_block_number: usize, block_cache: Arc>>, group_cache: Arc>>>, randomness_signature_cache: Arc< @@ -45,6 +47,7 @@ impl RandomnessSignatureAggregationListener { RandomnessSignatureAggregationListener { listener_descriptor, id_address, + randomness_aggregation_waiting_block_number, block_cache, group_cache, randomness_signature_cache, @@ -75,7 +78,10 @@ impl Listener for RandomnessSignatureAggregationListene .randomness_signature_cache .write() .await - .get_ready_to_commit_signatures(current_block_height) + .get_ready_to_commit_signatures( + current_block_height, + self.randomness_aggregation_waiting_block_number, + ) .await?; if !ready_signatures.is_empty() { @@ -371,6 +377,7 @@ mod tests { .read() .await .get_id_address(); + let randomness_aggregation_waiting_block_number = 0; let block_cache = context.get_main_chain().get_block_cache(); let group_cache = context.get_main_chain().get_group_cache(); let randomness_signature_cache = context.get_main_chain().get_randomness_result_cache(); @@ -391,6 +398,7 @@ mod tests { RandomnessSignatureAggregationListener::::new( listener_descriptor, id_address, + randomness_aggregation_waiting_block_number, block_cache, group_cache, randomness_signature_cache, diff --git a/crates/core/src/types/config.rs b/crates/core/src/types/config.rs index 076e7918..c1d6a85a 100644 --- a/crates/core/src/types/config.rs +++ b/crates/core/src/types/config.rs @@ -345,6 +345,7 @@ pub struct TimeLimitDescriptorHolder { pub dkg_wait_for_phase_interval_millis: Option, pub dkg_timeout_duration: Option, pub randomness_task_exclusive_window: usize, + pub randomness_aggregation_waiting_block_number: Option, pub provider_polling_interval_millis: u64, pub provider_reconnection_interval_millis: Option, pub provider_reset_descriptor: FixedIntervalRetryDescriptor, @@ -360,6 +361,7 @@ pub struct TimeLimitDescriptor { pub dkg_wait_for_phase_interval_millis: u64, pub dkg_timeout_duration: usize, pub randomness_task_exclusive_window: usize, + pub randomness_aggregation_waiting_block_number: usize, pub provider_polling_interval_millis: u64, pub provider_reconnection_interval_millis: u64, pub provider_reset_descriptor: FixedIntervalRetryDescriptor, @@ -376,6 +378,7 @@ impl Default for TimeLimitDescriptor { dkg_wait_for_phase_interval_millis: DEFAULT_DKG_WAIT_FOR_PHASE_INTERVAL_MILLIS, dkg_timeout_duration: DEFAULT_DKG_TIMEOUT_DURATION, randomness_task_exclusive_window: DEFAULT_RANDOMNESS_TASK_EXCLUSIVE_WINDOW, + randomness_aggregation_waiting_block_number: 0, provider_polling_interval_millis: DEFAULT_PROVIDER_POLLING_INTERVAL_MILLIS, provider_reconnection_interval_millis: DEFAULT_PROVIDER_RECONNECTION_INTERVAL_MILLIS, provider_reset_descriptor: FixedIntervalRetryDescriptor { @@ -432,6 +435,11 @@ impl From for TimeLimitDescriptor { } else { time_limit_descriptor_holder.randomness_task_exclusive_window }; + let randomness_aggregation_waiting_block_number = + match time_limit_descriptor_holder.randomness_aggregation_waiting_block_number { + None => 0, + Some(v) => v, + }; let provider_polling_interval_millis = if time_limit_descriptor_holder.provider_polling_interval_millis == 0 { DEFAULT_PROVIDER_POLLING_INTERVAL_MILLIS @@ -457,6 +465,7 @@ impl From for TimeLimitDescriptor { dkg_wait_for_phase_interval_millis, dkg_timeout_duration, randomness_task_exclusive_window, + randomness_aggregation_waiting_block_number, provider_polling_interval_millis, provider_reconnection_interval_millis, provider_reset_descriptor, diff --git a/crates/dal/sqlite/src/result/b3.rs b/crates/dal/sqlite/src/result/b3.rs index 0fd5e47e..0d336f5a 100644 --- a/crates/dal/sqlite/src/result/b3.rs +++ b/crates/dal/sqlite/src/result/b3.rs @@ -143,10 +143,14 @@ impl SignatureResultCacheUpdater async fn get_ready_to_commit_signatures( &mut self, current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, ) -> DataAccessResult> { let ready_to_commit_signatures = self .signature_results_cache - .get_ready_to_commit_signatures(current_block_height) + .get_ready_to_commit_signatures( + current_block_height, + randomness_aggregation_waiting_block_number, + ) .await?; if ready_to_commit_signatures.is_empty() { diff --git a/crates/dal/sqlite/src/result/base.rs b/crates/dal/sqlite/src/result/base.rs index d1cd0ada..fdf29492 100644 --- a/crates/dal/sqlite/src/result/base.rs +++ b/crates/dal/sqlite/src/result/base.rs @@ -148,10 +148,14 @@ impl SignatureResultCacheUpdater async fn get_ready_to_commit_signatures( &mut self, current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, ) -> DataAccessResult> { let ready_to_commit_signatures = self .signature_results_cache - .get_ready_to_commit_signatures(current_block_height) + .get_ready_to_commit_signatures( + current_block_height, + randomness_aggregation_waiting_block_number, + ) .await?; if ready_to_commit_signatures.is_empty() { diff --git a/crates/dal/sqlite/src/result/loot.rs b/crates/dal/sqlite/src/result/loot.rs index a8169248..8826998f 100644 --- a/crates/dal/sqlite/src/result/loot.rs +++ b/crates/dal/sqlite/src/result/loot.rs @@ -147,10 +147,14 @@ impl SignatureResultCacheUpdater async fn get_ready_to_commit_signatures( &mut self, current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, ) -> DataAccessResult> { let ready_to_commit_signatures = self .signature_results_cache - .get_ready_to_commit_signatures(current_block_height) + .get_ready_to_commit_signatures( + current_block_height, + randomness_aggregation_waiting_block_number, + ) .await?; if ready_to_commit_signatures.is_empty() { diff --git a/crates/dal/sqlite/src/result/main.rs b/crates/dal/sqlite/src/result/main.rs index 6400fd07..4356d7c1 100644 --- a/crates/dal/sqlite/src/result/main.rs +++ b/crates/dal/sqlite/src/result/main.rs @@ -138,10 +138,14 @@ impl SignatureResultCacheUpdater async fn get_ready_to_commit_signatures( &mut self, current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, ) -> DataAccessResult> { let ready_to_commit_signatures = self .signature_results_cache - .get_ready_to_commit_signatures(current_block_height) + .get_ready_to_commit_signatures( + current_block_height, + randomness_aggregation_waiting_block_number, + ) .await?; if ready_to_commit_signatures.is_empty() { diff --git a/crates/dal/sqlite/src/result/op.rs b/crates/dal/sqlite/src/result/op.rs index 2dda2ad6..3c9c2690 100644 --- a/crates/dal/sqlite/src/result/op.rs +++ b/crates/dal/sqlite/src/result/op.rs @@ -143,10 +143,14 @@ impl SignatureResultCacheUpdater async fn get_ready_to_commit_signatures( &mut self, current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, ) -> DataAccessResult> { let ready_to_commit_signatures = self .signature_results_cache - .get_ready_to_commit_signatures(current_block_height) + .get_ready_to_commit_signatures( + current_block_height, + randomness_aggregation_waiting_block_number, + ) .await?; if ready_to_commit_signatures.is_empty() { diff --git a/crates/dal/sqlite/src/result/redstone.rs b/crates/dal/sqlite/src/result/redstone.rs index a41b7c19..cf2bbe3f 100644 --- a/crates/dal/sqlite/src/result/redstone.rs +++ b/crates/dal/sqlite/src/result/redstone.rs @@ -149,10 +149,14 @@ impl SignatureResultCacheUpdater async fn get_ready_to_commit_signatures( &mut self, current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, ) -> DataAccessResult> { let ready_to_commit_signatures = self .signature_results_cache - .get_ready_to_commit_signatures(current_block_height) + .get_ready_to_commit_signatures( + current_block_height, + randomness_aggregation_waiting_block_number, + ) .await?; if ready_to_commit_signatures.is_empty() { diff --git a/crates/dal/sqlite/src/result/taiko.rs b/crates/dal/sqlite/src/result/taiko.rs index fe688c91..4913cf89 100644 --- a/crates/dal/sqlite/src/result/taiko.rs +++ b/crates/dal/sqlite/src/result/taiko.rs @@ -149,10 +149,14 @@ impl SignatureResultCacheUpdater async fn get_ready_to_commit_signatures( &mut self, current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, ) -> DataAccessResult> { let ready_to_commit_signatures = self .signature_results_cache - .get_ready_to_commit_signatures(current_block_height) + .get_ready_to_commit_signatures( + current_block_height, + randomness_aggregation_waiting_block_number, + ) .await?; if ready_to_commit_signatures.is_empty() { diff --git a/crates/dal/src/cache.rs b/crates/dal/src/cache.rs index d8c48fea..0490b3ee 100644 --- a/crates/dal/src/cache.rs +++ b/crates/dal/src/cache.rs @@ -811,6 +811,7 @@ impl SignatureResultCacheUpdater async fn get_ready_to_commit_signatures( &mut self, current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, ) -> DataAccessResult> { let ready_to_commit_signatures = self .signature_result_caches @@ -818,7 +819,8 @@ impl SignatureResultCacheUpdater .filter(|v| { ((current_block_height + 1) >= v.result_cache.randomness_task.assignment_block_height - + v.result_cache.randomness_task.request_confirmations as usize) + + v.result_cache.randomness_task.request_confirmations as usize + + randomness_aggregation_waiting_block_number) && v.state == BLSResultCacheState::NotCommitted && v.result_cache.partial_signatures.len() >= v.result_cache.threshold }) From 91324c82a56b90e53dc2b0870331d47a4939dd2e Mon Sep 17 00:00:00 2001 From: kafeikui Date: Sat, 21 Jun 2025 23:43:59 +0800 Subject: [PATCH 03/11] support arpachain and bsc --- crates/core/src/utils/mod.rs | 2 + .../entities/arpa_chain_randomness_result.rs | 26 + .../entities/arpa_chain_randomness_task.rs | 33 ++ .../src/entities/bsc_randomness_result.rs | 26 + .../src/entities/bsc_randomness_task.rs | 33 ++ crates/dal/sqlite/entity/src/entities/mod.rs | 4 + .../dal/sqlite/entity/src/entities/prelude.rs | 4 + crates/dal/sqlite/migration/src/lib.rs | 20 + ..._create_arpachain_randomness_task_table.rs | 124 +++++ ..._create_arpachain_randomness_task_index.rs | 68 +++ ...reate_arpachain_randomness_result_table.rs | 95 ++++ ...reate_arpachain_randomness_result_index.rs | 68 +++ ...000037_create_bsc_randomness_task_table.rs | 120 +++++ ...000038_create_bsc_randomness_task_index.rs | 68 +++ ...0039_create_bsc_randomness_result_table.rs | 91 ++++ ...0040_create_bsc_randomness_result_index.rs | 64 +++ crates/dal/sqlite/src/lib.rs | 24 + crates/dal/sqlite/src/result/arpa_chain.rs | 481 ++++++++++++++++++ crates/dal/sqlite/src/result/bsc.rs | 458 +++++++++++++++++ crates/dal/sqlite/src/result/mod.rs | 4 + crates/dal/sqlite/src/task/arpa_chain.rs | 206 ++++++++ crates/dal/sqlite/src/task/bsc.rs | 205 ++++++++ crates/dal/sqlite/src/task/mod.rs | 4 + crates/dal/sqlite/src/types.rs | 36 ++ crates/dal/src/lib.rs | 1 + 25 files changed, 2265 insertions(+) create mode 100644 crates/dal/sqlite/entity/src/entities/arpa_chain_randomness_result.rs create mode 100644 crates/dal/sqlite/entity/src/entities/arpa_chain_randomness_task.rs create mode 100644 crates/dal/sqlite/entity/src/entities/bsc_randomness_result.rs create mode 100644 crates/dal/sqlite/entity/src/entities/bsc_randomness_task.rs create mode 100644 crates/dal/sqlite/migration/src/m20250621_000033_create_arpachain_randomness_task_table.rs create mode 100644 crates/dal/sqlite/migration/src/m20250621_000034_create_arpachain_randomness_task_index.rs create mode 100644 crates/dal/sqlite/migration/src/m20250621_000035_create_arpachain_randomness_result_table.rs create mode 100644 crates/dal/sqlite/migration/src/m20250621_000036_create_arpachain_randomness_result_index.rs create mode 100644 crates/dal/sqlite/migration/src/m20250621_000037_create_bsc_randomness_task_table.rs create mode 100644 crates/dal/sqlite/migration/src/m20250621_000038_create_bsc_randomness_task_index.rs create mode 100644 crates/dal/sqlite/migration/src/m20250621_000039_create_bsc_randomness_result_table.rs create mode 100644 crates/dal/sqlite/migration/src/m20250621_000040_create_bsc_randomness_result_index.rs create mode 100644 crates/dal/sqlite/src/result/arpa_chain.rs create mode 100644 crates/dal/sqlite/src/result/bsc.rs create mode 100644 crates/dal/sqlite/src/task/arpa_chain.rs create mode 100644 crates/dal/sqlite/src/task/bsc.rs diff --git a/crates/core/src/utils/mod.rs b/crates/core/src/utils/mod.rs index 933cd381..05c1df16 100644 --- a/crates/core/src/utils/mod.rs +++ b/crates/core/src/utils/mod.rs @@ -24,6 +24,8 @@ pub const TAIKO_HEKLA_TESTNET_CHAIN_ID: usize = 167009; pub const TAIKO_MAINNET_CHAIN_ID: usize = 167000; pub const B3_MAINNET_CHAIN_ID: usize = 8333; pub const B3_TESTNET_CHAIN_ID: usize = 1993; +pub const BSC_MAINNET_CHAIN_ID: usize = 56; +pub const ARPA_CHAIN_ID: usize = 4224; pub fn supports_eip1559(chain_id: usize) -> bool { chain_id != LOOT_MAINNET_CHAIN_ID && chain_id != LOOT_TESTNET_CHAIN_ID diff --git a/crates/dal/sqlite/entity/src/entities/arpa_chain_randomness_result.rs b/crates/dal/sqlite/entity/src/entities/arpa_chain_randomness_result.rs new file mode 100644 index 00000000..8631e9a3 --- /dev/null +++ b/crates/dal/sqlite/entity/src/entities/arpa_chain_randomness_result.rs @@ -0,0 +1,26 @@ +//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3 + +use sea_orm::entity::prelude::*; + +#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] +#[sea_orm(table_name = "arpa_chain_randomness_result")] +pub struct Model { + #[sea_orm(primary_key, auto_increment = false)] + pub id: i32, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub request_id: Vec, + pub group_index: i32, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub message: Vec, + pub threshold: i32, + pub partial_signatures: String, + pub committed_times: i32, + pub state: i32, + pub create_at: String, + pub update_at: String, +} + +#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] +pub enum Relation {} + +impl ActiveModelBehavior for ActiveModel {} diff --git a/crates/dal/sqlite/entity/src/entities/arpa_chain_randomness_task.rs b/crates/dal/sqlite/entity/src/entities/arpa_chain_randomness_task.rs new file mode 100644 index 00000000..00310494 --- /dev/null +++ b/crates/dal/sqlite/entity/src/entities/arpa_chain_randomness_task.rs @@ -0,0 +1,33 @@ +//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3 + +use sea_orm::entity::prelude::*; + +#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] +#[sea_orm(table_name = "arpa_chain_randomness_task")] +pub struct Model { + #[sea_orm(primary_key, auto_increment = false)] + pub id: i32, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub request_id: Vec, + pub subscription_id: i64, + pub group_index: i32, + pub request_type: i32, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub params: Vec, + pub requester: String, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub seed: Vec, + pub request_confirmations: i32, + pub callback_gas_limit: i32, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub callback_max_gas_price: Vec, + pub assignment_block_height: i64, + pub state: i32, + pub create_at: String, + pub update_at: String, +} + +#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] +pub enum Relation {} + +impl ActiveModelBehavior for ActiveModel {} diff --git a/crates/dal/sqlite/entity/src/entities/bsc_randomness_result.rs b/crates/dal/sqlite/entity/src/entities/bsc_randomness_result.rs new file mode 100644 index 00000000..8b4d9a2f --- /dev/null +++ b/crates/dal/sqlite/entity/src/entities/bsc_randomness_result.rs @@ -0,0 +1,26 @@ +//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3 + +use sea_orm::entity::prelude::*; + +#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] +#[sea_orm(table_name = "bsc_randomness_result")] +pub struct Model { + #[sea_orm(primary_key, auto_increment = false)] + pub id: i32, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub request_id: Vec, + pub group_index: i32, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub message: Vec, + pub threshold: i32, + pub partial_signatures: String, + pub committed_times: i32, + pub state: i32, + pub create_at: String, + pub update_at: String, +} + +#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] +pub enum Relation {} + +impl ActiveModelBehavior for ActiveModel {} diff --git a/crates/dal/sqlite/entity/src/entities/bsc_randomness_task.rs b/crates/dal/sqlite/entity/src/entities/bsc_randomness_task.rs new file mode 100644 index 00000000..6cbe4e7f --- /dev/null +++ b/crates/dal/sqlite/entity/src/entities/bsc_randomness_task.rs @@ -0,0 +1,33 @@ +//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3 + +use sea_orm::entity::prelude::*; + +#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] +#[sea_orm(table_name = "bsc_randomness_task")] +pub struct Model { + #[sea_orm(primary_key, auto_increment = false)] + pub id: i32, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub request_id: Vec, + pub subscription_id: i64, + pub group_index: i32, + pub request_type: i32, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub params: Vec, + pub requester: String, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub seed: Vec, + pub request_confirmations: i32, + pub callback_gas_limit: i32, + #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] + pub callback_max_gas_price: Vec, + pub assignment_block_height: i64, + pub state: i32, + pub create_at: String, + pub update_at: String, +} + +#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] +pub enum Relation {} + +impl ActiveModelBehavior for ActiveModel {} diff --git a/crates/dal/sqlite/entity/src/entities/mod.rs b/crates/dal/sqlite/entity/src/entities/mod.rs index 85f957f3..34943d34 100644 --- a/crates/dal/sqlite/entity/src/entities/mod.rs +++ b/crates/dal/sqlite/entity/src/entities/mod.rs @@ -2,10 +2,14 @@ pub mod prelude; +pub mod arpa_chain_randomness_result; +pub mod arpa_chain_randomness_task; pub mod b3_randomness_result; pub mod b3_randomness_task; pub mod base_randomness_result; pub mod base_randomness_task; +pub mod bsc_randomness_result; +pub mod bsc_randomness_task; pub mod group_info; pub mod loot_randomness_result; pub mod loot_randomness_task; diff --git a/crates/dal/sqlite/entity/src/entities/prelude.rs b/crates/dal/sqlite/entity/src/entities/prelude.rs index 7782f19a..e14da9f0 100644 --- a/crates/dal/sqlite/entity/src/entities/prelude.rs +++ b/crates/dal/sqlite/entity/src/entities/prelude.rs @@ -1,9 +1,13 @@ //! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3 +pub use super::arpa_chain_randomness_result::Entity as ArpaChainRandomnessResult; +pub use super::arpa_chain_randomness_task::Entity as ArpaChainRandomnessTask; pub use super::b3_randomness_result::Entity as B3RandomnessResult; pub use super::b3_randomness_task::Entity as B3RandomnessTask; pub use super::base_randomness_result::Entity as BaseRandomnessResult; pub use super::base_randomness_task::Entity as BaseRandomnessTask; +pub use super::bsc_randomness_result::Entity as BscRandomnessResult; +pub use super::bsc_randomness_task::Entity as BscRandomnessTask; pub use super::group_info::Entity as GroupInfo; pub use super::loot_randomness_result::Entity as LootRandomnessResult; pub use super::loot_randomness_task::Entity as LootRandomnessTask; diff --git a/crates/dal/sqlite/migration/src/lib.rs b/crates/dal/sqlite/migration/src/lib.rs index 7838cad0..a93230e6 100644 --- a/crates/dal/sqlite/migration/src/lib.rs +++ b/crates/dal/sqlite/migration/src/lib.rs @@ -32,6 +32,14 @@ mod m20250506_000029_create_b3_randomness_task_table; mod m20250506_000030_create_b3_randomness_task_index; mod m20250506_000031_create_b3_randomness_result_table; mod m20250506_000032_create_b3_randomness_result_index; +mod m20250621_000033_create_arpachain_randomness_task_table; +mod m20250621_000034_create_arpachain_randomness_task_index; +mod m20250621_000035_create_arpachain_randomness_result_table; +mod m20250621_000036_create_arpachain_randomness_result_index; +mod m20250621_000037_create_bsc_randomness_task_table; +mod m20250621_000038_create_bsc_randomness_task_index; +mod m20250621_000039_create_bsc_randomness_result_table; +mod m20250621_000040_create_bsc_randomness_result_index; pub use m20220920_000001_create_node_info_table::NodeInfo; pub use m20220920_000002_create_group_info_table::GroupInfo; @@ -51,6 +59,10 @@ pub use m20240318_000025_create_taiko_randomness_task_table::TaikoRandomnessTask pub use m20240318_000027_create_taiko_randomness_result_table::TaikoRandomnessResult; pub use m20250506_000029_create_b3_randomness_task_table::B3RandomnessTask; pub use m20250506_000031_create_b3_randomness_result_table::B3RandomnessResult; +pub use m20250621_000033_create_arpachain_randomness_task_table::ArpaChainRandomnessTask; +pub use m20250621_000035_create_arpachain_randomness_result_table::ArpaChainRandomnessResult; +pub use m20250621_000037_create_bsc_randomness_task_table::BSCRandomnessTask; +pub use m20250621_000039_create_bsc_randomness_result_table::BSCRandomnessResult; pub struct Migrator; #[async_trait::async_trait] @@ -89,6 +101,14 @@ impl MigratorTrait for Migrator { Box::new(m20250506_000030_create_b3_randomness_task_index::Migration), Box::new(m20250506_000031_create_b3_randomness_result_table::Migration), Box::new(m20250506_000032_create_b3_randomness_result_index::Migration), + Box::new(m20250621_000033_create_arpachain_randomness_task_table::Migration), + Box::new(m20250621_000034_create_arpachain_randomness_task_index::Migration), + Box::new(m20250621_000035_create_arpachain_randomness_result_table::Migration), + Box::new(m20250621_000036_create_arpachain_randomness_result_index::Migration), + Box::new(m20250621_000037_create_bsc_randomness_task_table::Migration), + Box::new(m20250621_000038_create_bsc_randomness_task_index::Migration), + Box::new(m20250621_000039_create_bsc_randomness_result_table::Migration), + Box::new(m20250621_000040_create_bsc_randomness_result_index::Migration), ] } } diff --git a/crates/dal/sqlite/migration/src/m20250621_000033_create_arpachain_randomness_task_table.rs b/crates/dal/sqlite/migration/src/m20250621_000033_create_arpachain_randomness_task_table.rs new file mode 100644 index 00000000..a9c6c2ab --- /dev/null +++ b/crates/dal/sqlite/migration/src/m20250621_000033_create_arpachain_randomness_task_table.rs @@ -0,0 +1,124 @@ +use sea_orm_migration::prelude::*; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .create_table( + Table::create() + .table(ArpaChainRandomnessTask::Table) + .if_not_exists() + .col( + ColumnDef::new(ArpaChainRandomnessTask::Id) + .integer() + .not_null() + .primary_key(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::RequestId) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::SubscriptionId) + .big_unsigned() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::GroupIndex) + .unsigned() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::RequestType) + .tiny_unsigned() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::Params) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::Requester) + .text() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::Seed) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::RequestConfirmations) + .unsigned() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::CallbackGasLimit) + .unsigned() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::CallbackMaxGasPrice) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::AssignmentBlockHeight) + .big_unsigned() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::State) + .tiny_unsigned() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::CreateAt) + .date_time() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessTask::UpdateAt) + .date_time() + .not_null(), + ) + .to_owned(), + ) + .await + } + + async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .drop_table( + Table::drop() + .table(ArpaChainRandomnessTask::Table) + .to_owned(), + ) + .await + } +} + +#[derive(Iden)] +pub enum ArpaChainRandomnessTask { + Table, + Id, + RequestId, + SubscriptionId, + GroupIndex, + RequestType, + Params, + Requester, + Seed, + RequestConfirmations, + CallbackGasLimit, + CallbackMaxGasPrice, + AssignmentBlockHeight, + State, + CreateAt, + UpdateAt, +} diff --git a/crates/dal/sqlite/migration/src/m20250621_000034_create_arpachain_randomness_task_index.rs b/crates/dal/sqlite/migration/src/m20250621_000034_create_arpachain_randomness_task_index.rs new file mode 100644 index 00000000..2c391862 --- /dev/null +++ b/crates/dal/sqlite/migration/src/m20250621_000034_create_arpachain_randomness_task_index.rs @@ -0,0 +1,68 @@ +use sea_orm_migration::prelude::*; + +use crate::m20250621_000033_create_arpachain_randomness_task_table::ArpaChainRandomnessTask; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .create_index( + Index::create() + .table(ArpaChainRandomnessTask::Table) + .name("arpachain_randomness_task_request_id") + .col(ArpaChainRandomnessTask::RequestId) + .unique() + .to_owned(), + ) + .await?; + + manager + .create_index( + Index::create() + .table(ArpaChainRandomnessTask::Table) + .name("arpachain_randomness_task_group_index") + .col(ArpaChainRandomnessTask::GroupIndex) + .to_owned(), + ) + .await?; + + manager + .create_index( + Index::create() + .table(ArpaChainRandomnessTask::Table) + .name("arpachain_randomness_task_assignment_block_height") + .col(ArpaChainRandomnessTask::AssignmentBlockHeight) + .to_owned(), + ) + .await + } + + async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .drop_index( + Index::drop() + .name("arpachain_randomness_task_request_id") + .to_owned(), + ) + .await?; + + manager + .drop_index( + Index::drop() + .name("arpachain_randomness_task_group_index") + .to_owned(), + ) + .await?; + + manager + .drop_index( + Index::drop() + .name("arpachain_randomness_task_assignment_block_height") + .to_owned(), + ) + .await + } +} diff --git a/crates/dal/sqlite/migration/src/m20250621_000035_create_arpachain_randomness_result_table.rs b/crates/dal/sqlite/migration/src/m20250621_000035_create_arpachain_randomness_result_table.rs new file mode 100644 index 00000000..d108e7a4 --- /dev/null +++ b/crates/dal/sqlite/migration/src/m20250621_000035_create_arpachain_randomness_result_table.rs @@ -0,0 +1,95 @@ +use sea_orm_migration::prelude::*; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .create_table( + Table::create() + .table(ArpaChainRandomnessResult::Table) + .if_not_exists() + .col( + ColumnDef::new(ArpaChainRandomnessResult::Id) + .integer() + .not_null() + .primary_key(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessResult::RequestId) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessResult::GroupIndex) + .unsigned() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessResult::Message) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessResult::Threshold) + .integer() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessResult::PartialSignatures) + .text() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessResult::CommittedTimes) + .integer() + .not_null() + .default(0), + ) + .col( + ColumnDef::new(ArpaChainRandomnessResult::State) + .tiny_unsigned() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessResult::CreateAt) + .date_time() + .not_null(), + ) + .col( + ColumnDef::new(ArpaChainRandomnessResult::UpdateAt) + .date_time() + .not_null(), + ) + .to_owned(), + ) + .await + } + + async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .drop_table( + Table::drop() + .table(ArpaChainRandomnessResult::Table) + .to_owned(), + ) + .await + } +} + +#[derive(Iden)] +pub enum ArpaChainRandomnessResult { + Table, + Id, + RequestId, + GroupIndex, + Message, + Threshold, + PartialSignatures, + CommittedTimes, + State, + CreateAt, + UpdateAt, +} diff --git a/crates/dal/sqlite/migration/src/m20250621_000036_create_arpachain_randomness_result_index.rs b/crates/dal/sqlite/migration/src/m20250621_000036_create_arpachain_randomness_result_index.rs new file mode 100644 index 00000000..51d34149 --- /dev/null +++ b/crates/dal/sqlite/migration/src/m20250621_000036_create_arpachain_randomness_result_index.rs @@ -0,0 +1,68 @@ +use sea_orm_migration::prelude::*; + +use crate::m20250621_000035_create_arpachain_randomness_result_table::ArpaChainRandomnessResult; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .create_index( + Index::create() + .table(ArpaChainRandomnessResult::Table) + .name("arpachain_randomness_result_request_id") + .col(ArpaChainRandomnessResult::RequestId) + .unique() + .to_owned(), + ) + .await?; + + manager + .create_index( + Index::create() + .table(ArpaChainRandomnessResult::Table) + .name("arpachain_randomness_result_group_index") + .col(ArpaChainRandomnessResult::GroupIndex) + .to_owned(), + ) + .await?; + + manager + .create_index( + Index::create() + .table(ArpaChainRandomnessResult::Table) + .name("arpachain_randomness_result_state") + .col(ArpaChainRandomnessResult::State) + .to_owned(), + ) + .await + } + + async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .drop_index( + Index::drop() + .name("arpachain_randomness_result_request_id") + .to_owned(), + ) + .await?; + + manager + .drop_index( + Index::drop() + .name("arpachain_randomness_result_group_index") + .to_owned(), + ) + .await?; + + manager + .drop_index( + Index::drop() + .name("arpachain_randomness_result_state") + .to_owned(), + ) + .await + } +} diff --git a/crates/dal/sqlite/migration/src/m20250621_000037_create_bsc_randomness_task_table.rs b/crates/dal/sqlite/migration/src/m20250621_000037_create_bsc_randomness_task_table.rs new file mode 100644 index 00000000..49a416b2 --- /dev/null +++ b/crates/dal/sqlite/migration/src/m20250621_000037_create_bsc_randomness_task_table.rs @@ -0,0 +1,120 @@ +use sea_orm_migration::prelude::*; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .create_table( + Table::create() + .table(BSCRandomnessTask::Table) + .if_not_exists() + .col( + ColumnDef::new(BSCRandomnessTask::Id) + .integer() + .not_null() + .primary_key(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::RequestId) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::SubscriptionId) + .big_unsigned() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::GroupIndex) + .unsigned() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::RequestType) + .tiny_unsigned() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::Params) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::Requester) + .text() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::Seed) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::RequestConfirmations) + .unsigned() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::CallbackGasLimit) + .unsigned() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::CallbackMaxGasPrice) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::AssignmentBlockHeight) + .big_unsigned() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::State) + .tiny_unsigned() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::CreateAt) + .date_time() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessTask::UpdateAt) + .date_time() + .not_null(), + ) + .to_owned(), + ) + .await + } + + async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .drop_table(Table::drop().table(BSCRandomnessTask::Table).to_owned()) + .await + } +} + +#[derive(Iden)] +pub enum BSCRandomnessTask { + Table, + Id, + RequestId, + SubscriptionId, + GroupIndex, + RequestType, + Params, + Requester, + Seed, + RequestConfirmations, + CallbackGasLimit, + CallbackMaxGasPrice, + AssignmentBlockHeight, + State, + CreateAt, + UpdateAt, +} diff --git a/crates/dal/sqlite/migration/src/m20250621_000038_create_bsc_randomness_task_index.rs b/crates/dal/sqlite/migration/src/m20250621_000038_create_bsc_randomness_task_index.rs new file mode 100644 index 00000000..6cb79353 --- /dev/null +++ b/crates/dal/sqlite/migration/src/m20250621_000038_create_bsc_randomness_task_index.rs @@ -0,0 +1,68 @@ +use sea_orm_migration::prelude::*; + +use crate::m20250621_000037_create_bsc_randomness_task_table::BSCRandomnessTask; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .create_index( + Index::create() + .table(BSCRandomnessTask::Table) + .name("bsc_randomness_task_request_id") + .col(BSCRandomnessTask::RequestId) + .unique() + .to_owned(), + ) + .await?; + + manager + .create_index( + Index::create() + .table(BSCRandomnessTask::Table) + .name("bsc_randomness_task_group_index") + .col(BSCRandomnessTask::GroupIndex) + .to_owned(), + ) + .await?; + + manager + .create_index( + Index::create() + .table(BSCRandomnessTask::Table) + .name("bsc_randomness_task_assignment_block_height") + .col(BSCRandomnessTask::AssignmentBlockHeight) + .to_owned(), + ) + .await + } + + async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .drop_index( + Index::drop() + .name("bsc_randomness_task_request_id") + .to_owned(), + ) + .await?; + + manager + .drop_index( + Index::drop() + .name("bsc_randomness_task_group_index") + .to_owned(), + ) + .await?; + + manager + .drop_index( + Index::drop() + .name("bsc_randomness_task_assignment_block_height") + .to_owned(), + ) + .await + } +} diff --git a/crates/dal/sqlite/migration/src/m20250621_000039_create_bsc_randomness_result_table.rs b/crates/dal/sqlite/migration/src/m20250621_000039_create_bsc_randomness_result_table.rs new file mode 100644 index 00000000..8ac4d021 --- /dev/null +++ b/crates/dal/sqlite/migration/src/m20250621_000039_create_bsc_randomness_result_table.rs @@ -0,0 +1,91 @@ +use sea_orm_migration::prelude::*; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .create_table( + Table::create() + .table(BSCRandomnessResult::Table) + .if_not_exists() + .col( + ColumnDef::new(BSCRandomnessResult::Id) + .integer() + .not_null() + .primary_key(), + ) + .col( + ColumnDef::new(BSCRandomnessResult::RequestId) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessResult::GroupIndex) + .unsigned() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessResult::Message) + .blob(BlobSize::Medium) + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessResult::Threshold) + .integer() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessResult::PartialSignatures) + .text() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessResult::CommittedTimes) + .integer() + .not_null() + .default(0), + ) + .col( + ColumnDef::new(BSCRandomnessResult::State) + .tiny_unsigned() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessResult::CreateAt) + .date_time() + .not_null(), + ) + .col( + ColumnDef::new(BSCRandomnessResult::UpdateAt) + .date_time() + .not_null(), + ) + .to_owned(), + ) + .await + } + + async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .drop_table(Table::drop().table(BSCRandomnessResult::Table).to_owned()) + .await + } +} + +#[derive(Iden)] +pub enum BSCRandomnessResult { + Table, + Id, + RequestId, + GroupIndex, + Message, + Threshold, + PartialSignatures, + CommittedTimes, + State, + CreateAt, + UpdateAt, +} diff --git a/crates/dal/sqlite/migration/src/m20250621_000040_create_bsc_randomness_result_index.rs b/crates/dal/sqlite/migration/src/m20250621_000040_create_bsc_randomness_result_index.rs new file mode 100644 index 00000000..9fa074a7 --- /dev/null +++ b/crates/dal/sqlite/migration/src/m20250621_000040_create_bsc_randomness_result_index.rs @@ -0,0 +1,64 @@ +use sea_orm_migration::prelude::*; + +use crate::m20250621_000039_create_bsc_randomness_result_table::BSCRandomnessResult; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .create_index( + Index::create() + .table(BSCRandomnessResult::Table) + .name("bsc_randomness_result_request_id") + .col(BSCRandomnessResult::RequestId) + .unique() + .to_owned(), + ) + .await?; + + manager + .create_index( + Index::create() + .table(BSCRandomnessResult::Table) + .name("bsc_randomness_result_group_index") + .col(BSCRandomnessResult::GroupIndex) + .to_owned(), + ) + .await?; + + manager + .create_index( + Index::create() + .table(BSCRandomnessResult::Table) + .name("bsc_randomness_result_state") + .col(BSCRandomnessResult::State) + .to_owned(), + ) + .await + } + + async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { + manager + .drop_index( + Index::drop() + .name("bsc_randomness_result_request_id") + .to_owned(), + ) + .await?; + + manager + .drop_index( + Index::drop() + .name("bsc_randomness_result_group_index") + .to_owned(), + ) + .await?; + + manager + .drop_index(Index::drop().name("bsc_randomness_result_state").to_owned()) + .await + } +} diff --git a/crates/dal/sqlite/src/lib.rs b/crates/dal/sqlite/src/lib.rs index d88893b9..99ac205f 100644 --- a/crates/dal/sqlite/src/lib.rs +++ b/crates/dal/sqlite/src/lib.rs @@ -6,19 +6,25 @@ mod test_helper; mod types; pub use crate::group::GroupInfoDBClient; pub use crate::node::NodeInfoDBClient; +use crate::result::ArpaChainSignatureResultDBClient; +use crate::result::BSCSignatureResultDBClient; pub use crate::result::OPSignatureResultDBClient; pub use crate::result::SignatureResultDBClient; +use crate::task::ArpaChainBLSTasksDBClient; pub use crate::task::BLSTasksDBClient; +use crate::task::BSCBLSTasksDBClient; pub use crate::task::OPBLSTasksDBClient; pub use crate::types::DBError; pub use crate::types::DBResult; pub use crate::types::SqliteDB; use arpa_core::RandomnessTask; +use arpa_core::ARPA_CHAIN_ID; use arpa_core::B3_MAINNET_CHAIN_ID; use arpa_core::B3_TESTNET_CHAIN_ID; use arpa_core::BASE_GOERLI_TESTNET_CHAIN_ID; use arpa_core::BASE_MAINNET_CHAIN_ID; use arpa_core::BASE_SEPOLIA_TESTNET_CHAIN_ID; +use arpa_core::BSC_MAINNET_CHAIN_ID; use arpa_core::LOOT_MAINNET_CHAIN_ID; use arpa_core::LOOT_TESTNET_CHAIN_ID; use arpa_core::OP_DEVNET_CHAIN_ID; @@ -133,6 +139,10 @@ impl SqliteDB { B3_MAINNET_CHAIN_ID | B3_TESTNET_CHAIN_ID => { Ok(Box::new(self.get_b3_bls_tasks_client::())) } + ARPA_CHAIN_ID => Ok(Box::new( + self.get_arpa_chain_bls_tasks_client::(), + )), + BSC_MAINNET_CHAIN_ID => Ok(Box::new(self.get_bsc_bls_tasks_client::())), _ => Err(DataAccessError::InvalidChainId(chain_id)), } } @@ -166,6 +176,10 @@ impl SqliteDB { B3_MAINNET_CHAIN_ID | B3_TESTNET_CHAIN_ID => { Ok(Box::new(self.get_b3_randomness_result_client().await?)) } + ARPA_CHAIN_ID => Ok(Box::new( + self.get_arpa_chain_randomness_result_client().await?, + )), + BSC_MAINNET_CHAIN_ID => Ok(Box::new(self.get_bsc_randomness_result_client().await?)), _ => Err(DataAccessError::InvalidChainId(chain_id)), } } @@ -227,6 +241,8 @@ impl BLSTasksHandler for RedstoneBLSTasksDBClient for LootBLSTasksDBClient {} impl BLSTasksHandler for TaikoBLSTasksDBClient {} impl BLSTasksHandler for B3BLSTasksDBClient {} +impl BLSTasksHandler for BSCBLSTasksDBClient {} +impl BLSTasksHandler for ArpaChainBLSTasksDBClient {} impl SignatureResultCacheHandler for SignatureResultDBClient @@ -256,6 +272,14 @@ impl SignatureResultCacheHandler for B3SignatureResultDBClient { } +impl SignatureResultCacheHandler + for BSCSignatureResultDBClient +{ +} +impl SignatureResultCacheHandler + for ArpaChainSignatureResultDBClient +{ +} #[cfg(test)] pub mod sqlite_tests { diff --git a/crates/dal/sqlite/src/result/arpa_chain.rs b/crates/dal/sqlite/src/result/arpa_chain.rs new file mode 100644 index 00000000..4293cdd6 --- /dev/null +++ b/crates/dal/sqlite/src/result/arpa_chain.rs @@ -0,0 +1,481 @@ +use crate::types::DBError; +use crate::types::RandomnessRecord; +use crate::types::SqliteDB; +use arpa_core::format_now_date; +use arpa_core::BLSTaskError; +use arpa_core::{RandomnessTask, Task}; +use arpa_dal::cache::BLSResultCache; +use arpa_dal::cache::InMemorySignatureResultCache; +use arpa_dal::cache::RandomnessResultCache; +use arpa_dal::error::DataAccessResult; +use arpa_dal::BLSResultCacheState; +use arpa_dal::ResultCache; +use arpa_dal::SignatureResultCacheFetcher; +use arpa_dal::SignatureResultCacheUpdater; +use async_trait::async_trait; +use entity::arpa_chain_randomness_result; +use entity::prelude::ArpaChainRandomnessResult; +use ethers_core::types::Address; +use migration::Expr; +use migration::Query; +use migration::SelectStatement; +use migration::SimpleExpr; +use migration::{ + ArpaChainRandomnessResult as ArpaChainRandomnessResultTable, + ArpaChainRandomnessTask as ArpaChainRandomnessTaskTable, +}; +use sea_orm::TransactionTrait; +use sea_orm::{ActiveModelTrait, DbConn, DbErr, Set}; +use sea_orm::{ColumnTrait, EntityTrait, QueryFilter}; +use std::collections::BTreeMap; +use std::sync::Arc; + +impl SqliteDB { + pub async fn get_arpa_chain_randomness_result_client( + &self, + ) -> DataAccessResult> { + let txn = self.connection.begin().await.map_err(|e| { + let e: DBError = e.into(); + e + })?; + + // set commit result of committing records(if any) to not committed + let update_stmt = Query::update() + .table(ArpaChainRandomnessResultTable::Table) + .values([ + ( + ArpaChainRandomnessResultTable::State, + BLSResultCacheState::NotCommitted.to_i32().into(), + ), + ( + ArpaChainRandomnessResultTable::UpdateAt, + format_now_date().into(), + ), + ]) + .and_where( + Expr::col(ArpaChainRandomnessResultTable::State) + .eq(BLSResultCacheState::Committing.to_i32()), + ) + .to_owned(); + + self.execute_update_statement(&update_stmt).await?; + + // load all not committed records + let query_stmt = build_randomness_record_query(Some( + Expr::col(( + ArpaChainRandomnessResultTable::Table, + ArpaChainRandomnessResultTable::State, + )) + .eq(BLSResultCacheState::NotCommitted.to_i32()), + )); + let randomness_results: Vec = + self.query_all_statement(&query_stmt).await?; + + txn.commit().await.map_err(|e| { + let e: DBError = e.into(); + e + })?; + + let results = randomness_results + .into_iter() + .map(|r| r.into()) + .collect::>(); + + Ok(ArpaChainSignatureResultDBClient { + db_client: Arc::new(self.clone()), + signature_results_cache: InMemorySignatureResultCache::::rebuild( + results, + ), + }) + } +} + +#[derive(Debug, Clone)] +pub struct ArpaChainSignatureResultDBClient { + db_client: Arc, + signature_results_cache: InMemorySignatureResultCache, +} + +impl ArpaChainSignatureResultDBClient { + pub fn get_connection(&self) -> &DbConn { + &self.db_client.connection + } +} + +#[async_trait] +impl SignatureResultCacheFetcher + for ArpaChainSignatureResultDBClient +{ + async fn contains(&self, task_request_id: &[u8]) -> DataAccessResult { + let model = ArpaChainRandomnessResultQuery::select_by_request_id( + self.get_connection(), + task_request_id, + ) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + Ok(model.is_some()) + } + + async fn get( + &self, + task_request_id: &[u8], + ) -> DataAccessResult> { + let query_stmt = build_randomness_record_query(Some( + Expr::col(( + ArpaChainRandomnessResultTable::Table, + ArpaChainRandomnessResultTable::RequestId, + )) + .eq(task_request_id), + )); + if let Some(randomness_record) = self + .db_client + .query_one_statement::(&query_stmt) + .await? + { + return Ok(randomness_record.into()); + } + return Err(BLSTaskError::CommitterCacheNotExisted.into()); + } +} + +#[async_trait] +impl SignatureResultCacheUpdater + for ArpaChainSignatureResultDBClient +{ + async fn get_ready_to_commit_signatures( + &mut self, + current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, + ) -> DataAccessResult> { + let ready_to_commit_signatures = self + .signature_results_cache + .get_ready_to_commit_signatures( + current_block_height, + randomness_aggregation_waiting_block_number, + ) + .await?; + + if ready_to_commit_signatures.is_empty() { + return Ok(vec![]); + } + + let request_ids = ready_to_commit_signatures + .iter() + .map(|s| s.request_id()) + .collect::>(); + + let update_stmt = Query::update() + .table(ArpaChainRandomnessResultTable::Table) + .values([ + ( + ArpaChainRandomnessResultTable::State, + BLSResultCacheState::Committing.to_i32().into(), + ), + ( + ArpaChainRandomnessResultTable::UpdateAt, + format_now_date().into(), + ), + ]) + .and_where(Expr::col(ArpaChainRandomnessResultTable::RequestId).is_in(request_ids)) + .to_owned(); + + self.db_client + .execute_update_statement(&update_stmt) + .await?; + + Ok(ready_to_commit_signatures) + } + + async fn update_commit_result( + &mut self, + task_request_id: &[u8], + status: BLSResultCacheState, + ) -> DataAccessResult<()> { + let update_stmt = Query::update() + .table(ArpaChainRandomnessResultTable::Table) + .values([ + ( + ArpaChainRandomnessResultTable::State, + status.to_i32().into(), + ), + ( + ArpaChainRandomnessResultTable::UpdateAt, + format_now_date().into(), + ), + ]) + .and_where(Expr::col(ArpaChainRandomnessResultTable::RequestId).eq(task_request_id)) + .to_owned(); + + self.db_client + .execute_update_statement(&update_stmt) + .await?; + + self.signature_results_cache + .update_commit_result(task_request_id, status) + .await?; + + Ok(()) + } + + async fn add( + &mut self, + group_index: usize, + task: RandomnessTask, + message: Vec, + threshold: usize, + ) -> DataAccessResult { + ArpaChainRandomnessResultMutation::add( + self.get_connection(), + task.request_id.clone(), + group_index as i32, + message.clone(), + threshold as i32, + ) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + self.signature_results_cache + .add(group_index, task, message, threshold) + .await?; + + Ok(true) + } + + async fn add_partial_signature( + &mut self, + task_request_id: Vec, + member_address: Address, + member_index: usize, + partial_signature: Vec, + ) -> DataAccessResult { + let txn = self.get_connection().begin().await.map_err(|e| { + let e: DBError = e.into(); + e + })?; + + let model = ArpaChainRandomnessResultQuery::select_by_request_id( + self.get_connection(), + &task_request_id, + ) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })? + .ok_or(BLSTaskError::CommitterCacheNotExisted)?; + + ArpaChainRandomnessResultMutation::add_partial_signature( + self.get_connection(), + model, + member_address, + partial_signature.clone(), + ) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + txn.commit().await.map_err(|e| { + let e: DBError = e.into(); + e + })?; + + self.signature_results_cache + .add_partial_signature( + task_request_id, + member_address, + member_index, + partial_signature, + ) + .await?; + + Ok(true) + } + + async fn incr_committed_times(&mut self, task_request_id: &[u8]) -> DataAccessResult<()> { + let update_stmt = Query::update() + .table(ArpaChainRandomnessResultTable::Table) + .values([ + ( + ArpaChainRandomnessResultTable::CommittedTimes, + Expr::col(ArpaChainRandomnessResultTable::CommittedTimes).add(1), + ), + ( + ArpaChainRandomnessResultTable::UpdateAt, + format_now_date().into(), + ), + ]) + .and_where(Expr::col(ArpaChainRandomnessResultTable::RequestId).eq(task_request_id)) + .to_owned(); + + self.db_client + .execute_update_statement(&update_stmt) + .await?; + + self.signature_results_cache + .incr_committed_times(task_request_id) + .await?; + + Ok(()) + } +} + +pub struct ArpaChainRandomnessResultQuery; + +impl ArpaChainRandomnessResultQuery { + pub async fn select_by_request_id( + db: &DbConn, + request_id: &[u8], + ) -> Result, DbErr> { + ArpaChainRandomnessResult::find() + .filter(arpa_chain_randomness_result::Column::RequestId.eq(request_id)) + .one(db) + .await + } +} + +pub struct ArpaChainRandomnessResultMutation; + +impl ArpaChainRandomnessResultMutation { + pub async fn add( + db: &DbConn, + request_id: Vec, + group_index: i32, + message: Vec, + threshold: i32, + ) -> Result { + arpa_chain_randomness_result::ActiveModel { + request_id: Set(request_id), + group_index: Set(group_index), + message: Set(message), + threshold: Set(threshold), + partial_signatures: Set( + serde_json::to_string(&BTreeMap::>::new()).unwrap() + ), + committed_times: Set(0), + create_at: Set(format_now_date()), + update_at: Set(format_now_date()), + state: Set(BLSResultCacheState::NotCommitted.to_i32()), + ..Default::default() + } + .save(db) + .await + } + + pub async fn add_partial_signature( + db: &DbConn, + model: arpa_chain_randomness_result::Model, + member_address: Address, + partial_signature: Vec, + ) -> Result { + let mut partial_signatures: BTreeMap> = + serde_json::from_str(&model.partial_signatures).unwrap(); + + partial_signatures.insert(member_address, partial_signature); + + let mut randomness_result: arpa_chain_randomness_result::ActiveModel = model.into(); + + randomness_result.partial_signatures = + Set(serde_json::to_string(&partial_signatures).unwrap()); + + randomness_result.update_at = Set(format_now_date()); + + randomness_result.update(db).await + } +} + +pub(crate) fn build_randomness_record_query(and_where: Option) -> SelectStatement { + Query::select() + .column(( + ArpaChainRandomnessResultTable::Table, + ArpaChainRandomnessResultTable::RequestId, + )) + .column(( + ArpaChainRandomnessResultTable::Table, + ArpaChainRandomnessResultTable::GroupIndex, + )) + .column(( + ArpaChainRandomnessResultTable::Table, + ArpaChainRandomnessResultTable::Message, + )) + .column(( + ArpaChainRandomnessResultTable::Table, + ArpaChainRandomnessResultTable::Threshold, + )) + .column(( + ArpaChainRandomnessResultTable::Table, + ArpaChainRandomnessResultTable::PartialSignatures, + )) + .column(( + ArpaChainRandomnessResultTable::Table, + ArpaChainRandomnessResultTable::CommittedTimes, + )) + .column(( + ArpaChainRandomnessResultTable::Table, + ArpaChainRandomnessResultTable::State, + )) + .column(( + ArpaChainRandomnessTaskTable::Table, + ArpaChainRandomnessTaskTable::SubscriptionId, + )) + .column(( + ArpaChainRandomnessTaskTable::Table, + ArpaChainRandomnessTaskTable::RequestType, + )) + .column(( + ArpaChainRandomnessTaskTable::Table, + ArpaChainRandomnessTaskTable::Params, + )) + .column(( + ArpaChainRandomnessTaskTable::Table, + ArpaChainRandomnessTaskTable::Requester, + )) + .column(( + ArpaChainRandomnessTaskTable::Table, + ArpaChainRandomnessTaskTable::Seed, + )) + .column(( + ArpaChainRandomnessTaskTable::Table, + ArpaChainRandomnessTaskTable::RequestConfirmations, + )) + .column(( + ArpaChainRandomnessTaskTable::Table, + ArpaChainRandomnessTaskTable::CallbackGasLimit, + )) + .column(( + ArpaChainRandomnessTaskTable::Table, + ArpaChainRandomnessTaskTable::CallbackMaxGasPrice, + )) + .column(( + ArpaChainRandomnessTaskTable::Table, + ArpaChainRandomnessTaskTable::AssignmentBlockHeight, + )) + .from(ArpaChainRandomnessResultTable::Table) + .inner_join( + ArpaChainRandomnessTaskTable::Table, + Expr::col(( + ArpaChainRandomnessResultTable::Table, + ArpaChainRandomnessResultTable::RequestId, + )) + .equals(( + ArpaChainRandomnessTaskTable::Table, + ArpaChainRandomnessTaskTable::RequestId, + )), + ) + .conditions( + and_where.is_some(), + |x| { + x.and_where(and_where.unwrap()); + }, + |_x| {}, + ) + .to_owned() +} diff --git a/crates/dal/sqlite/src/result/bsc.rs b/crates/dal/sqlite/src/result/bsc.rs new file mode 100644 index 00000000..db6d04a9 --- /dev/null +++ b/crates/dal/sqlite/src/result/bsc.rs @@ -0,0 +1,458 @@ +use crate::types::DBError; +use crate::types::RandomnessRecord; +use crate::types::SqliteDB; +use arpa_core::format_now_date; +use arpa_core::BLSTaskError; +use arpa_core::{RandomnessTask, Task}; +use arpa_dal::cache::BLSResultCache; +use arpa_dal::cache::InMemorySignatureResultCache; +use arpa_dal::cache::RandomnessResultCache; +use arpa_dal::error::DataAccessResult; +use arpa_dal::BLSResultCacheState; +use arpa_dal::ResultCache; +use arpa_dal::SignatureResultCacheFetcher; +use arpa_dal::SignatureResultCacheUpdater; +use async_trait::async_trait; +use entity::bsc_randomness_result; +use entity::prelude::BscRandomnessResult; +use ethers_core::types::Address; +use migration::Expr; +use migration::Query; +use migration::SelectStatement; +use migration::SimpleExpr; +use migration::{ + BSCRandomnessResult as BSCRandomnessResultTable, BSCRandomnessTask as BSCRandomnessTaskTable, +}; +use sea_orm::TransactionTrait; +use sea_orm::{ActiveModelTrait, DbConn, DbErr, Set}; +use sea_orm::{ColumnTrait, EntityTrait, QueryFilter}; +use std::collections::BTreeMap; +use std::sync::Arc; + +impl SqliteDB { + pub async fn get_bsc_randomness_result_client( + &self, + ) -> DataAccessResult> { + let txn = self.connection.begin().await.map_err(|e| { + let e: DBError = e.into(); + e + })?; + + // set commit result of committing records(if any) to not committed + let update_stmt = Query::update() + .table(BSCRandomnessResultTable::Table) + .values([ + ( + BSCRandomnessResultTable::State, + BLSResultCacheState::NotCommitted.to_i32().into(), + ), + (BSCRandomnessResultTable::UpdateAt, format_now_date().into()), + ]) + .and_where( + Expr::col(BSCRandomnessResultTable::State) + .eq(BLSResultCacheState::Committing.to_i32()), + ) + .to_owned(); + + self.execute_update_statement(&update_stmt).await?; + + // load all not committed records + let query_stmt = build_randomness_record_query(Some( + Expr::col(( + BSCRandomnessResultTable::Table, + BSCRandomnessResultTable::State, + )) + .eq(BLSResultCacheState::NotCommitted.to_i32()), + )); + let randomness_results: Vec = + self.query_all_statement(&query_stmt).await?; + + txn.commit().await.map_err(|e| { + let e: DBError = e.into(); + e + })?; + + let results = randomness_results + .into_iter() + .map(|r| r.into()) + .collect::>(); + + Ok(BSCSignatureResultDBClient { + db_client: Arc::new(self.clone()), + signature_results_cache: InMemorySignatureResultCache::::rebuild( + results, + ), + }) + } +} + +#[derive(Debug, Clone)] +pub struct BSCSignatureResultDBClient { + db_client: Arc, + signature_results_cache: InMemorySignatureResultCache, +} + +impl BSCSignatureResultDBClient { + pub fn get_connection(&self) -> &DbConn { + &self.db_client.connection + } +} + +#[async_trait] +impl SignatureResultCacheFetcher + for BSCSignatureResultDBClient +{ + async fn contains(&self, task_request_id: &[u8]) -> DataAccessResult { + let model = + BSCRandomnessResultQuery::select_by_request_id(self.get_connection(), task_request_id) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + Ok(model.is_some()) + } + + async fn get( + &self, + task_request_id: &[u8], + ) -> DataAccessResult> { + let query_stmt = build_randomness_record_query(Some( + Expr::col(( + BSCRandomnessResultTable::Table, + BSCRandomnessResultTable::RequestId, + )) + .eq(task_request_id), + )); + if let Some(randomness_record) = self + .db_client + .query_one_statement::(&query_stmt) + .await? + { + return Ok(randomness_record.into()); + } + return Err(BLSTaskError::CommitterCacheNotExisted.into()); + } +} + +#[async_trait] +impl SignatureResultCacheUpdater + for BSCSignatureResultDBClient +{ + async fn get_ready_to_commit_signatures( + &mut self, + current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, + ) -> DataAccessResult> { + let ready_to_commit_signatures = self + .signature_results_cache + .get_ready_to_commit_signatures( + current_block_height, + randomness_aggregation_waiting_block_number, + ) + .await?; + + if ready_to_commit_signatures.is_empty() { + return Ok(vec![]); + } + + let request_ids = ready_to_commit_signatures + .iter() + .map(|s| s.request_id()) + .collect::>(); + + let update_stmt = Query::update() + .table(BSCRandomnessResultTable::Table) + .values([ + ( + BSCRandomnessResultTable::State, + BLSResultCacheState::Committing.to_i32().into(), + ), + (BSCRandomnessResultTable::UpdateAt, format_now_date().into()), + ]) + .and_where(Expr::col(BSCRandomnessResultTable::RequestId).is_in(request_ids)) + .to_owned(); + + self.db_client + .execute_update_statement(&update_stmt) + .await?; + + Ok(ready_to_commit_signatures) + } + + async fn update_commit_result( + &mut self, + task_request_id: &[u8], + status: BLSResultCacheState, + ) -> DataAccessResult<()> { + let update_stmt = Query::update() + .table(BSCRandomnessResultTable::Table) + .values([ + (BSCRandomnessResultTable::State, status.to_i32().into()), + (BSCRandomnessResultTable::UpdateAt, format_now_date().into()), + ]) + .and_where(Expr::col(BSCRandomnessResultTable::RequestId).eq(task_request_id)) + .to_owned(); + + self.db_client + .execute_update_statement(&update_stmt) + .await?; + + self.signature_results_cache + .update_commit_result(task_request_id, status) + .await?; + + Ok(()) + } + + async fn add( + &mut self, + group_index: usize, + task: RandomnessTask, + message: Vec, + threshold: usize, + ) -> DataAccessResult { + BSCRandomnessResultMutation::add( + self.get_connection(), + task.request_id.clone(), + group_index as i32, + message.clone(), + threshold as i32, + ) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + self.signature_results_cache + .add(group_index, task, message, threshold) + .await?; + + Ok(true) + } + + async fn add_partial_signature( + &mut self, + task_request_id: Vec, + member_address: Address, + member_index: usize, + partial_signature: Vec, + ) -> DataAccessResult { + let txn = self.get_connection().begin().await.map_err(|e| { + let e: DBError = e.into(); + e + })?; + + let model = + BSCRandomnessResultQuery::select_by_request_id(self.get_connection(), &task_request_id) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })? + .ok_or(BLSTaskError::CommitterCacheNotExisted)?; + + BSCRandomnessResultMutation::add_partial_signature( + self.get_connection(), + model, + member_address, + partial_signature.clone(), + ) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + txn.commit().await.map_err(|e| { + let e: DBError = e.into(); + e + })?; + + self.signature_results_cache + .add_partial_signature( + task_request_id, + member_address, + member_index, + partial_signature, + ) + .await?; + + Ok(true) + } + + async fn incr_committed_times(&mut self, task_request_id: &[u8]) -> DataAccessResult<()> { + let update_stmt = Query::update() + .table(BSCRandomnessResultTable::Table) + .values([ + ( + BSCRandomnessResultTable::CommittedTimes, + Expr::col(BSCRandomnessResultTable::CommittedTimes).add(1), + ), + (BSCRandomnessResultTable::UpdateAt, format_now_date().into()), + ]) + .and_where(Expr::col(BSCRandomnessResultTable::RequestId).eq(task_request_id)) + .to_owned(); + + self.db_client + .execute_update_statement(&update_stmt) + .await?; + + self.signature_results_cache + .incr_committed_times(task_request_id) + .await?; + + Ok(()) + } +} + +pub struct BSCRandomnessResultQuery; + +impl BSCRandomnessResultQuery { + pub async fn select_by_request_id( + db: &DbConn, + request_id: &[u8], + ) -> Result, DbErr> { + BscRandomnessResult::find() + .filter(bsc_randomness_result::Column::RequestId.eq(request_id)) + .one(db) + .await + } +} + +pub struct BSCRandomnessResultMutation; + +impl BSCRandomnessResultMutation { + pub async fn add( + db: &DbConn, + request_id: Vec, + group_index: i32, + message: Vec, + threshold: i32, + ) -> Result { + bsc_randomness_result::ActiveModel { + request_id: Set(request_id), + group_index: Set(group_index), + message: Set(message), + threshold: Set(threshold), + partial_signatures: Set( + serde_json::to_string(&BTreeMap::>::new()).unwrap() + ), + committed_times: Set(0), + create_at: Set(format_now_date()), + update_at: Set(format_now_date()), + state: Set(BLSResultCacheState::NotCommitted.to_i32()), + ..Default::default() + } + .save(db) + .await + } + + pub async fn add_partial_signature( + db: &DbConn, + model: bsc_randomness_result::Model, + member_address: Address, + partial_signature: Vec, + ) -> Result { + let mut partial_signatures: BTreeMap> = + serde_json::from_str(&model.partial_signatures).unwrap(); + + partial_signatures.insert(member_address, partial_signature); + + let mut randomness_result: bsc_randomness_result::ActiveModel = model.into(); + + randomness_result.partial_signatures = + Set(serde_json::to_string(&partial_signatures).unwrap()); + + randomness_result.update_at = Set(format_now_date()); + + randomness_result.update(db).await + } +} + +pub(crate) fn build_randomness_record_query(and_where: Option) -> SelectStatement { + Query::select() + .column(( + BSCRandomnessResultTable::Table, + BSCRandomnessResultTable::RequestId, + )) + .column(( + BSCRandomnessResultTable::Table, + BSCRandomnessResultTable::GroupIndex, + )) + .column(( + BSCRandomnessResultTable::Table, + BSCRandomnessResultTable::Message, + )) + .column(( + BSCRandomnessResultTable::Table, + BSCRandomnessResultTable::Threshold, + )) + .column(( + BSCRandomnessResultTable::Table, + BSCRandomnessResultTable::PartialSignatures, + )) + .column(( + BSCRandomnessResultTable::Table, + BSCRandomnessResultTable::CommittedTimes, + )) + .column(( + BSCRandomnessResultTable::Table, + BSCRandomnessResultTable::State, + )) + .column(( + BSCRandomnessTaskTable::Table, + BSCRandomnessTaskTable::SubscriptionId, + )) + .column(( + BSCRandomnessTaskTable::Table, + BSCRandomnessTaskTable::RequestType, + )) + .column(( + BSCRandomnessTaskTable::Table, + BSCRandomnessTaskTable::Params, + )) + .column(( + BSCRandomnessTaskTable::Table, + BSCRandomnessTaskTable::Requester, + )) + .column((BSCRandomnessTaskTable::Table, BSCRandomnessTaskTable::Seed)) + .column(( + BSCRandomnessTaskTable::Table, + BSCRandomnessTaskTable::RequestConfirmations, + )) + .column(( + BSCRandomnessTaskTable::Table, + BSCRandomnessTaskTable::CallbackGasLimit, + )) + .column(( + BSCRandomnessTaskTable::Table, + BSCRandomnessTaskTable::CallbackMaxGasPrice, + )) + .column(( + BSCRandomnessTaskTable::Table, + BSCRandomnessTaskTable::AssignmentBlockHeight, + )) + .from(BSCRandomnessResultTable::Table) + .inner_join( + BSCRandomnessTaskTable::Table, + Expr::col(( + BSCRandomnessResultTable::Table, + BSCRandomnessResultTable::RequestId, + )) + .equals(( + BSCRandomnessTaskTable::Table, + BSCRandomnessTaskTable::RequestId, + )), + ) + .conditions( + and_where.is_some(), + |x| { + x.and_where(and_where.unwrap()); + }, + |_x| {}, + ) + .to_owned() +} diff --git a/crates/dal/sqlite/src/result/mod.rs b/crates/dal/sqlite/src/result/mod.rs index 6cc5fe22..eb3edb56 100644 --- a/crates/dal/sqlite/src/result/mod.rs +++ b/crates/dal/sqlite/src/result/mod.rs @@ -1,13 +1,17 @@ +mod arpa_chain; mod b3; mod base; +mod bsc; mod loot; mod main; mod op; mod redstone; mod taiko; +pub use arpa_chain::ArpaChainSignatureResultDBClient; pub use b3::B3SignatureResultDBClient; pub use base::BaseSignatureResultDBClient; +pub use bsc::BSCSignatureResultDBClient; pub use loot::LootSignatureResultDBClient; pub use main::SignatureResultDBClient; pub use op::OPSignatureResultDBClient; diff --git a/crates/dal/sqlite/src/task/arpa_chain.rs b/crates/dal/sqlite/src/task/arpa_chain.rs new file mode 100644 index 00000000..068d60e9 --- /dev/null +++ b/crates/dal/sqlite/src/task/arpa_chain.rs @@ -0,0 +1,206 @@ +use crate::types::arpa_chain_model_to_randomness_task; +use crate::types::DBError; +use crate::types::SqliteDB; +use arpa_core::format_now_date; +use arpa_core::u256_to_vec; +use arpa_core::{address_to_string, RandomnessTask, Task}; +use arpa_dal::error::DataAccessResult; +use arpa_dal::error::RandomnessTaskError; +use arpa_dal::{BLSTasksFetcher, BLSTasksUpdater}; +use async_trait::async_trait; +use entity::arpa_chain_randomness_task; +use entity::prelude::ArpaChainRandomnessTask; +use sea_orm::{ + ActiveModelTrait, ColumnTrait, DbBackend, DbConn, DbErr, EntityTrait, FromQueryResult, + QueryFilter, Set, Statement, +}; +use std::{marker::PhantomData, sync::Arc}; + +impl SqliteDB { + pub fn get_arpa_chain_bls_tasks_client(&self) -> ArpaChainBLSTasksDBClient { + ArpaChainBLSTasksDBClient { + db_client: Arc::new(self.clone()), + bls_tasks: PhantomData, + } + } +} + +#[derive(Debug, Clone)] +pub struct ArpaChainBLSTasksDBClient { + db_client: Arc, + bls_tasks: PhantomData, +} + +impl ArpaChainBLSTasksDBClient { + pub fn get_connection(&self) -> &DbConn { + &self.db_client.connection + } +} + +#[async_trait] +impl BLSTasksFetcher for ArpaChainBLSTasksDBClient { + async fn contains(&self, task_request_id: &[u8]) -> DataAccessResult { + let conn = &self.db_client.connection; + let task = ArpaChainRandomnessTaskQuery::select_by_request_id(conn, task_request_id) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + Ok(task.is_some()) + } + + async fn get(&self, task_request_id: &[u8]) -> DataAccessResult { + let conn = &self.db_client.connection; + let task = ArpaChainRandomnessTaskQuery::select_by_request_id(conn, task_request_id) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + task.map(arpa_chain_model_to_randomness_task) + .ok_or_else(|| { + RandomnessTaskError::NoRandomnessTask(format!("{:?}", task_request_id)).into() + }) + } + + async fn is_handled(&self, task_request_id: &[u8]) -> DataAccessResult { + let conn = &self.db_client.connection; + let task = ArpaChainRandomnessTaskQuery::select_by_request_id(conn, task_request_id) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + Ok(task.is_some() && task.unwrap().state == 1) + } +} + +#[async_trait] +impl BLSTasksUpdater for ArpaChainBLSTasksDBClient { + async fn add(&mut self, task: RandomnessTask) -> DataAccessResult<()> { + let seed_bytes = u256_to_vec(&task.seed); + + ArpaChainRandomnessTaskMutation::add_task( + self.get_connection(), + task.request_id, + task.subscription_id as i64, + task.group_index as i32, + task.request_type as i32, + task.params, + address_to_string(task.requester), + seed_bytes, + task.request_confirmations as i32, + task.callback_gas_limit as i32, + u256_to_vec(&task.callback_max_gas_price), + task.assignment_block_height as i64, + ) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + Ok(()) + } + + async fn check_and_get_available_tasks( + &mut self, + current_block_height: usize, + current_group_index: usize, + randomness_task_exclusive_window: usize, + ) -> DataAccessResult> { + let before_assignment_block_height = + if current_block_height > randomness_task_exclusive_window { + current_block_height - randomness_task_exclusive_window + } else { + 0 + }; + ArpaChainRandomnessTaskMutation::fetch_available_tasks( + self.get_connection(), + current_group_index as i32, + before_assignment_block_height as i32, + ) + .await + .map(|models| { + models + .into_iter() + .map(arpa_chain_model_to_randomness_task) + .collect::>() + }) + .map_err(|e| { + let e: DBError = e.into(); + e.into() + }) + } +} + +pub struct ArpaChainRandomnessTaskQuery; + +impl ArpaChainRandomnessTaskQuery { + pub async fn select_by_request_id( + db: &DbConn, + request_id: &[u8], + ) -> Result, DbErr> { + ArpaChainRandomnessTask::find() + .filter(arpa_chain_randomness_task::Column::RequestId.eq(request_id)) + .one(db) + .await + } +} + +pub struct ArpaChainRandomnessTaskMutation; + +impl ArpaChainRandomnessTaskMutation { + #[allow(clippy::too_many_arguments)] + pub async fn add_task( + db: &DbConn, + request_id: Vec, + subscription_id: i64, + group_index: i32, + request_type: i32, + params: Vec, + requester: String, + seed: Vec, + request_confirmations: i32, + callback_gas_limit: i32, + callback_max_gas_price: Vec, + assignment_block_height: i64, + ) -> Result { + arpa_chain_randomness_task::ActiveModel { + request_id: Set(request_id), + subscription_id: Set(subscription_id), + group_index: Set(group_index), + request_type: Set(request_type), + params: Set(params), + requester: Set(requester), + seed: Set(seed), + request_confirmations: Set(request_confirmations), + callback_gas_limit: Set(callback_gas_limit), + callback_max_gas_price: Set(callback_max_gas_price), + assignment_block_height: Set(assignment_block_height), + create_at: Set(format_now_date()), + update_at: Set(format_now_date()), + state: Set(0), + ..Default::default() + } + .save(db) + .await + } + + pub async fn fetch_available_tasks( + db: &DbConn, + group_index: i32, + assignment_block_height: i32, + ) -> Result, DbErr> { + arpa_chain_randomness_task::Model::find_by_statement(Statement::from_sql_and_values( + DbBackend::Sqlite, + r#"update arpa_chain_randomness_task set state = 1, update_at = $1 where state = 0 and (group_index = $2 or assignment_block_height < $3) + returning *"#, + vec![format_now_date().into(), group_index.into(), assignment_block_height.into()], + )) + .all(db).await + } +} diff --git a/crates/dal/sqlite/src/task/bsc.rs b/crates/dal/sqlite/src/task/bsc.rs new file mode 100644 index 00000000..63408a75 --- /dev/null +++ b/crates/dal/sqlite/src/task/bsc.rs @@ -0,0 +1,205 @@ +use crate::types::bsc_model_to_randomness_task; +use crate::types::DBError; +use crate::types::SqliteDB; +use arpa_core::format_now_date; +use arpa_core::u256_to_vec; +use arpa_core::{address_to_string, RandomnessTask, Task}; +use arpa_dal::error::DataAccessResult; +use arpa_dal::error::RandomnessTaskError; +use arpa_dal::{BLSTasksFetcher, BLSTasksUpdater}; +use async_trait::async_trait; +use entity::bsc_randomness_task; +use entity::prelude::BscRandomnessTask; +use sea_orm::{ + ActiveModelTrait, ColumnTrait, DbBackend, DbConn, DbErr, EntityTrait, FromQueryResult, + QueryFilter, Set, Statement, +}; +use std::{marker::PhantomData, sync::Arc}; + +impl SqliteDB { + pub fn get_bsc_bls_tasks_client(&self) -> BSCBLSTasksDBClient { + BSCBLSTasksDBClient { + db_client: Arc::new(self.clone()), + bls_tasks: PhantomData, + } + } +} + +#[derive(Debug, Clone)] +pub struct BSCBLSTasksDBClient { + db_client: Arc, + bls_tasks: PhantomData, +} + +impl BSCBLSTasksDBClient { + pub fn get_connection(&self) -> &DbConn { + &self.db_client.connection + } +} + +#[async_trait] +impl BLSTasksFetcher for BSCBLSTasksDBClient { + async fn contains(&self, task_request_id: &[u8]) -> DataAccessResult { + let conn = &self.db_client.connection; + let task = BSCRandomnessTaskQuery::select_by_request_id(conn, task_request_id) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + Ok(task.is_some()) + } + + async fn get(&self, task_request_id: &[u8]) -> DataAccessResult { + let conn = &self.db_client.connection; + let task = BSCRandomnessTaskQuery::select_by_request_id(conn, task_request_id) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + task.map(bsc_model_to_randomness_task).ok_or_else(|| { + RandomnessTaskError::NoRandomnessTask(format!("{:?}", task_request_id)).into() + }) + } + + async fn is_handled(&self, task_request_id: &[u8]) -> DataAccessResult { + let conn = &self.db_client.connection; + let task = BSCRandomnessTaskQuery::select_by_request_id(conn, task_request_id) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + Ok(task.is_some() && task.unwrap().state == 1) + } +} + +#[async_trait] +impl BLSTasksUpdater for BSCBLSTasksDBClient { + async fn add(&mut self, task: RandomnessTask) -> DataAccessResult<()> { + let seed_bytes = u256_to_vec(&task.seed); + + BSCRandomnessTaskMutation::add_task( + self.get_connection(), + task.request_id, + task.subscription_id as i64, + task.group_index as i32, + task.request_type as i32, + task.params, + address_to_string(task.requester), + seed_bytes, + task.request_confirmations as i32, + task.callback_gas_limit as i32, + u256_to_vec(&task.callback_max_gas_price), + task.assignment_block_height as i64, + ) + .await + .map_err(|e| { + let e: DBError = e.into(); + e + })?; + + Ok(()) + } + + async fn check_and_get_available_tasks( + &mut self, + current_block_height: usize, + current_group_index: usize, + randomness_task_exclusive_window: usize, + ) -> DataAccessResult> { + let before_assignment_block_height = + if current_block_height > randomness_task_exclusive_window { + current_block_height - randomness_task_exclusive_window + } else { + 0 + }; + BSCRandomnessTaskMutation::fetch_available_tasks( + self.get_connection(), + current_group_index as i32, + before_assignment_block_height as i32, + ) + .await + .map(|models| { + models + .into_iter() + .map(bsc_model_to_randomness_task) + .collect::>() + }) + .map_err(|e| { + let e: DBError = e.into(); + e.into() + }) + } +} + +pub struct BSCRandomnessTaskQuery; + +impl BSCRandomnessTaskQuery { + pub async fn select_by_request_id( + db: &DbConn, + request_id: &[u8], + ) -> Result, DbErr> { + BscRandomnessTask::find() + .filter(bsc_randomness_task::Column::RequestId.eq(request_id)) + .one(db) + .await + } +} + +pub struct BSCRandomnessTaskMutation; + +impl BSCRandomnessTaskMutation { + #[allow(clippy::too_many_arguments)] + pub async fn add_task( + db: &DbConn, + request_id: Vec, + subscription_id: i64, + group_index: i32, + request_type: i32, + params: Vec, + requester: String, + seed: Vec, + request_confirmations: i32, + callback_gas_limit: i32, + callback_max_gas_price: Vec, + assignment_block_height: i64, + ) -> Result { + bsc_randomness_task::ActiveModel { + request_id: Set(request_id), + subscription_id: Set(subscription_id), + group_index: Set(group_index), + request_type: Set(request_type), + params: Set(params), + requester: Set(requester), + seed: Set(seed), + request_confirmations: Set(request_confirmations), + callback_gas_limit: Set(callback_gas_limit), + callback_max_gas_price: Set(callback_max_gas_price), + assignment_block_height: Set(assignment_block_height), + create_at: Set(format_now_date()), + update_at: Set(format_now_date()), + state: Set(0), + ..Default::default() + } + .save(db) + .await + } + + pub async fn fetch_available_tasks( + db: &DbConn, + group_index: i32, + assignment_block_height: i32, + ) -> Result, DbErr> { + bsc_randomness_task::Model::find_by_statement(Statement::from_sql_and_values( + DbBackend::Sqlite, + r#"update bsc_randomness_task set state = 1, update_at = $1 where state = 0 and (group_index = $2 or assignment_block_height < $3) + returning *"#, + vec![format_now_date().into(), group_index.into(), assignment_block_height.into()], + )) + .all(db).await + } +} diff --git a/crates/dal/sqlite/src/task/mod.rs b/crates/dal/sqlite/src/task/mod.rs index 8c9ea9be..ae2f50bc 100644 --- a/crates/dal/sqlite/src/task/mod.rs +++ b/crates/dal/sqlite/src/task/mod.rs @@ -1,13 +1,17 @@ +mod arpa_chain; mod b3; mod base; +mod bsc; mod loot; mod main; mod op; mod redstone; mod taiko; +pub use arpa_chain::ArpaChainBLSTasksDBClient; pub use b3::B3BLSTasksDBClient; pub use base::BaseBLSTasksDBClient; +pub use bsc::BSCBLSTasksDBClient; pub use loot::LootBLSTasksDBClient; pub use main::BLSTasksDBClient; pub use op::OPBLSTasksDBClient; diff --git a/crates/dal/sqlite/src/types.rs b/crates/dal/sqlite/src/types.rs index c66632ac..f18725dc 100644 --- a/crates/dal/sqlite/src/types.rs +++ b/crates/dal/sqlite/src/types.rs @@ -5,8 +5,10 @@ use arpa_dal::cache::BLSResultCache; use arpa_dal::cache::RandomnessResultCache; use arpa_dal::error::DataAccessError; use arpa_dal::BLSResultCacheState; +use entity::arpa_chain_randomness_task; use entity::b3_randomness_task; use entity::base_randomness_task; +use entity::bsc_randomness_task; use entity::loot_randomness_task; use entity::op_randomness_task; use entity::randomness_task; @@ -210,3 +212,37 @@ pub(crate) fn b3_model_to_randomness_task(model: b3_randomness_task::Model) -> R assignment_block_height: model.assignment_block_height as usize, } } + +pub(crate) fn bsc_model_to_randomness_task(model: bsc_randomness_task::Model) -> RandomnessTask { + RandomnessTask { + request_id: model.request_id, + subscription_id: model.subscription_id as u64, + group_index: model.group_index as u32, + request_type: RandomnessRequestType::from(model.request_type as u8), + params: model.params, + requester: model.requester.parse::
().unwrap(), + seed: U256::from_big_endian(&model.seed), + request_confirmations: model.request_confirmations as u16, + callback_gas_limit: model.callback_gas_limit as u32, + callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + assignment_block_height: model.assignment_block_height as usize, + } +} + +pub(crate) fn arpa_chain_model_to_randomness_task( + model: arpa_chain_randomness_task::Model, +) -> RandomnessTask { + RandomnessTask { + request_id: model.request_id, + subscription_id: model.subscription_id as u64, + group_index: model.group_index as u32, + request_type: RandomnessRequestType::from(model.request_type as u8), + params: model.params, + requester: model.requester.parse::
().unwrap(), + seed: U256::from_big_endian(&model.seed), + request_confirmations: model.request_confirmations as u16, + callback_gas_limit: model.callback_gas_limit as u32, + callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + assignment_block_height: model.assignment_block_height as usize, + } +} diff --git a/crates/dal/src/lib.rs b/crates/dal/src/lib.rs index b7086074..7e338f6a 100644 --- a/crates/dal/src/lib.rs +++ b/crates/dal/src/lib.rs @@ -215,6 +215,7 @@ pub trait SignatureResultCacheUpdater { async fn get_ready_to_commit_signatures( &mut self, current_block_height: usize, + randomness_aggregation_waiting_block_number: usize, ) -> DataAccessResult>; async fn add( From 691ab178f2530316a1a0a023098d14d8d63c512a Mon Sep 17 00:00:00 2001 From: kafeikui Date: Thu, 26 Jun 2025 15:24:38 +0800 Subject: [PATCH 04/11] temporarily suspend scenario-test --- .github/workflows/scenario-tests-layer2.yml | 108 +++++++++---------- .github/workflows/scenario-tests.yml | 114 ++++++++++---------- 2 files changed, 111 insertions(+), 111 deletions(-) diff --git a/.github/workflows/scenario-tests-layer2.yml b/.github/workflows/scenario-tests-layer2.yml index 980811e4..8f31d229 100644 --- a/.github/workflows/scenario-tests-layer2.yml +++ b/.github/workflows/scenario-tests-layer2.yml @@ -1,64 +1,64 @@ -name: scenario-test-layer2 +# name: scenario-test-layer2 -on: - pull_request: +# on: +# pull_request: -jobs: - scenario-test-layer2: - runs-on: ubuntu-latest +# jobs: +# scenario-test-layer2: +# runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - lfs: "true" +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# with: +# lfs: "true" - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: "3.10" +# - name: Setup Python +# uses: actions/setup-python@v2 +# with: +# python-version: "3.10" - - name: Install dependencies - run: | - sudo apt-get update && \ - sudo apt-get install -y protobuf-compiler libprotobuf-dev pkg-config libssh-dev build-essential lsof git net-tools make jq && \ - pip install -r requirements.txt - working-directory: tests +# - name: Install dependencies +# run: | +# sudo apt-get update && \ +# sudo apt-get install -y protobuf-compiler libprotobuf-dev pkg-config libssh-dev build-essential lsof git net-tools make jq && \ +# pip install -r requirements.txt +# working-directory: tests - - name: Setup Go - uses: actions/setup-go@v2 - with: - go-version: "^1.20.0" +# - name: Setup Go +# uses: actions/setup-go@v2 +# with: +# go-version: "^1.20.0" - - name: Clone Optimism - run: git clone -b randcast https://github.com/Andlyn666/optimism.git --recurse-submodules - working-directory: ../ +# - name: Clone Optimism +# run: git clone -b randcast https://github.com/Andlyn666/optimism.git --recurse-submodules +# working-directory: ../ - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly-2024-05-14 - override: true - components: rustfmt, clippy +# - name: Setup Rust +# uses: actions-rs/toolchain@v1 +# with: +# toolchain: nightly-2024-05-14 +# override: true +# components: rustfmt, clippy - - name: Install Anvil - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly-5ac78a9cd4b94dc53d1fe5e0f42372b28b5a7559 - - name: start devnet - run: | - make devnet-up > op.log - working-directory: ../optimism - - name: Run Forge build - run: | - forge --version - forge build --names - id: build - working-directory: contracts - - name: Run Cargo build - run: | - cargo build +# - name: Install Anvil +# uses: foundry-rs/foundry-toolchain@v1 +# with: +# version: nightly-5ac78a9cd4b94dc53d1fe5e0f42372b28b5a7559 +# - name: start devnet +# run: | +# make devnet-up > op.log +# working-directory: ../optimism +# - name: Run Forge build +# run: | +# forge --version +# forge build --names +# id: build +# working-directory: contracts +# - name: Run Cargo build +# run: | +# cargo build - - name: run tests - run: | - robot --include l2 tests/scenarios/ +# - name: run tests +# run: | +# robot --include l2 tests/scenarios/ diff --git a/.github/workflows/scenario-tests.yml b/.github/workflows/scenario-tests.yml index 28ead041..b21f15c6 100644 --- a/.github/workflows/scenario-tests.yml +++ b/.github/workflows/scenario-tests.yml @@ -1,57 +1,57 @@ -name: scenario-test - -on: - pull_request: - -jobs: - scenario-test: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - lfs: "true" - - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - sudo apt-get update && \ - sudo apt-get install -y protobuf-compiler libprotobuf-dev pkg-config libssh-dev build-essential lsof git net-tools make jq && \ - pip install -r requirements.txt - working-directory: tests - - - name: Setup Go - uses: actions/setup-go@v2 - with: - go-version: "^1.20.0" - - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly-2024-05-14 - override: true - components: rustfmt, clippy - - - name: Install Anvil - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly-5ac78a9cd4b94dc53d1fe5e0f42372b28b5a7559 - - - name: Run Forge build - run: | - forge --version - forge build --names - id: build - working-directory: contracts - - name: Run Cargo build - run: | - cargo build - - - name: run tests - run: | - robot --include l1 tests/scenarios/ +# name: scenario-test + +# on: +# pull_request: + +# jobs: +# scenario-test: +# runs-on: ubuntu-latest + +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# with: +# lfs: "true" + +# - name: Setup Python +# uses: actions/setup-python@v2 +# with: +# python-version: "3.10" + +# - name: Install dependencies +# run: | +# sudo apt-get update && \ +# sudo apt-get install -y protobuf-compiler libprotobuf-dev pkg-config libssh-dev build-essential lsof git net-tools make jq && \ +# pip install -r requirements.txt +# working-directory: tests + +# - name: Setup Go +# uses: actions/setup-go@v2 +# with: +# go-version: "^1.20.0" + +# - name: Setup Rust +# uses: actions-rs/toolchain@v1 +# with: +# toolchain: nightly-2024-05-14 +# override: true +# components: rustfmt, clippy + +# - name: Install Anvil +# uses: foundry-rs/foundry-toolchain@v1 +# with: +# version: nightly-5ac78a9cd4b94dc53d1fe5e0f42372b28b5a7559 + +# - name: Run Forge build +# run: | +# forge --version +# forge build --names +# id: build +# working-directory: contracts +# - name: Run Cargo build +# run: | +# cargo build + +# - name: run tests +# run: | +# robot --include l1 tests/scenarios/ From 6667d2b01a5a5c5a3eef8df1c3aea3a64dfe1f1a Mon Sep 17 00:00:00 2001 From: kafeikui Date: Tue, 30 Sep 2025 23:28:41 +0800 Subject: [PATCH 05/11] integrate arbitrum stack in ChainHelper --- contracts/src/libraries/ChainHelper.sol | 133 ++++++++++++++------- contracts/src/libraries/arb/ArbGasInfo.sol | 114 ++++++++++++++++++ contracts/src/libraries/arb/ArbSys.sol | 133 +++++++++++++++++++++ 3 files changed, 338 insertions(+), 42 deletions(-) create mode 100644 contracts/src/libraries/arb/ArbGasInfo.sol create mode 100644 contracts/src/libraries/arb/ArbSys.sol diff --git a/contracts/src/libraries/ChainHelper.sol b/contracts/src/libraries/ChainHelper.sol index 9c883ebe..eecdb2dd 100644 --- a/contracts/src/libraries/ChainHelper.sol +++ b/contracts/src/libraries/ChainHelper.sol @@ -2,27 +2,61 @@ pragma solidity ^0.8.18; import {IOPGasPriceOracle} from "../interfaces/IOPGasPriceOracle.sol"; +import {ArbSys} from "./arb/ArbSys.sol"; +import {ArbGasInfo} from "./arb/ArbGasInfo.sol"; library ChainHelper { - address public constant OP_GAS_PRICE_ORACLE_ADDR = address(0x420000000000000000000000000000000000000F); - uint256 public constant OP_MAINNET_CHAIN_ID = 10; - uint256 public constant OP_SEPOLIA_TESTNET_CHAIN_ID = 11155420; - uint256 public constant OP_DEVNET_L1_CHAIN_ID = 900; - uint256 public constant OP_DEVNET_L2_CHAIN_ID = 901; - uint256 public constant BASE_MAINNET_CHAIN_ID = 8453; - uint256 public constant BASE_SEPOLIA_TESTNET_CHAIN_ID = 84532; - uint256 public constant REDSTONE_MAINNET_CHAIN_ID = 690; - uint256 public constant REDSTONE_GARNET_TESTNET_CHAIN_ID = 17069; - uint256 public constant REDSTONE_HOLESKY_TESTNET_CHAIN_ID = 17001; - uint256 public constant LOOT_MAINNET_CHAIN_ID = 5151706; - uint256 public constant LOOT_GOERLI_TESTNET_CHAIN_ID = 9088912; - uint256 public constant TAIKO_KATLA_TEST_CHAIN_ID = 167008; - uint256 public constant B3_MAINNET_CHAIN_ID = 8333; - uint256 public constant B3_TESTNET_CHAIN_ID = 1993; - uint32 public constant BASIC_FULFILLMENT_L1_GAS_USED = 5016; uint32 public constant FULFILLMENT_GAS_PER_PARTICIPANT = 652; uint256 public constant DECIMALS = 6; + uint256 public constant BLOCK_TIME_DENOMINATOR = 1000; + + uint256 private constant ETHEREUM_MAINNET_CHAIN_ID = 1; + uint256 private constant BSC_MAINNET_CHAIN_ID = 56; + uint256 private constant BSC_TESTNET_CHAIN_ID = 97; + + // Optimism + address private constant OP_GAS_PRICE_ORACLE_ADDR = address(0x420000000000000000000000000000000000000F); + + uint256 private constant OP_MAINNET_CHAIN_ID = 10; + uint256 private constant OP_SEPOLIA_TESTNET_CHAIN_ID = 11155420; + uint256 private constant OP_DEVNET_L1_CHAIN_ID = 900; + uint256 private constant OP_DEVNET_L2_CHAIN_ID = 901; + uint256 private constant BASE_MAINNET_CHAIN_ID = 8453; + uint256 private constant BASE_SEPOLIA_TESTNET_CHAIN_ID = 84532; + uint256 private constant REDSTONE_MAINNET_CHAIN_ID = 690; + uint256 private constant REDSTONE_GARNET_TESTNET_CHAIN_ID = 17069; + uint256 private constant REDSTONE_HOLESKY_TESTNET_CHAIN_ID = 17001; + uint256 private constant LOOT_MAINNET_CHAIN_ID = 5151706; + uint256 private constant LOOT_GOERLI_TESTNET_CHAIN_ID = 9088912; + uint256 private constant TAIKO_KATLA_TEST_CHAIN_ID = 167008; + uint256 private constant B3_MAINNET_CHAIN_ID = 8333; + uint256 private constant B3_TESTNET_CHAIN_ID = 1993; + + // Arbitrum + address private constant ARBSYS_ADDR = address(0x0000000000000000000000000000000000000064); + ArbSys private constant ARBSYS = ArbSys(ARBSYS_ADDR); + + address private constant ARBGAS_ADDR = address(0x000000000000000000000000000000000000006C); + ArbGasInfo private constant ARBGAS = ArbGasInfo(ARBGAS_ADDR); + + uint256 private constant ARB_MAINNET_CHAIN_ID = 42161; + uint256 private constant ARB_GOERLI_TESTNET_CHAIN_ID = 421613; + uint256 private constant ARB_SEPOLIA_TESTNET_CHAIN_ID = 421614; + uint256 private constant ARPACHAIN_MAINNET_CHAIN_ID = 4224; + + function getRequestExpirationBlockNumberDuration() public view returns (uint256) { + uint256 chainId = block.chainid; + if ( + chainId == ARB_MAINNET_CHAIN_ID || chainId == ARB_GOERLI_TESTNET_CHAIN_ID + || chainId == ARB_SEPOLIA_TESTNET_CHAIN_ID + ) { + return 1 days * BLOCK_TIME_DENOMINATOR / 250; + } else if (chainId == ARPACHAIN_MAINNET_CHAIN_ID) { + return 3600; + } + return 1 days * BLOCK_TIME_DENOMINATOR / getBlockTime(); + } function getBlockTime() public view returns (uint256) { uint256 chainId = block.chainid; @@ -32,27 +66,26 @@ library ChainHelper { || chainId == REDSTONE_HOLESKY_TESTNET_CHAIN_ID || chainId == REDSTONE_MAINNET_CHAIN_ID || chainId == REDSTONE_GARNET_TESTNET_CHAIN_ID ) { - return 2; + return 2 * BLOCK_TIME_DENOMINATOR; } else if (chainId == OP_DEVNET_L1_CHAIN_ID || chainId == TAIKO_KATLA_TEST_CHAIN_ID) { - return 3; - } else if (chainId == LOOT_MAINNET_CHAIN_ID) { - return 5; - } else if (chainId == LOOT_GOERLI_TESTNET_CHAIN_ID) { - return 200; + return 3 * BLOCK_TIME_DENOMINATOR; + } else if (chainId == LOOT_MAINNET_CHAIN_ID || chainId == LOOT_GOERLI_TESTNET_CHAIN_ID) { + return 5 * BLOCK_TIME_DENOMINATOR; } else if (chainId == B3_MAINNET_CHAIN_ID || chainId == B3_TESTNET_CHAIN_ID) { - return 1; + return 1 * BLOCK_TIME_DENOMINATOR; + } else if (chainId == BSC_MAINNET_CHAIN_ID) { + return 750; + } else if (chainId == BSC_TESTNET_CHAIN_ID) { + return 750; } - return 12; + return 12 * BLOCK_TIME_DENOMINATOR; } function getCurrentTxL1GasFees() public view returns (uint256) { uint256 chainId = block.chainid; - if ( - chainId == OP_MAINNET_CHAIN_ID || chainId == OP_SEPOLIA_TESTNET_CHAIN_ID || chainId == OP_DEVNET_L2_CHAIN_ID - || chainId == BASE_MAINNET_CHAIN_ID || chainId == BASE_SEPOLIA_TESTNET_CHAIN_ID - || chainId == REDSTONE_MAINNET_CHAIN_ID || chainId == REDSTONE_GARNET_TESTNET_CHAIN_ID - || chainId == B3_MAINNET_CHAIN_ID || chainId == B3_TESTNET_CHAIN_ID - ) { + if (_isArbitrumChainId(chainId)) { + return ARBGAS.getCurrentTxL1GasFees(); + } else if (_isOPChainId(chainId)) { return IOPGasPriceOracle(OP_GAS_PRICE_ORACLE_ADDR).getL1Fee(msg.data); } return 0; @@ -60,12 +93,12 @@ library ChainHelper { function getTxL1GasFees(uint256 l1GasUsed) public view returns (uint256) { uint256 chainId = block.chainid; - if ( - chainId == OP_MAINNET_CHAIN_ID || chainId == OP_SEPOLIA_TESTNET_CHAIN_ID || chainId == OP_DEVNET_L2_CHAIN_ID - || chainId == BASE_MAINNET_CHAIN_ID || chainId == BASE_SEPOLIA_TESTNET_CHAIN_ID - || chainId == REDSTONE_MAINNET_CHAIN_ID || chainId == REDSTONE_GARNET_TESTNET_CHAIN_ID - || chainId == B3_MAINNET_CHAIN_ID || chainId == B3_TESTNET_CHAIN_ID - ) { + if (_isArbitrumChainId(chainId)) { + (, uint256 l1PricePerByte,,,,) = ARBGAS.getPricesInWei(); + // see https://developer.arbitrum.io/devs-how-tos/how-to-estimate-gas#where-do-we-get-all-this-information-from + // for the justification behind the 140 number. + return l1PricePerByte * (l1GasUsed / 9 + 140); + } else if (_isOPChainId(chainId)) { try IOPGasPriceOracle(OP_GAS_PRICE_ORACLE_ADDR).isEcotone() returns (bool isEcotone) { if (isEcotone) { uint256 scaledBaseFee = IOPGasPriceOracle(OP_GAS_PRICE_ORACLE_ADDR).baseFeeScalar() * 16 @@ -87,14 +120,30 @@ library ChainHelper { function getFulfillmentTxL1GasUsed(uint32 groupSize) public view returns (uint256) { uint256 chainId = block.chainid; - if ( - chainId == OP_MAINNET_CHAIN_ID || chainId == OP_SEPOLIA_TESTNET_CHAIN_ID || chainId == OP_DEVNET_L2_CHAIN_ID - || chainId == BASE_MAINNET_CHAIN_ID || chainId == BASE_SEPOLIA_TESTNET_CHAIN_ID - || chainId == REDSTONE_MAINNET_CHAIN_ID || chainId == REDSTONE_GARNET_TESTNET_CHAIN_ID - || chainId == B3_MAINNET_CHAIN_ID || chainId == B3_TESTNET_CHAIN_ID - ) { + if (_isOPChainId(chainId) || _isArbitrumChainId(chainId)) { return BASIC_FULFILLMENT_L1_GAS_USED + groupSize * FULFILLMENT_GAS_PER_PARTICIPANT; } return 0; } + + function _getBlockNumber() internal view returns (uint256) { + uint256 chainid = block.chainid; + if (_isArbitrumChainId(chainid)) { + return ARBSYS.arbBlockNumber(); + } + return block.number; + } + + function _isArbitrumChainId(uint256 chainId) internal pure returns (bool) { + return chainId == ARB_MAINNET_CHAIN_ID || chainId == ARB_GOERLI_TESTNET_CHAIN_ID + || chainId == ARB_SEPOLIA_TESTNET_CHAIN_ID || chainId == ARPACHAIN_MAINNET_CHAIN_ID; + } + + function _isOPChainId(uint256 chainId) internal pure returns (bool) { + return chainId == OP_MAINNET_CHAIN_ID || chainId == OP_SEPOLIA_TESTNET_CHAIN_ID + || chainId == OP_DEVNET_L2_CHAIN_ID || chainId == BASE_MAINNET_CHAIN_ID + || chainId == BASE_SEPOLIA_TESTNET_CHAIN_ID || chainId == REDSTONE_MAINNET_CHAIN_ID + || chainId == REDSTONE_GARNET_TESTNET_CHAIN_ID || chainId == B3_MAINNET_CHAIN_ID + || chainId == B3_TESTNET_CHAIN_ID; + } } diff --git a/contracts/src/libraries/arb/ArbGasInfo.sol b/contracts/src/libraries/arb/ArbGasInfo.sol new file mode 100644 index 00000000..bcd73e33 --- /dev/null +++ b/contracts/src/libraries/arb/ArbGasInfo.sol @@ -0,0 +1,114 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity >=0.4.21 <0.9.0; + +/// @title Provides insight into the cost of using the chain. +/// @notice These methods have been adjusted to account for Nitro's heavy use of calldata compression. +/// Of note to end-users, we no longer make a distinction between non-zero and zero-valued calldata bytes. +/// Precompiled contract that exists in every Arbitrum chain at 0x000000000000000000000000000000000000006c. +interface ArbGasInfo { + /// @notice Get gas prices for a provided aggregator + /// @return return gas prices in wei + /// ( + /// per L2 tx, + /// per L1 calldata byte + /// per storage allocation, + /// per ArbGas base, + /// per ArbGas congestion, + /// per ArbGas total + /// ) + function getPricesInWeiWithAggregator(address aggregator) + external + view + returns (uint256, uint256, uint256, uint256, uint256, uint256); + + /// @notice Get gas prices. Uses the caller's preferred aggregator, or the default if the caller doesn't have a preferred one. + /// @return return gas prices in wei + /// ( + /// per L2 tx, + /// per L1 calldata byte + /// per storage allocation, + /// per ArbGas base, + /// per ArbGas congestion, + /// per ArbGas total + /// ) + function getPricesInWei() external view returns (uint256, uint256, uint256, uint256, uint256, uint256); + + /// @notice Get prices in ArbGas for the supplied aggregator + /// @return (per L2 tx, per L1 calldata byte, per storage allocation) + function getPricesInArbGasWithAggregator(address aggregator) external view returns (uint256, uint256, uint256); + + /// @notice Get prices in ArbGas. Assumes the callers preferred validator, or the default if caller doesn't have a preferred one. + /// @return (per L2 tx, per L1 calldata byte, per storage allocation) + function getPricesInArbGas() external view returns (uint256, uint256, uint256); + + /// @notice Get the gas accounting parameters. `gasPoolMax` is always zero, as the exponential pricing model has no such notion. + /// @return (speedLimitPerSecond, gasPoolMax, maxTxGasLimit) + function getGasAccountingParams() external view returns (uint256, uint256, uint256); + + /// @notice Get the minimum gas price needed for a tx to succeed + function getMinimumGasPrice() external view returns (uint256); + + /// @notice Get ArbOS's estimate of the L1 basefee in wei + function getL1BaseFeeEstimate() external view returns (uint256); + + /// @notice Get how slowly ArbOS updates its estimate of the L1 basefee + function getL1BaseFeeEstimateInertia() external view returns (uint64); + + /// @notice Get the L1 pricer reward rate, in wei per unit + /// Available in ArbOS version 11 + function getL1RewardRate() external view returns (uint64); + + /// @notice Get the L1 pricer reward recipient + /// Available in ArbOS version 11 + function getL1RewardRecipient() external view returns (address); + + /// @notice Deprecated -- Same as getL1BaseFeeEstimate() + function getL1GasPriceEstimate() external view returns (uint256); + + /// @notice Get L1 gas fees paid by the current transaction + function getCurrentTxL1GasFees() external view returns (uint256); + + /// @notice Get the backlogged amount of gas burnt in excess of the speed limit + function getGasBacklog() external view returns (uint64); + + /// @notice Get how slowly ArbOS updates the L2 basefee in response to backlogged gas + function getPricingInertia() external view returns (uint64); + + /// @notice Get the forgivable amount of backlogged gas ArbOS will ignore when raising the basefee + function getGasBacklogTolerance() external view returns (uint64); + + /// @notice Returns the surplus of funds for L1 batch posting payments (may be negative). + function getL1PricingSurplus() external view returns (int256); + + /// @notice Returns the base charge (in L1 gas) attributed to each data batch in the calldata pricer + function getPerBatchGasCharge() external view returns (int64); + + /// @notice Returns the cost amortization cap in basis points + function getAmortizedCostCapBips() external view returns (uint64); + + /// @notice Returns the available funds from L1 fees + function getL1FeesAvailable() external view returns (uint256); + + /// @notice Returns the equilibration units parameter for L1 price adjustment algorithm + /// Available in ArbOS version 20 + function getL1PricingEquilibrationUnits() external view returns (uint256); + + /// @notice Returns the last time the L1 calldata pricer was updated. + /// Available in ArbOS version 20 + function getLastL1PricingUpdateTime() external view returns (uint64); + + /// @notice Returns the amount of L1 calldata payments due for rewards (per the L1 reward rate) + /// Available in ArbOS version 20 + function getL1PricingFundsDueForRewards() external view returns (uint256); + + /// @notice Returns the amount of L1 calldata posted since the last update. + /// Available in ArbOS version 20 + function getL1PricingUnitsSinceUpdate() external view returns (uint64); + + /// @notice Returns the L1 pricing surplus as of the last update (may be negative). + /// Available in ArbOS version 20 + function getLastL1PricingSurplus() external view returns (int256); +} diff --git a/contracts/src/libraries/arb/ArbSys.sol b/contracts/src/libraries/arb/ArbSys.sol new file mode 100644 index 00000000..232dcf37 --- /dev/null +++ b/contracts/src/libraries/arb/ArbSys.sol @@ -0,0 +1,133 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity >=0.4.21 <0.9.0; + +/** + * @title System level functionality + * @notice For use by contracts to interact with core L2-specific functionality. + * Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064. + */ +interface ArbSys { + /** + * @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0) + * @return block number as int + */ + function arbBlockNumber() external view returns (uint256); + + /** + * @notice Get Arbitrum block hash (reverts unless currentBlockNum-256 <= arbBlockNum < currentBlockNum) + * @return block hash + */ + function arbBlockHash(uint256 arbBlockNum) external view returns (bytes32); + + /** + * @notice Gets the rollup's unique chain identifier + * @return Chain identifier as int + */ + function arbChainID() external view returns (uint256); + + /** + * @notice Get internal version number identifying an ArbOS build + * @return version number as int + */ + function arbOSVersion() external view returns (uint256); + + /** + * @notice Returns 0 since Nitro has no concept of storage gas + * @return uint 0 + */ + function getStorageGasAvailable() external view returns (uint256); + + /** + * @notice (deprecated) check if current call is top level (meaning it was triggered by an EoA or a L1 contract) + * @dev this call has been deprecated and may be removed in a future release + * @return true if current execution frame is not a call by another L2 contract + */ + function isTopLevelCall() external view returns (bool); + + /** + * @notice map L1 sender contract address to its L2 alias + * @param sender sender address + * @param unused argument no longer used + * @return aliased sender address + */ + function mapL1SenderContractAddressToL2Alias(address sender, address unused) external pure returns (address); + + /** + * @notice check if the caller (of this caller of this) is an aliased L1 contract address + * @return true iff the caller's address is an alias for an L1 contract address + */ + function wasMyCallersAddressAliased() external view returns (bool); + + /** + * @notice return the address of the caller (of this caller of this), without applying L1 contract address aliasing + * @return address of the caller's caller, without applying L1 contract address aliasing + */ + function myCallersAddressWithoutAliasing() external view returns (address); + + /** + * @notice Send given amount of Eth to dest from sender. + * This is a convenience function, which is equivalent to calling sendTxToL1 with empty data. + * @param destination recipient address on L1 + * @return unique identifier for this L2-to-L1 transaction. + */ + function withdrawEth(address destination) external payable returns (uint256); + + /** + * @notice Send a transaction to L1 + * @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data + * to a contract address without any code (as enforced by the Bridge contract). + * @param destination recipient address on L1 + * @param data (optional) calldata for L1 contract call + * @return a unique identifier for this L2-to-L1 transaction. + */ + function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256); + + /** + * @notice Get send Merkle tree state + * @return size number of sends in the history + * @return root root hash of the send history + * @return partials hashes of partial subtrees in the send history tree + */ + function sendMerkleTreeState() external view returns (uint256 size, bytes32 root, bytes32[] memory partials); + + /** + * @notice creates a send txn from L2 to L1 + * @param position = (level << 192) + leaf = (0 << 192) + leaf = leaf + */ + event L2ToL1Tx( + address caller, + address indexed destination, + uint256 indexed hash, + uint256 indexed position, + uint256 arbBlockNum, + uint256 ethBlockNum, + uint256 timestamp, + uint256 callvalue, + bytes data + ); + + /// @dev DEPRECATED in favour of the new L2ToL1Tx event above after the nitro upgrade + event L2ToL1Transaction( + address caller, + address indexed destination, + uint256 indexed uniqueId, + uint256 indexed batchNumber, + uint256 indexInBatch, + uint256 arbBlockNum, + uint256 ethBlockNum, + uint256 timestamp, + uint256 callvalue, + bytes data + ); + + /** + * @notice logs a merkle branch for proof synthesis + * @param reserved an index meant only to align the 4th index with L2ToL1Transaction's 4th event + * @param hash the merkle hash + * @param position = (level << 192) + leaf + */ + event SendMerkleUpdate(uint256 indexed reserved, bytes32 indexed hash, uint256 indexed position); +} From cb2c22e2ac4d930012c9127681f73f3defc1cc50 Mon Sep 17 00:00:00 2001 From: kafeikui Date: Tue, 30 Sep 2025 23:34:20 +0800 Subject: [PATCH 06/11] Support batch cancellation of expired random number requests --- contracts/src/Adapter.sol | 86 +++++++++++------------- contracts/src/interfaces/IAdapter.sol | 2 +- contracts/test/Adapter.t.sol | 94 +++++++++++++++++++++++---- 3 files changed, 118 insertions(+), 64 deletions(-) diff --git a/contracts/src/Adapter.sol b/contracts/src/Adapter.sol index 63eb1337..dcde80f7 100644 --- a/contracts/src/Adapter.sol +++ b/contracts/src/Adapter.sol @@ -20,11 +20,11 @@ contract Adapter is UUPSUpgradeable, IAdapter, IAdapterOwner, RequestIdBase, Own using Address for address; // *Constants* - uint16 public constant MAX_CONSUMERS = 100; - uint16 public constant MAX_REQUEST_CONFIRMATIONS = 200; - uint32 public constant RANDOMNESS_REWARD_GAS = 9000; - uint32 public constant VERIFICATION_GAS_OVER_MINIMUM_THRESHOLD = 50000; - uint32 public constant DEFAULT_MINIMUM_THRESHOLD = 3; + uint16 internal constant MAX_CONSUMERS = 100; + uint16 internal constant MAX_REQUEST_CONFIRMATIONS = 200; + uint32 internal constant RANDOMNESS_REWARD_GAS = 9000; + uint32 internal constant VERIFICATION_GAS_OVER_MINIMUM_THRESHOLD = 50000; + uint32 internal constant DEFAULT_MINIMUM_THRESHOLD = 3; // *State Variables* IController internal _controller; @@ -399,43 +399,15 @@ contract Adapter is UUPSUpgradeable, IAdapter, IAdapterOwner, RequestIdBase, Own _cancelSubscriptionHelper(subId, to); } - function cancelOvertimeRequest(bytes32 requestId, RequestDetail calldata requestDetail) + function cancelOvertimeRequests(bytes32[] calldata requestIds, RequestDetail[] calldata requestDetails) external override(IAdapter) - onlySubOwner(requestDetail.subId) { - if (_requestCommitments[requestId] == 0) { - revert NoCorrespondingRequest(); - } - if ( - _requestCommitments[requestId] - != keccak256( - abi.encode( - requestId, - requestDetail.subId, - requestDetail.groupIndex, - requestDetail.requestType, - requestDetail.params, - requestDetail.callbackContract, - requestDetail.seed, - requestDetail.requestConfirmations, - requestDetail.callbackGasLimit, - requestDetail.callbackMaxGasPrice, - requestDetail.blockNum - ) - ) - ) { - revert IncorrectCommitment(); - } - uint256 blockNum24H = 1 days / ChainHelper.getBlockTime(); - if (block.number < requestDetail.blockNum + blockNum24H) { - revert RequestNotExpired(); + for (uint256 i = 0; i < requestIds.length; i++) { + bytes32 requestId = requestIds[i]; + RequestDetail calldata requestDetail = requestDetails[i]; + _cancelOvertimeRequest(requestId, requestDetail); } - delete _requestCommitments[requestId]; - _subscriptions[requestDetail.subId].inflightCost -= - _subscriptions[requestDetail.subId].inflightPayments[requestId]; - delete _subscriptions[requestDetail.subId].inflightPayments[requestId]; - emit OvertimeRequestCanceled(requestId, requestDetail.subId); } function requestRandomness(RandomnessRequestParams calldata params) @@ -506,7 +478,7 @@ contract Adapter is UUPSUpgradeable, IAdapter, IAdapterOwner, RequestIdBase, Own p.requestConfirmations, p.callbackGasLimit, p.callbackMaxGasPrice, - block.number + ChainHelper._getBlockNumber() ) ); @@ -565,13 +537,13 @@ contract Adapter is UUPSUpgradeable, IAdapter, IAdapterOwner, RequestIdBase, Own revert ExceedCallbackMaxGasPrice(tx.gasprice, requestDetail.callbackMaxGasPrice); } - if (block.number < requestDetail.blockNum + requestDetail.requestConfirmations) { + if (ChainHelper._getBlockNumber() < requestDetail.blockNum + requestDetail.requestConfirmations) { revert TaskStillWithinRequestConfirmations(); } if ( groupIndex != requestDetail.groupIndex - && block.number <= requestDetail.blockNum + _config.signatureTaskExclusiveWindow + && ChainHelper._getBlockNumber() <= requestDetail.blockNum + _config.signatureTaskExclusiveWindow ) { revert TaskStillExclusive(); } @@ -780,6 +752,26 @@ contract Adapter is UUPSUpgradeable, IAdapter, IAdapterOwner, RequestIdBase, Own // Internal // ============= + function _cancelOvertimeRequest(bytes32 requestId, RequestDetail calldata requestDetail) + internal + onlySubOwner(requestDetail.subId) + { + if (_requestCommitments[requestId] == 0) { + revert NoCorrespondingRequest(); + } + if ( + ChainHelper._getBlockNumber() + < requestDetail.blockNum + ChainHelper.getRequestExpirationBlockNumberDuration() + ) { + revert RequestNotExpired(); + } + delete _requestCommitments[requestId]; + _subscriptions[requestDetail.subId].inflightCost -= + _subscriptions[requestDetail.subId].inflightPayments[requestId]; + delete _subscriptions[requestDetail.subId].inflightPayments[requestId]; + emit OvertimeRequestCanceled(requestId, requestDetail.subId); + } + function _rewardRandomness(address[] memory participantMembers, uint256 payment, uint256 flatFee) internal { _cumulativeCommitterReward += _config.committerRewardPerSignature; _cumulativePartialSignatureReward += _config.rewardPerSignature * participantMembers.length; @@ -833,11 +825,9 @@ contract Adapter is UUPSUpgradeable, IAdapter, IAdapterOwner, RequestIdBase, Own if (_flatFeeConfig.isFlatFeePromotionEnabledPermanently) { reqCount = sub.reqCount; } else if ( - _flatFeeConfig - //solhint-disable-next-line not-rely-on-time - .flatFeePromotionStartTimestamp <= block.timestamp //solhint-disable-next-line not-rely-on-time - && block.timestamp <= _flatFeeConfig.flatFeePromotionEndTimestamp + _flatFeeConfig.flatFeePromotionStartTimestamp <= block.timestamp + && block.timestamp <= _flatFeeConfig.flatFeePromotionEndTimestamp ) { if (sub.lastRequestTimestamp < _flatFeeConfig.flatFeePromotionStartTimestamp) { reqCount = 1; @@ -884,11 +874,9 @@ contract Adapter is UUPSUpgradeable, IAdapter, IAdapterOwner, RequestIdBase, Own if (_flatFeeConfig.isFlatFeePromotionEnabledPermanently) { reqCount = sub.reqCount; } else if ( - _flatFeeConfig - //solhint-disable-next-line not-rely-on-time - .flatFeePromotionStartTimestamp <= block.timestamp //solhint-disable-next-line not-rely-on-time - && block.timestamp <= _flatFeeConfig.flatFeePromotionEndTimestamp + _flatFeeConfig.flatFeePromotionStartTimestamp <= block.timestamp + && block.timestamp <= _flatFeeConfig.flatFeePromotionEndTimestamp ) { if (sub.lastRequestTimestamp < _flatFeeConfig.flatFeePromotionStartTimestamp) { sub.reqCountInCurrentPeriod = 1; diff --git a/contracts/src/interfaces/IAdapter.sol b/contracts/src/interfaces/IAdapter.sol index 75f86a1d..2604f259 100644 --- a/contracts/src/interfaces/IAdapter.sol +++ b/contracts/src/interfaces/IAdapter.sol @@ -60,7 +60,7 @@ interface IAdapter is IRequestTypeBase { function removeConsumer(uint64 subId, address consumer) external; // delete the request that cannot be fulfilled, triggered by user themselves - function cancelOvertimeRequest(bytes32 requestId, RequestDetail calldata requestDetail) external; + function cancelOvertimeRequests(bytes32[] memory requestIds, RequestDetail[] calldata requestDetails) external; // View function getLastSubscription(address consumer) external view returns (uint64); diff --git a/contracts/test/Adapter.t.sol b/contracts/test/Adapter.t.sol index e7290ec6..9839cc72 100644 --- a/contracts/test/Adapter.t.sol +++ b/contracts/test/Adapter.t.sol @@ -4,23 +4,33 @@ pragma solidity ^0.8.18; import {GetRandomNumberExample} from "Randcast-User-Contract/user/examples/GetRandomNumberExample.sol"; import {RandcastTestHelper, IAdapter, AdapterForTest} from "./RandcastTestHelper.sol"; import {Adapter} from "../src/Adapter.sol"; +import {IRequestTypeBase} from "../src/interfaces/IRequestTypeBase.sol"; // solhint-disable-next-line max-states-count contract AdapterTest is RandcastTestHelper { + // *Constants* + uint16 internal constant MAX_CONSUMERS = 100; + uint16 internal constant MAX_REQUEST_CONFIRMATIONS = 200; + uint32 internal constant RANDOMNESS_REWARD_GAS = 9000; + uint32 internal constant VERIFICATION_GAS_OVER_MINIMUM_THRESHOLD = 50000; + uint32 internal constant DEFAULT_MINIMUM_THRESHOLD = 3; + GetRandomNumberExample internal _getRandomNumberExample; uint64 internal _subId; uint256 internal _plentyOfEthBalance = 1e6 * 1e18; function setUp() public { - _minimumRequestConfirmations = 3; - skip(1000); - _prepareRandcastContracts(); - - vm.prank(_user); - _getRandomNumberExample = new GetRandomNumberExample(address(_adapter)); - - _subId = _prepareSubscription(_user, address(_getRandomNumberExample), _plentyOfEthBalance); + // _minimumRequestConfirmations = 3; + // skip(1000); + // _prepareRandcastContracts(); + // vm.prank(_user); + // _getRandomNumberExample = new GetRandomNumberExample(address(_adapter)); + // _subId = _prepareSubscription( + // _user, + // address(_getRandomNumberExample), + // _plentyOfEthBalance + // ); } function testAdapterAddress() public { @@ -58,10 +68,8 @@ contract AdapterTest is RandcastTestHelper { // 0 flat fee until the first request is actually fulfilled uint256 payment = IAdapter(address(_adapter)).estimatePaymentAmountInETH( - _getRandomNumberExample.callbackGasLimit() - + Adapter(address(_adapter)).RANDOMNESS_REWARD_GAS() * uint32(groupSize) - + Adapter(address(_adapter)).VERIFICATION_GAS_OVER_MINIMUM_THRESHOLD() - * (uint32(groupSize) - Adapter(address(_adapter)).DEFAULT_MINIMUM_THRESHOLD()), + _getRandomNumberExample.callbackGasLimit() + RANDOMNESS_REWARD_GAS * uint32(groupSize) + + VERIFICATION_GAS_OVER_MINIMUM_THRESHOLD * (uint32(groupSize) - DEFAULT_MINIMUM_THRESHOLD), _gasExceptCallback, 0, tx.gasprice * 3, @@ -135,14 +143,18 @@ contract AdapterTest is RandcastTestHelper { vm.chainId(1); vm.prank(_user); vm.expectRevert(abi.encodeWithSelector(Adapter.RequestNotExpired.selector)); - IAdapter(address(_adapter)).cancelOvertimeRequest(requestId, rd); + bytes32[] memory requestIds = new bytes32[](1); + requestIds[0] = requestId; + IAdapter.RequestDetail[] memory requestDetails = new IAdapter.RequestDetail[](1); + requestDetails[0] = rd; + IAdapter(address(_adapter)).cancelOvertimeRequests(requestIds, requestDetails); (,,, inflightCost,,,,,) = IAdapter(address(_adapter)).getSubscription(_subId); assertEq(inflightCost > 0, true); vm.roll(block.number + 7200); vm.prank(_user); - IAdapter(address(_adapter)).cancelOvertimeRequest(requestId, rd); + IAdapter(address(_adapter)).cancelOvertimeRequests(requestIds, requestDetails); pendingRequest = IAdapter(address(_adapter)).getPendingRequestCommitment(requestId); assertEq(pendingRequest, bytes32(0)); @@ -157,4 +169,58 @@ contract AdapterTest is RandcastTestHelper { vm.expectRevert(abi.encodeWithSelector(Adapter.InvalidSubscription.selector)); IAdapter(address(_adapter)).getSubscription(_subId); } + + function testRequestCommitmentCalculation() public { + // assignment_block_height":157,"callback_gas_limit":333333,"callback_max_gas_price":"30000000","group_index":0,"params":"0x","request_confirmations":1,"request_id":"0xed3a3595ddd231a1f0de1015e7d1b7c539182469602d19dd4e34888cb43e1032","request_type":"Randomness","requester":"0xd25250c391d8bc31b7fa0a1cdf7085a48bf43037","seed":"8086209871215195747191914394033118619853479847457156658096147472139968554372","subscription_id":1 + // Test data + bytes32 requestId = bytes32(0xed3a3595ddd231a1f0de1015e7d1b7c539182469602d19dd4e34888cb43e1032); + uint64 subId = 1; + uint32 groupIndex = 0; + // IRequestTypeBase.RequestType requestType = IRequestTypeBase.RequestType.Randomness; + bytes memory params = ""; + address callbackContract = address(0xD25250C391d8bc31B7fa0a1CDF7085a48BF43037); + uint256 seed = 8086209871215195747191914394033118619853479847457156658096147472139968554372; + uint16 requestConfirmations = 1; + uint32 callbackGasLimit = 333333; + uint256 callbackMaxGasPrice = 30000000; + uint256 blockNum = 29004430; //157; + + bytes32 expectedCommitment = keccak256( + abi.encode( + requestId, + subId, + groupIndex, + 0, + params, + callbackContract, + seed, + requestConfirmations, + callbackGasLimit, + callbackMaxGasPrice, + blockNum + ) + ); + emit log_bytes32(expectedCommitment); + + // for (uint256 i = 0; i < 157; i++) { + // blockNum = i; + // // Calculate expected commitment + // bytes32 expectedCommitment = keccak256( + // abi.encode( + // requestId, + // subId, + // groupIndex, + // 0, + // params, + // callbackContract, + // seed, + // requestConfirmations, + // callbackGasLimit, + // callbackMaxGasPrice, + // blockNum + // ) + // ); + // emit log_bytes32(expectedCommitment); + // } + } } From 6308fedd6b78dbcae5fd3ee9dedcc9e7bad9ce05 Mon Sep 17 00:00:00 2001 From: kafeikui Date: Thu, 9 Oct 2025 15:21:30 +0800 Subject: [PATCH 07/11] - adapt to alloy from ethers-rs - bump version to 0.4.0-alpha.1 --- .gitignore | 3 +- Cargo.lock | 4069 ++-- Cargo.toml | 25 +- crates/arpa-node/Cargo.toml | 17 +- crates/arpa-node/build.rs | 7 +- crates/arpa-node/src/committer/client.rs | 4 +- crates/arpa-node/src/committer/mod.rs | 4 +- crates/arpa-node/src/committer/server.rs | 10 +- crates/arpa-node/src/context/chain/mod.rs | 2 +- crates/arpa-node/src/context/chain/types.rs | 8 +- crates/arpa-node/src/context/mod.rs | 6 +- crates/arpa-node/src/context/types.rs | 8 +- crates/arpa-node/src/error/mod.rs | 8 +- crates/arpa-node/src/event/dkg_success.rs | 6 +- crates/arpa-node/src/event/new_block.rs | 4 +- crates/arpa-node/src/event/new_dkg_task.rs | 4 +- .../src/event/new_randomness_task.rs | 4 +- crates/arpa-node/src/event/node_activation.rs | 6 +- .../src/event/provider_reconnection.rs | 4 +- .../event/ready_to_fulfill_randomness_task.rs | 4 +- .../event/ready_to_handle_randomness_task.rs | 4 +- crates/arpa-node/src/event/types.rs | 14 +- crates/arpa-node/src/lib.rs | 2 + crates/arpa-node/src/listener/block.rs | 79 +- crates/arpa-node/src/listener/mod.rs | 8 +- .../src/listener/new_randomness_task.rs | 13 +- .../src/listener/post_commit_grouping.rs | 30 +- .../arpa-node/src/listener/post_grouping.rs | 32 +- crates/arpa-node/src/listener/pre_grouping.rs | 28 +- .../randomness_signature_aggregation.rs | 61 +- .../ready_to_handle_randomness_task.rs | 17 +- .../src/listener/schedule_node_activation.rs | 11 +- .../schedule_provider_reconnection.rs | 47 +- crates/arpa-node/src/management/mod.rs | 19 +- crates/arpa-node/src/management/server.rs | 52 +- crates/arpa-node/src/node_client.rs | 72 +- crates/arpa-node/src/node_config_checker.rs | 1 - crates/arpa-node/src/node_shell.rs | 502 +- crates/arpa-node/src/queue/event_queue.rs | 39 +- crates/arpa-node/src/stats/mod.rs | 41 +- crates/arpa-node/src/subscriber/block.rs | 6 +- .../arpa-node/src/subscriber/in_grouping.rs | 19 +- .../arpa-node/src/subscriber/post_grouping.rs | 17 +- .../src/subscriber/post_success_grouping.rs | 2 +- .../arpa-node/src/subscriber/pre_grouping.rs | 2 +- .../randomness_signature_aggregation.rs | 16 +- .../ready_to_handle_randomness_task.rs | 10 +- .../subscriber/schedule_node_activation.rs | 20 +- crates/contract-client/Cargo.toml | 14 +- crates/contract-client/abi/Controller.json | 18937 +++++++++++++++- .../contract-client/abi/IServiceManager.json | 1 + crates/contract-client/build.rs | 31 - crates/contract-client/proto/adapter.proto | 86 - crates/contract-client/proto/controller.proto | 77 - .../contract-client/proto/coordinator.proto | 53 - crates/contract-client/src/error.rs | 18 +- crates/contract-client/src/ethers/adapter.rs | 137 +- .../src/ethers/avs_directory.rs | 8 + .../contract-client/src/ethers/controller.rs | 183 +- .../src/ethers/controller_oracle.rs | 115 +- .../src/ethers/controller_relayer.rs | 41 +- .../contract-client/src/ethers/coordinator.rs | 189 +- crates/contract-client/src/ethers/ierc20.rs | 8 + crates/contract-client/src/ethers/mod.rs | 199 +- .../src/ethers/node_registry.rs | 117 +- crates/contract-client/src/ethers/provider.rs | 15 +- .../src/ethers/service_manager.rs | 8 + crates/contract-client/src/ethers/staking.rs | 8 + crates/contract-client/src/lib.rs | 167 +- crates/core/Cargo.toml | 12 +- crates/core/src/log/encoder.rs | 6 +- crates/core/src/log/mod.rs | 63 +- crates/core/src/types/config.rs | 86 +- crates/core/src/types/contract.rs | 4 +- crates/core/src/types/error.rs | 10 +- crates/core/src/types/identity/gas_filler.rs | 407 + .../core/src/types/identity/gas_middleware.rs | 131 - crates/core/src/types/identity/mod.rs | 31 +- crates/core/src/types/identity/types.rs | 243 +- crates/core/src/types/node.rs | 9 +- crates/core/src/utils/mod.rs | 118 +- crates/dal/Cargo.toml | 2 +- crates/dal/sqlite/Cargo.toml | 6 +- crates/dal/sqlite/migration/Cargo.toml | 2 +- crates/dal/sqlite/src/group.rs | 2 +- crates/dal/sqlite/src/lib.rs | 17 +- crates/dal/sqlite/src/node.rs | 2 +- crates/dal/sqlite/src/result/arpa_chain.rs | 2 +- crates/dal/sqlite/src/result/b3.rs | 2 +- crates/dal/sqlite/src/result/base.rs | 2 +- crates/dal/sqlite/src/result/bsc.rs | 2 +- crates/dal/sqlite/src/result/loot.rs | 2 +- crates/dal/sqlite/src/result/main.rs | 2 +- crates/dal/sqlite/src/result/op.rs | 2 +- crates/dal/sqlite/src/result/redstone.rs | 2 +- crates/dal/sqlite/src/result/taiko.rs | 2 +- crates/dal/sqlite/src/task/arpa_chain.rs | 8 +- crates/dal/sqlite/src/task/b3.rs | 8 +- crates/dal/sqlite/src/task/base.rs | 8 +- crates/dal/sqlite/src/task/bsc.rs | 8 +- crates/dal/sqlite/src/task/loot.rs | 8 +- crates/dal/sqlite/src/task/main.rs | 25 +- crates/dal/sqlite/src/task/op.rs | 25 +- crates/dal/sqlite/src/task/redstone.rs | 8 +- crates/dal/sqlite/src/task/taiko.rs | 8 +- crates/dal/sqlite/src/types.rs | 114 +- crates/dal/src/cache.rs | 8 +- crates/dal/src/error.rs | 2 +- crates/dal/src/lib.rs | 4 +- crates/dkg-core/src/lib.rs | 1 - crates/dkg-core/src/primitives/common.rs | 6 +- .../dkg-core/src/primitives/joint_feldman.rs | 3 +- crates/dkg-core/src/primitives/resharing.rs | 3 +- crates/log/Cargo.toml | 2 +- crates/log/impl/src/lib.rs | 1 - crates/log/src/lib.rs | 33 +- crates/threshold-bls/Cargo.toml | 12 +- crates/threshold-bls/src/curve/bls12381.rs | 61 +- crates/threshold-bls/src/curve/bn254.rs | 36 +- crates/threshold-bls/src/curve/mod.rs | 5 +- crates/threshold-bls/src/group.rs | 4 +- crates/threshold-bls/src/hash/hasher.rs | 4 +- crates/threshold-bls/src/hash/mod.rs | 30 +- .../src/hash/try_and_increment.rs | 27 +- crates/threshold-bls/src/poly.rs | 6 +- crates/threshold-bls/src/serialize/mod.rs | 43 +- crates/threshold-bls/src/sig/bls.rs | 3 +- crates/threshold-bls/src/sig/sig.rs | 1 - crates/threshold-bls/src/test_bls.rs | 36 +- crates/user-cli/Cargo.toml | 2 +- crates/user-cli/src/config.rs | 51 +- crates/user-cli/src/lib.rs | 1 + crates/user-cli/src/user_shell.rs | 848 +- rust-toolchain | 1 - rust-toolchain.toml | 2 + 135 files changed, 24365 insertions(+), 4039 deletions(-) create mode 100644 crates/contract-client/abi/IServiceManager.json delete mode 100644 crates/contract-client/build.rs delete mode 100644 crates/contract-client/proto/adapter.proto delete mode 100644 crates/contract-client/proto/controller.proto delete mode 100644 crates/contract-client/proto/coordinator.proto create mode 100644 crates/contract-client/src/ethers/avs_directory.rs create mode 100644 crates/contract-client/src/ethers/ierc20.rs create mode 100644 crates/contract-client/src/ethers/service_manager.rs create mode 100644 crates/contract-client/src/ethers/staking.rs create mode 100644 crates/core/src/types/identity/gas_filler.rs delete mode 100644 crates/core/src/types/identity/gas_middleware.rs delete mode 100644 rust-toolchain create mode 100644 rust-toolchain.toml diff --git a/.gitignore b/.gitignore index 04baf9a6..cad4aabe 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,5 @@ passwd /tests/scenarios/src/environment/node_config /contracts/output/ -*.log \ No newline at end of file +*.log +*.keystore \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 328fe955..d9eef3a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,16 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] +version = 4 [[package]] name = "actix-codec" @@ -45,12 +35,12 @@ dependencies = [ "brotli", "bytes", "bytestring", - "derive_more", + "derive_more 0.99.17", "encoding_rs", "flate2", "futures-core", - "h2", - "http", + "h2 0.3.26", + "http 0.2.12", "httparse", "httpdate", "itoa", @@ -65,7 +55,7 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "zstd 0.13.1", + "zstd", ] [[package]] @@ -75,7 +65,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -85,7 +75,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d22475596539443685426b6bdadb926ad0ecaefdfc5fb05e5e3441f15463c511" dependencies = [ "bytestring", - "http", + "http 0.2.12", "regex", "serde", "tracing", @@ -159,7 +149,7 @@ dependencies = [ "bytestring", "cfg-if", "cookie", - "derive_more", + "derive_more 0.99.17", "encoding_rs", "futures-core", "futures-util", @@ -188,7 +178,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -232,7 +222,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -244,7 +234,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -287,320 +277,1258 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] -name = "android-tzdata" -version = "0.1.1" +name = "alloy" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" +checksum = "67031be093311a96afdd146fb5de209ceaf0f347f2284ed71902368cd15a77ff" +dependencies = [ + "alloy-consensus", + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-network", + "alloy-node-bindings", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "alloy-trie", +] + +[[package]] +name = "alloy-chains" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "f3008b4f680adca5a81fad5f6cdbb561cca0cee7e97050756c2c1f3e41d2103c" dependencies = [ - "libc", + "alloy-primitives", + "num_enum", + "strum 0.27.2", ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "alloy-consensus" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "0cd9d29a6a0bb8d4832ff7685dcbb430011b832f2ccec1af9571a0e75c1f7e9c" dependencies = [ - "winapi", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-trie", + "alloy-tx-macros", + "auto_impl", + "c-kzg", + "derive_more 2.0.1", + "either", + "k256", + "once_cell", + "rand 0.8.5", + "secp256k1", + "serde", + "serde_json", + "serde_with", + "thiserror 2.0.16", ] [[package]] -name = "anstream" -version = "0.6.14" +name = "alloy-consensus-any" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "ce038cb325f9a85a10fb026fb1b70cb8c62a004d85d22f8516e5d173e3eec612" dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "serde", ] [[package]] -name = "anstyle" -version = "1.0.7" +name = "alloy-contract" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "a376305e5c3b3285e84a553fa3f9aee4f5f0e1b0aad4944191b843cd8228788d" +dependencies = [ + "alloy-consensus", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "serde_json", + "thiserror 2.0.16", +] [[package]] -name = "anstyle-parse" -version = "0.2.4" +name = "alloy-core" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "bfe6c56d58fbfa9f0f6299376e8ce33091fc6494239466814c3f54b55743cb09" dependencies = [ - "utf8parse", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", ] [[package]] -name = "anstyle-query" -version = "1.0.3" +name = "alloy-dyn-abi" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "a3f56873f3cac7a2c63d8e98a4314b8311aa96adb1a0f82ae923eb2119809d2c" dependencies = [ - "windows-sys 0.52.0", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "itoa", + "serde", + "serde_json", + "winnow 0.7.13", ] [[package]] -name = "anstyle-wincon" -version = "3.0.3" +name = "alloy-eip2124" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "741bdd7499908b3aa0b159bba11e71c8cddd009a2c2eb7a06e825f1ec87900a5" dependencies = [ - "anstyle", - "windows-sys 0.52.0", + "alloy-primitives", + "alloy-rlp", + "crc", + "serde", + "thiserror 2.0.16", ] [[package]] -name = "anyhow" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" - -[[package]] -name = "arc-swap" -version = "1.7.1" +name = "alloy-eip2930" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +checksum = "7b82752a889170df67bbb36d42ca63c531eb16274f0d7299ae2a680facba17bd" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] [[package]] -name = "ark-bls12-381" -version = "0.3.0" +name = "alloy-eip7702" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65be532f9dd1e98ad0150b037276cde464c6f371059e6dd02c0222395761f6aa" +checksum = "9d4769c6ffddca380b0070d71c8b7f30bed375543fe76bb2f74ec0acf4b7cd16" dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", + "alloy-primitives", + "alloy-rlp", + "k256", + "serde", + "thiserror 2.0.16", ] [[package]] -name = "ark-bn254" -version = "0.3.0" +name = "alloy-eips" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea691771ebbb28aea556c044e2e5c5227398d840cee0c34d4d20fa8eb2689e8c" +checksum = "4bfec530782b30151e2564edf3c900f1fa6852128b7a993e458e8e3815d8b915" dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", + "alloy-eip2124", + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "auto_impl", + "c-kzg", + "derive_more 2.0.1", + "either", + "serde", + "serde_with", + "sha2 0.10.8", + "thiserror 2.0.16", ] [[package]] -name = "ark-ec" -version = "0.3.0" +name = "alloy-genesis" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea978406c4b1ca13c2db2373b05cc55429c3575b8b21f1b9ee859aa5b03dd42" +checksum = "956e6a23eb880dd93123e8ebea028584325b9af22f991eec2c499c54c277c073" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "num-traits", - "zeroize", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "alloy-trie", + "serde", + "serde_with", ] [[package]] -name = "ark-ff" -version = "0.3.0" +name = "alloy-hardforks" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +checksum = "3165210652f71dfc094b051602bafd691f506c54050a174b1cba18fb5ef706a3" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", - "derivative", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.3.3", - "zeroize", + "alloy-chains", + "alloy-eip2124", + "alloy-primitives", + "auto_impl", + "dyn-clone", ] [[package]] -name = "ark-ff-asm" -version = "0.3.0" +name = "alloy-json-abi" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +checksum = "125a1c373261b252e53e04d6e92c37d881833afc1315fceab53fd46045695640" dependencies = [ - "quote", - "syn 1.0.109", + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", ] [[package]] -name = "ark-ff-macros" -version = "0.3.0" +name = "alloy-json-rpc" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +checksum = "be436893c0d1f7a57d1d8f1b6b9af9db04174468410b7e6e1d1893e78110a3bc" dependencies = [ - "num-bigint", - "num-traits", - "quote", - "syn 1.0.109", + "alloy-primitives", + "alloy-sol-types", + "http 1.3.1", + "serde", + "serde_json", + "thiserror 2.0.16", + "tracing", ] [[package]] -name = "ark-serialize" -version = "0.3.0" +name = "alloy-network" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" -dependencies = [ - "ark-serialize-derive", - "ark-std", - "digest 0.9.0", +checksum = "f18959e1a1b40e05578e7a705f65ff4e6b354e38335da4b33ccbee876bde7c26" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "derive_more 2.0.1", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.16", ] [[package]] -name = "ark-serialize-derive" -version = "0.3.0" +name = "alloy-network-primitives" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd4e5f0bf8285d5ed538d27fab7411f3e297908fd93c62195de8bee3f199e82" +checksum = "1da0037ac546c0cae2eb776bed53687b7bbf776f4e7aa2fea0b8b89e734c319b" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", ] [[package]] -name = "ark-std" -version = "0.3.0" +name = "alloy-node-bindings" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +checksum = "fd89c9e72e62d95b51be0b92468282526b37d3d1015f5e31069a35c2e020872f" dependencies = [ - "num-traits", + "alloy-genesis", + "alloy-hardforks", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "alloy-signer-local", + "k256", "rand 0.8.5", + "serde_json", + "tempfile", + "thiserror 2.0.16", + "tracing", + "url", ] [[package]] -name = "arpa-contract-client" -version = "0.3.0-alpha.2" +name = "alloy-primitives" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9485c56de23438127a731a6b4c87803d49faf1a7068dcd1d8768aca3a9edb9" dependencies = [ - "anyhow", - "arpa-core", - "async-trait", - "bincode", - "dkg-core", - "ethers", - "ethers-contract-abigen", - "log", - "prost", - "prost-build", - "rustc-hex", + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 2.0.1", + "foldhash", + "hashbrown 0.15.5", + "indexmap 2.11.4", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest 1.6.0", + "rand 0.9.2", + "ruint", + "rustc-hash", "serde", - "simple_logger", - "thiserror", - "threshold-bls", - "tokio", - "tokio-retry", - "tonic", - "tonic-build", + "sha3", + "tiny-keccak", ] [[package]] -name = "arpa-core" -version = "0.3.0-alpha.2" -dependencies = [ - "anyhow", +name = "alloy-provider" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca97e31bc05bd6d4780254fbb60b16d33b3548d1c657a879fffb0e7ebb642e9" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-node-bindings", + "alloy-primitives", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types-anvil", + "alloy-rpc-types-debug", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-rpc-types-txpool", + "alloy-signer", + "alloy-sol-types", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "async-stream", "async-trait", - "bincode", - "chrono", - "ethers-core", - "ethers-middleware", - "ethers-providers", - "ethers-signers", - "lazy_static", - "log", - "log-mdc", - "log4rs", + "auto_impl", + "dashmap", + "either", + "futures", + "futures-utils-wasm", + "lru", "parking_lot", + "pin-project", + "reqwest 0.12.5", "serde", "serde_json", - "serde_yaml 0.8.26", - "thiserror", - "thread-id", - "threshold-bls", + "thiserror 2.0.16", + "tokio", + "tracing", + "url", + "wasmtimer", ] [[package]] -name = "arpa-dal" -version = "0.3.0-alpha.2" +name = "alloy-pubsub" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7bb37096e97de25133cf904e08df2aa72168af64f429e3c43a112649e131930" dependencies = [ - "anyhow", - "arpa-core", - "async-trait", - "bincode", - "dkg-core", - "ethers-core", - "log", - "log-mdc", + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "auto_impl", + "bimap", + "futures", + "parking_lot", "serde", "serde_json", - "thiserror", - "threshold-bls", "tokio", + "tokio-stream", + "tower", + "tracing", + "wasmtimer", ] [[package]] -name = "arpa-log" -version = "0.3.0-alpha.2" +name = "alloy-rlp" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f70d83b765fdc080dbcd4f4db70d8d23fe4761f2f02ebfa9146b833900634b4" dependencies = [ - "anyhow", - "arpa-log-impl", - "async-trait", - "log", - "log-mdc", - "once_cell", - "parking_lot", - "serde", - "serde_json", - "tokio", + "alloy-rlp-derive", + "arrayvec", + "bytes", ] [[package]] -name = "arpa-log-impl" -version = "0.3.0-alpha.2" +name = "alloy-rlp-derive" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64b728d511962dda67c1bc7ea7c03736ec275ed2cf4c35d9585298ac9ccf3b73" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.106", ] [[package]] -name = "arpa-node" -version = "0.3.0-alpha.2" +name = "alloy-rpc-client" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbeeeffa0bb7e95cb79f2b4b46b591763afeccfa9a797183c1b192377ffb6fac" dependencies = [ - "actix-web", - "anyhow", - "arpa-contract-client", - "arpa-core", - "arpa-dal", - "arpa-log", - "arpa-node", - "arpa-sqlite-db", - "async-trait", + "alloy-json-rpc", + "alloy-primitives", + "alloy-pubsub", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "futures", + "pin-project", + "reqwest 0.12.5", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rpc-types" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21fe4c370b9e733d884ffd953eb6d654d053b1b22e26ffd591ef597a9e2bc49" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-anvil", + "alloy-rpc-types-debug", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-rpc-types-txpool", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-anvil" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb44412ed075c19d37698f33213b83f0bf8ccc2d4e928527f2622555a31723de" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65423baf6af0ff356e254d7824b3824aa34d8ca9bd857a4e298f74795cc4b69d" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", +] + +[[package]] +name = "alloy-rpc-types-debug" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27eaa6c63f551e35f835638397ce5c66d2ba14d0b17ce3bb286842e815b0fc94" +dependencies = [ + "alloy-primitives", + "derive_more 2.0.1", + "serde", + "serde_with", +] + +[[package]] +name = "alloy-rpc-types-engine" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5dc8a9ba66f1a654d935584200fcd0b7fd34dac0ca19df024911899066b0583" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "derive_more 2.0.1", + "rand 0.8.5", + "serde", + "strum 0.27.2", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "848f8ea4063bed834443081d77f840f31075f68d0d49723027f5a209615150bf" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.14.0", + "serde", + "serde_json", + "serde_with", + "thiserror 2.0.16", +] + +[[package]] +name = "alloy-rpc-types-trace" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c632e12fb9bbde97eb2a0f5145f0fe6e0ed1b3927de29d8463ab468905d9843" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", + "serde_json", + "thiserror 2.0.16", +] + +[[package]] +name = "alloy-rpc-types-txpool" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cbe0913689d8e3939a5da4bfb7a898309d87419cf98f8e670332130340b3e7" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-serde" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19c3835bdc128f2f3418f5d6c76aec63a245d72973e0eaacc9720aa0787225c5" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42084a7b455ef0b94ed201b7494392a759c3e20faac2d00ded5d5762fcf71dee" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "either", + "elliptic-curve", + "k256", + "thiserror 2.0.16", +] + +[[package]] +name = "alloy-signer-local" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6312ccc048a4a88aed7311fc448a2e23da55c60c2b3b6dcdb794f759d02e49d7" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "coins-bip32", + "coins-bip39", + "eth-keystore", + "k256", + "rand 0.8.5", + "thiserror 2.0.16", + "zeroize", +] + +[[package]] +name = "alloy-sol-macro" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d20d867dcf42019d4779519a1ceb55eba8d7f3d0e4f0a89bcba82b8f9eb01e48" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b74e91b0b553c115d14bd0ed41898309356dc85d0e3d4b9014c4e7715e48c8ad" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck 0.5.0", + "indexmap 2.11.4", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.106", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84194d31220803f5f62d0a00f583fd3a062b36382e2bea446f1af96727754565" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck 0.5.0", + "macro-string", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.106", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe8c27b3cf6b2bb8361904732f955bc7c05e00be5f469cec7e2280b6167f3ff0" +dependencies = [ + "serde", + "winnow 0.7.13", +] + +[[package]] +name = "alloy-sol-types" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5383d34ea00079e6dd89c652bcbdb764db160cef84e6250926961a0b2295d04" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f77fa71f6dad3aa9b97ab6f6e90f257089fb9eaa959892d153a1011618e2d6" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "auto_impl", + "base64 0.22.1", + "derive_more 2.0.1", + "futures", + "futures-utils-wasm", + "parking_lot", + "serde", + "serde_json", + "thiserror 2.0.16", + "tokio", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-transport-http" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1a5d0f5dd5e07187a4170bdcb7ceaff18b1133cd6b8585bc316ab442cd78a" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest 0.12.5", + "serde_json", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-ipc" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62764e672967d7f8a890c3d28c9c9a9fc781fba59e5d869898b08073c9deae3a" +dependencies = [ + "alloy-json-rpc", + "alloy-pubsub", + "alloy-transport", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde", + "serde_json", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "alloy-transport-ws" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a21442472bad4494cfb1f11d975ae83059882a11cdda6a3aa8c0d2eb444beb6" +dependencies = [ + "alloy-pubsub", + "alloy-transport", + "futures", + "http 1.3.1", + "rustls 0.23.31", + "serde_json", + "tokio", + "tokio-tungstenite", + "tracing", + "ws_stream_wasm", +] + +[[package]] +name = "alloy-trie" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3412d52bb97c6c6cc27ccc28d4e6e8cf605469101193b50b0bd5813b1f990b5" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arrayvec", + "derive_more 2.0.1", + "nybbles", + "serde", + "smallvec", + "tracing", +] + +[[package]] +name = "alloy-tx-macros" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc79013f9ac3a8ddeb60234d43da09e6d6abfc1c9dd29d3fe97adfbece3f4a08" +dependencies = [ + "alloy-primitives", + "darling", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" + +[[package]] +name = "arc-swap" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" + +[[package]] +name = "ark-bls12-381" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-bn254" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash 0.8.11", + "ark-ff 0.5.0", + "ark-poly", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.5", + "itertools 0.13.0", + "num-bigint", + "num-integer", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "educe", + "itertools 0.13.0", + "num-bigint", + "num-traits", + "paste", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.106", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash 0.8.11", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.5", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arpa-contract-client" +version = "0.4.0-alpha.1" +dependencies = [ + "alloy", + "anyhow", + "arpa-core", + "async-trait", + "bincode", + "dkg-core", + "futures-util", + "log", + "prost", + "rand 0.8.5", + "rustc-hex", + "serde", + "simple_logger", + "thiserror 1.0.69", + "threshold-bls", + "tokio", + "tokio-retry", + "tonic", +] + +[[package]] +name = "arpa-core" +version = "0.4.0-alpha.1" +dependencies = [ + "alloy", + "anyhow", + "async-trait", + "bincode", + "chrono", + "futures-util", + "lazy_static", + "log", + "log-mdc", + "log4rs", + "parking_lot", + "rand 0.8.5", + "serde", + "serde_json", + "serde_yaml 0.8.26", + "thiserror 1.0.69", + "thread-id", + "threshold-bls", + "tokio", +] + +[[package]] +name = "arpa-dal" +version = "0.4.0-alpha.1" +dependencies = [ + "alloy", + "anyhow", + "arpa-core", + "async-trait", + "bincode", + "dkg-core", + "log", + "log-mdc", + "serde", + "serde_json", + "thiserror 1.0.69", + "threshold-bls", + "tokio", +] + +[[package]] +name = "arpa-log" +version = "0.4.0-alpha.1" +dependencies = [ + "anyhow", + "arpa-log-impl", + "async-trait", + "log", + "log-mdc", + "once_cell", + "parking_lot", + "serde", + "serde_json", + "tokio", +] + +[[package]] +name = "arpa-log-impl" +version = "0.4.0-alpha.1" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "arpa-node" +version = "0.4.0-alpha.1" +dependencies = [ + "actix-web", + "alloy", + "anyhow", + "arpa-contract-client", + "arpa-core", + "arpa-dal", + "arpa-log", + "arpa-node", + "arpa-sqlite-db", + "async-trait", "bincode", "check-latest", "chrono", "dkg-core", - "ethers", "futures", "glob", "gumdrop", "hex", - "hyper", + "hyper 1.7.0", "log", "log-mdc", "log4rs", "prost", - "prost-build", "rand 0.8.5", "reedline-repl-rs", "regex", @@ -609,21 +1537,23 @@ dependencies = [ "serde_json", "serde_yaml 0.8.26", "structopt", - "thiserror", + "thiserror 1.0.69", "threshold-bls", "tokio", "tokio-retry", "tonic", - "tonic-build", "tonic-health", + "tonic-prost", + "tonic-prost-build", "tower", "uuid 1.8.0", ] [[package]] name = "arpa-sqlite-db" -version = "0.3.0-alpha.2" +version = "0.4.0-alpha.1" dependencies = [ + "alloy", "anyhow", "arpa-core", "arpa-dal", @@ -632,7 +1562,6 @@ dependencies = [ "chrono", "dkg-core", "entity", - "ethers-core", "libsqlite3-sys", "log", "migration", @@ -640,27 +1569,27 @@ dependencies = [ "sea-orm", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "threshold-bls", "tokio", ] [[package]] name = "arpa-user-cli" -version = "0.3.0-alpha.2" +version = "0.4.0-alpha.1" dependencies = [ + "alloy", "anyhow", "arpa-contract-client", "arpa-core", "bincode", - "ethers", "hex", "rand 0.8.5", "reedline-repl-rs", "serde", "serde_yaml 0.8.26", "structopt", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -669,14 +1598,8 @@ name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" dependencies = [ - "term", + "serde", ] [[package]] @@ -721,7 +1644,7 @@ checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.1.0", + "fastrand 2.3.0", "futures-lite 2.3.0", "slab", ] @@ -847,7 +1770,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -864,7 +1787,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -912,7 +1835,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -932,18 +1855,16 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" -version = "0.6.20" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5" dependencies = [ - "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", "itoa", "matchit", "memchr", @@ -952,7 +1873,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", + "sync_wrapper 1.0.2", "tower", "tower-layer", "tower-service", @@ -960,17 +1881,19 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6" dependencies = [ - "async-trait", "bytes", - "futures-util", - "http", - "http-body", + "futures-core", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", ] @@ -998,15 +1921,15 @@ checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.13.1" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.21.7" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" @@ -1031,6 +1954,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "bimap" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" + [[package]] name = "bincode" version = "1.3.3" @@ -1046,7 +1975,16 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ - "bit-vec", + "bit-vec 0.6.3", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec 0.8.0", ] [[package]] @@ -1055,6 +1993,28 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -1137,6 +2097,18 @@ dependencies = [ "piper", ] +[[package]] +name = "blst" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcdb4c7013139a150f9fc55d123186dbfaba0d912817466282c73ac49e71fb45" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + [[package]] name = "borsh" version = "1.5.0" @@ -1144,7 +2116,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbe5b10e214954177fb1dc9fbd20a1a2608fe99e6c832033bdc7cea287a20d77" dependencies = [ "borsh-derive", - "cfg_aliases", + "cfg_aliases 0.1.1", ] [[package]] @@ -1157,7 +2129,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", "syn_derive", ] @@ -1240,9 +2212,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" dependencies = [ "serde", ] @@ -1257,67 +2229,30 @@ dependencies = [ ] [[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" +name = "c-kzg" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "137a2a2878ed823ef1bd73e5441e245602aae5360022113b8ad259ca4b5b8727" dependencies = [ + "blst", "cc", + "glob", + "hex", "libc", - "pkg-config", -] - -[[package]] -name = "camino" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.23", + "once_cell", "serde", - "serde_json", - "thiserror", ] [[package]] name = "cc" -version = "1.0.97" +version = "1.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +checksum = "80f41ae168f955c12fb8960b057d70d0ca153fb83182b57d86380443527be7e9" dependencies = [ + "find-msvc-tools", "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -1332,6 +2267,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chacha20" version = "0.8.2" @@ -1365,7 +2306,7 @@ checksum = "538f0a3384e362717ded8edb84126c7b85be035753bf59d86bb0a6d60897df9c" dependencies = [ "anyhow", "chrono", - "reqwest", + "reqwest 0.11.27", "semver 1.0.23", "serde", ] @@ -1382,7 +2323,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1450,7 +2391,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -1470,9 +2411,9 @@ dependencies = [ [[package]] name = "coins-bip32" -version = "0.8.7" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +checksum = "2073678591747aed4000dd468b97b14d7007f7936851d3f2f01846899f5ebf08" dependencies = [ "bs58", "coins-core", @@ -1481,14 +2422,14 @@ dependencies = [ "k256", "serde", "sha2 0.10.8", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "coins-bip39" -version = "0.8.7" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +checksum = "74b169b26623ff17e9db37a539fe4f15342080df39f129ef7631df7683d6d9d4" dependencies = [ "bitvec 1.0.1", "coins-bip32", @@ -1497,27 +2438,26 @@ dependencies = [ "pbkdf2 0.12.2", "rand 0.8.5", "sha2 0.10.8", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "coins-core" -version = "0.8.7" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +checksum = "62b962ad8545e43a28e14e87377812ba9ae748dd4fd963f4c10e9fcc6d13475b" dependencies = [ "base64 0.21.7", "bech32", "bs58", + "const-hex", "digest 0.10.7", "generic-array 0.14.7", - "hex", "ripemd", "serde", - "serde_derive", "sha2 0.10.8", "sha3", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1547,15 +2487,14 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.11.3" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +checksum = "b6407bff74dea37e0fa3dc1c1c974e5d46405f0c987bf9997a0762adce71eda6" dependencies = [ "cfg-if", "cpufeatures", - "hex", - "proptest 1.4.0", - "serde", + "proptest 1.6.0", + "serde_core", ] [[package]] @@ -1564,12 +2503,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "convert_case" version = "0.4.0" @@ -1732,7 +2665,7 @@ checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.6.1", "zeroize", ] @@ -1765,6 +2698,56 @@ dependencies = [ "cipher 0.4.4", ] +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "serde", + "strsim 0.11.1", + "syn 2.0.106", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.6.0" @@ -1816,6 +2799,27 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "unicode-xid", +] + [[package]] name = "destructure_traitobject" version = "0.2.0" @@ -1849,54 +2853,12 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle 2.4.1", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", + "subtle 2.6.1", ] [[package]] name = "dkg-core" -version = "0.3.0-alpha.2" +version = "0.4.0-alpha.1" dependencies = [ "async-trait", "bincode", @@ -1906,11 +2868,17 @@ dependencies = [ "rand_core 0.6.4", "serde", "static_assertions", - "thiserror", + "thiserror 1.0.69", "threshold-bls", "tokio", ] +[[package]] +name = "doctest-file" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" + [[package]] name = "dotenvy" version = "0.15.7" @@ -1923,6 +2891,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + [[package]] name = "ecdsa" version = "0.16.9" @@ -1933,15 +2907,28 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", + "serdect", "signature", "spki", ] +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "either" -version = "1.11.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" dependencies = [ "serde", ] @@ -1961,19 +2948,11 @@ dependencies = [ "pkcs8", "rand_core 0.6.4", "sec1", - "subtle 2.4.1", + "serdect", + "subtle 2.6.1", "zeroize", ] -[[package]] -name = "ena" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" -dependencies = [ - "log", -] - [[package]] name = "encoding_rs" version = "0.8.34" @@ -1984,29 +2963,31 @@ dependencies = [ ] [[package]] -name = "enr" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" +name = "entity" +version = "0.4.0-alpha.1" dependencies = [ - "base64 0.21.7", - "bytes", - "hex", - "k256", - "log", - "rand 0.8.5", - "rlp", + "sea-orm", "serde", - "sha3", - "zeroize", ] [[package]] -name = "entity" -version = "0.3.0-alpha.2" +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" dependencies = [ - "sea-orm", - "serde", + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] @@ -2017,12 +2998,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.0", ] [[package]] @@ -2054,307 +3035,10 @@ dependencies = [ "serde_json", "sha2 0.10.8", "sha3", - "thiserror", + "thiserror 1.0.69", "uuid 0.8.2", ] -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "ethers" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c7cd562832e2ff584fa844cd2f6e5d4f35bbe11b28c7c9b8df957b2e1d0c701" -dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-middleware", - "ethers-providers", - "ethers-signers", - "ethers-solc", -] - -[[package]] -name = "ethers-addressbook" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35dc9a249c066d17e8947ff52a4116406163cf92c7f0763cb8c001760b26403f" -dependencies = [ - "ethers-core", - "once_cell", - "serde", - "serde_json", -] - -[[package]] -name = "ethers-contract" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43304317c7f776876e47f2f637859f6d0701c1ec7930a150f169d5fbe7d76f5a" -dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f96502317bf34f6d71a3e3d270defaa9485d754d789e15a8e04a84161c95eb" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "ethers-etherscan", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "reqwest", - "serde", - "serde_json", - "syn 2.0.63", - "toml", - "walkdir", -] - -[[package]] -name = "ethers-contract-derive" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452ff6b0a64507ce8d67ffd48b1da3b42f03680dcf5382244e9c93822cbbf5de" -dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.63", -] - -[[package]] -name = "ethers-core" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aab3cef6cc1c9fd7f787043c81ad3052eff2b96a3878ef1526aa446311bdbfc9" -dependencies = [ - "arrayvec", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array 0.14.7", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand 0.8.5", - "rlp", - "serde", - "serde_json", - "strum", - "syn 2.0.63", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-etherscan" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d45b981f5fa769e1d0343ebc2a44cfa88c9bc312eb681b676318b40cef6fb1" -dependencies = [ - "chrono", - "ethers-core", - "reqwest", - "semver 1.0.23", - "serde", - "serde_json", - "thiserror", - "tracing", -] - -[[package]] -name = "ethers-middleware" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145211f34342487ef83a597c1e69f0d3e01512217a7c72cc8a25931854c7dca0" -dependencies = [ - "async-trait", - "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", -] - -[[package]] -name = "ethers-providers" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb6b15393996e3b8a78ef1332d6483c11d839042c17be58decc92fa8b1c3508a" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http", - "instant", - "jsonwebtoken", - "once_cell", - "pin-project", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - -[[package]] -name = "ethers-signers" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b125a103b56aef008af5d5fb48191984aa326b50bfd2557d231dc499833de3" -dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand 0.8.5", - "sha2 0.10.8", - "thiserror", - "tracing", -] - -[[package]] -name = "ethers-solc" -version = "2.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d21df08582e0a43005018a858cc9b465c5fff9cf4056651be64f844e57d1f55f" -dependencies = [ - "cfg-if", - "const-hex", - "dirs", - "dunce", - "ethers-core", - "glob", - "home", - "md-5", - "num_cpus", - "once_cell", - "path-slash", - "rayon", - "regex", - "semver 1.0.23", - "serde", - "serde_json", - "solang-parser", - "svm-rs", - "thiserror", - "tiny-keccak", - "tokio", - "tracing", - "walkdir", - "yansi 0.5.1", -] - [[package]] name = "event-listener" version = "2.5.3" @@ -2403,16 +3087,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "eyre" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -dependencies = [ - "indenter", - "once_cell", -] - [[package]] name = "fake-simd" version = "0.1.2" @@ -2430,9 +3104,31 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "fastrlp" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] [[package]] name = "fd-lock" @@ -2452,9 +3148,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.6.1", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" + [[package]] name = "finl_unicode" version = "1.2.0" @@ -2507,22 +3209,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "form_urlencoded" -version = "1.2.1" +name = "foldhash" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] -name = "fs2" -version = "0.4.3" +name = "form_urlencoded" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "libc", - "winapi", + "percent-encoding", ] [[package]] @@ -2564,9 +3262,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" @@ -2617,23 +3315,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.1.0", + "fastrand 2.3.0", "futures-core", "futures-io", "parking", "pin-project-lite", ] -[[package]] -name = "futures-locks" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", -] - [[package]] name = "futures-macro" version = "0.3.30" @@ -2642,7 +3330,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -2657,16 +3345,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] - [[package]] name = "futures-util" version = "0.3.30" @@ -2686,13 +3364,10 @@ dependencies = [ ] [[package]] -name = "fxhash" -version = "0.2.1" +name = "futures-utils-wasm" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" [[package]] name = "generic-array" @@ -2721,8 +3396,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "js-sys", "libc", - "wasi", + "r-efi", + "wasi 0.14.7+wasi-0.2.4", + "wasm-bindgen", ] [[package]] @@ -2757,7 +3448,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -2791,8 +3482,27 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.2.6", + "http 0.2.12", + "indexmap 2.11.4", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.3.1", + "indexmap 2.11.4", "slab", "tokio", "tokio-util", @@ -2819,14 +3529,23 @@ dependencies = [ ] [[package]] -name = "hashers" -version = "1.0.1" +name = "hashbrown" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "fxhash", + "allocator-api2", + "equivalent", + "foldhash", + "serde", ] +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" + [[package]] name = "hashlink" version = "0.8.4" @@ -2881,6 +3600,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + [[package]] name = "hkdf" version = "0.8.0" @@ -2939,6 +3667,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -2946,15 +3685,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.3.1", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http 1.3.1", + "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -2978,9 +3740,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -2992,6 +3754,29 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2 0.4.12", + "http 1.3.1", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -2999,23 +3784,60 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", - "rustls", + "http 0.2.12", + "hyper 0.14.28", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http 1.3.1", + "hyper 1.7.0", + "hyper-util", + "rustls 0.23.31", + "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.3", + "tower-service", + "webpki-roots 1.0.2", ] [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper 1.7.0", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ - "hyper", + "bytes", + "futures-channel", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "hyper 1.7.0", "pin-project-lite", + "socket2 0.5.7", "tokio", - "tokio-io-timeout", + "tower-service", + "tracing", ] [[package]] @@ -3041,6 +3863,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.5.0" @@ -3060,24 +3888,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -3089,12 +3899,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - [[package]] name = "indexmap" version = "1.9.3" @@ -3103,16 +3907,19 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg 1.3.0", "hashbrown 0.12.3", + "serde", ] [[package]] name = "indexmap" -version = "2.2.6" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.16.0", + "serde", + "serde_core", ] [[package]] @@ -3123,7 +3930,7 @@ checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -3144,6 +3951,21 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "interprocess" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d941b405bd2322993887859a8ee6ac9134945a24ec5ec763a8a962fc64dfec2d" +dependencies = [ + "doctest-file", + "futures-core", + "libc", + "recvmsg", + "tokio", + "widestring", + "windows-sys 0.52.0", +] + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -3169,9 +3991,9 @@ checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] name = "itertools" -version = "0.11.0" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] @@ -3185,6 +4007,24 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -3202,27 +4042,14 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "852f13bec5eba4ba9afbeb93fd7c13fe56147f055939ae21c43a29a0ecb2702e" dependencies = [ + "once_cell", "wasm-bindgen", ] -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.7", - "pem", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "k256" version = "0.13.3" @@ -3233,6 +4060,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "once_cell", + "serdect", "sha2 0.10.8", "signature", ] @@ -3247,42 +4075,22 @@ dependencies = [ ] [[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - -[[package]] -name = "lalrpop" -version = "0.20.2" +name = "keccak-asm" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" dependencies = [ - "ascii-canvas", - "bit-set", - "ena", - "itertools 0.11.0", - "lalrpop-util", - "petgraph", - "regex", - "regex-syntax 0.8.5", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", - "walkdir", + "digest 0.10.7", + "sha3-asm", ] [[package]] -name = "lalrpop-util" -version = "0.20.2" +name = "kv-log-macro" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" dependencies = [ - "regex-automata 0.4.9", + "log", ] [[package]] @@ -3302,9 +4110,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.154" +version = "0.2.176" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" [[package]] name = "libm" @@ -3312,16 +4120,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.5.0", - "libc", -] - [[package]] name = "libsqlite3-sys" version = "0.26.0" @@ -3352,6 +4150,12 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + [[package]] name = "local-channel" version = "0.1.5" @@ -3371,9 +4175,9 @@ checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg 1.3.0", "scopeguard", @@ -3417,12 +4221,38 @@ dependencies = [ "serde-value", "serde_json", "serde_yaml 0.9.34+deprecated", - "thiserror", + "thiserror 1.0.69", "thread-id", "typemap-ors", "winapi", ] +[[package]] +name = "lru" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "matchers" version = "0.1.0" @@ -3434,9 +4264,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "md-5" @@ -3456,7 +4286,7 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "migration" -version = "0.3.0-alpha.2" +version = "0.4.0-alpha.1" dependencies = [ "async-std", "entity", @@ -3493,7 +4323,7 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.48.0", ] @@ -3503,12 +4333,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - [[package]] name = "nom" version = "7.1.3" @@ -3616,10 +4440,9 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -3631,6 +4454,20 @@ dependencies = [ "libc", ] +[[package]] +name = "nybbles" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa11e84403164a9f12982ab728f3c67c6fd4ab5b5f0254ffc217bdbd3b28ab0" +dependencies = [ + "alloy-rlp", + "cfg-if", + "proptest 1.6.0", + "ruint", + "serde", + "smallvec", +] + [[package]] name = "object" version = "0.32.2" @@ -3642,9 +4479,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "opaque-debug" @@ -3658,31 +4495,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "openssl-src" version = "300.2.3+3.2.1" @@ -3694,9 +4506,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" dependencies = [ "cc", "libc", @@ -3705,12 +4517,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "ordered-float" version = "2.10.1" @@ -3750,7 +4556,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -3787,9 +4593,9 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", "parking_lot_core", @@ -3797,26 +4603,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", "redox_syscall 0.5.1", "smallvec", - "windows-targets 0.52.5", -] - -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle 2.4.1", + "windows-targets 0.52.6", ] [[package]] @@ -3825,12 +4620,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "path-slash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" - [[package]] name = "pbkdf2" version = "0.11.0" @@ -3838,9 +4627,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ "digest 0.10.7", - "hmac 0.12.1", - "password-hash", - "sha2 0.10.8", ] [[package]] @@ -3853,15 +4639,6 @@ dependencies = [ "hmac 0.12.1", ] -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -3884,7 +4661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.69", "ucd-trie", ] @@ -3895,7 +4672,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.11.4", ] [[package]] @@ -3908,57 +4685,6 @@ dependencies = [ "rustc_version 0.4.0", ] -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_macros", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared 0.11.2", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -dependencies = [ - "phf_generator", - "phf_shared 0.11.2", - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project" version = "1.1.5" @@ -3976,7 +4702,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -3998,7 +4724,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" dependencies = [ "atomic-waker", - "fastrand 2.1.0", + "fastrand 2.3.0", "futures-io", ] @@ -4083,12 +4809,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - [[package]] name = "prettyplease" version = "0.2.20" @@ -4096,7 +4816,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -4107,9 +4827,6 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] @@ -4119,7 +4836,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -4146,11 +4863,33 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -4161,7 +4900,7 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01c477819b845fe023d33583ebf10c9f62518c8d79a0960ba5c36d6ac8a55a5b" dependencies = [ - "bit-set", + "bit-set 0.5.3", "bitflags 1.3.2", "byteorder", "lazy_static", @@ -4171,16 +4910,18 @@ dependencies = [ "rand_chacha 0.1.1", "rand_xorshift 0.1.1", "regex-syntax 0.6.29", - "rusty-fork", + "rusty-fork 0.2.2", "tempfile", ] [[package]] name = "proptest" -version = "1.4.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ + "bit-set 0.8.0", + "bit-vec 0.8.0", "bitflags 2.5.0", "lazy_static", "num-traits", @@ -4188,14 +4929,16 @@ dependencies = [ "rand_chacha 0.3.1", "rand_xorshift 0.3.0", "regex-syntax 0.8.5", + "rusty-fork 0.3.0", + "tempfile", "unarray", ] [[package]] name = "prost" -version = "0.12.4" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" +checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" dependencies = [ "bytes", "prost-derive", @@ -4203,13 +4946,12 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.4" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80b776a1b2dc779f5ee0641f8ade0125bc1298dd41a9a0c16d8bd57b42d222b1" +checksum = "ac6c3320f9abac597dcbc668774ef006702672474aad53c6d596b62e487b40b1" dependencies = [ - "bytes", "heck 0.5.0", - "itertools 0.12.1", + "itertools 0.14.0", "log", "multimap", "once_cell", @@ -4217,29 +4959,31 @@ dependencies = [ "prettyplease", "prost", "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", "regex", - "syn 2.0.63", + "syn 2.0.106", "tempfile", ] [[package]] name = "prost-derive" -version = "0.12.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9554e3ab233f0a932403704f1a1d08c30d5ccd931adfdfa1e8b5a19b52c1d55a" +checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] name = "prost-types" -version = "0.12.4" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" +checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72" dependencies = [ "prost", ] @@ -4264,12 +5008,87 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "pulldown-cmark" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" +dependencies = [ + "bitflags 2.5.0", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5b6a0769a491a08b31ea5c62494a8f144ee0987d86d670a8af4df1e1b7cde75" +dependencies = [ + "pulldown-cmark", +] + [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases 0.2.1", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.23.31", + "socket2 0.6.0", + "thiserror 2.0.16", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +dependencies = [ + "bytes", + "getrandom 0.3.3", + "lru-slab", + "rand 0.9.2", + "ring", + "rustc-hash", + "rustls 0.23.31", + "rustls-pki-types", + "slab", + "thiserror 2.0.16", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases 0.2.1", + "libc", + "once_cell", + "socket2 0.6.0", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.36" @@ -4279,6 +5098,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "radium" version = "0.3.0" @@ -4319,6 +5144,18 @@ dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", + "serde", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "serde", ] [[package]] @@ -4341,6 +5178,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + [[package]] name = "rand_core" version = "0.3.1" @@ -4362,7 +5209,17 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", + "serde", ] [[package]] @@ -4436,26 +5293,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - [[package]] name = "rdrand" version = "0.4.0" @@ -4465,6 +5302,12 @@ dependencies = [ "rand_core 0.3.1", ] +[[package]] +name = "recvmsg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" + [[package]] name = "redox_syscall" version = "0.4.1" @@ -4483,17 +5326,6 @@ dependencies = [ "bitflags 2.5.0", ] -[[package]] -name = "redox_users" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - [[package]] name = "reedline" version = "0.30.0" @@ -4508,9 +5340,9 @@ dependencies = [ "nu-ansi-term", "serde", "strip-ansi-escapes", - "strum", - "strum_macros", - "thiserror", + "strum 0.25.0", + "strum_macros 0.25.3", + "thiserror 1.0.69", "unicode-segmentation", "unicode-width", ] @@ -4527,7 +5359,27 @@ dependencies = [ "reedline", "regex", "winapi-util", - "yansi 1.0.1", + "yansi", +] + +[[package]] +name = "ref-cast" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] @@ -4585,20 +5437,61 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.27" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.28", + "hyper-rustls 0.24.2", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration", + "tokio", + "tokio-rustls 0.24.1", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.25.4", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bytes", - "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.7.0", + "hyper-rustls 0.27.7", + "hyper-util", "ipnet", "js-sys", "log", @@ -4606,22 +5499,23 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-pemfile", + "quinn", + "rustls 0.23.31", + "rustls-pemfile 2.2.0", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", - "system-configuration", + "sync_wrapper 1.0.2", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.3", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.4", - "winreg", + "webpki-roots 0.26.11", + "winreg 0.52.0", ] [[package]] @@ -4631,22 +5525,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle 2.4.1", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", + "subtle 2.6.1", ] [[package]] @@ -4657,10 +5536,10 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin 0.9.8", - "untrusted 0.9.0", + "untrusted", "windows-sys 0.52.0", ] @@ -4709,21 +5588,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", - "rlp-derive", "rustc-hex", ] -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "rsa" version = "0.9.6" @@ -4740,10 +5607,44 @@ dependencies = [ "rand_core 0.6.4", "signature", "spki", - "subtle 2.4.1", + "subtle 2.6.1", + "zeroize", +] + +[[package]] +name = "ruint" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a68df0380e5c9d20ce49534f292a36a7514ae21350726efe1865bdb1fa91d278" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "ark-ff 0.5.0", + "bytes", + "fastrlp 0.3.1", + "fastrlp 0.4.0", + "num-bigint", + "num-integer", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest 1.6.0", + "rand 0.8.5", + "rand 0.9.2", + "rlp", + "ruint-macro", + "serde_core", + "valuable", "zeroize", ] +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + [[package]] name = "rust_decimal" version = "1.35.0" @@ -4766,6 +5667,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -4817,6 +5724,19 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustix" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys 0.11.0", + "windows-sys 0.61.0", +] + [[package]] name = "rustls" version = "0.21.12" @@ -4824,11 +5744,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.8", - "rustls-webpki", + "ring", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.23.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki 0.103.6", + "subtle 2.6.1", + "zeroize", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -4838,14 +5772,44 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "web-time", + "zeroize", +] + [[package]] name = "rustls-webpki" version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8572f3c2cb9934231157b45499fc41e1f58c589fdfb81a844ba873265e80f8eb" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", ] [[package]] @@ -4866,6 +5830,18 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "ryu" version = "1.0.18" @@ -4882,36 +5858,27 @@ dependencies = [ ] [[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scale-info" -version = "2.11.3" +name = "schemars" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", + "dyn-clone", + "ref-cast", + "serde", + "serde_json", ] [[package]] -name = "scale-info-derive" -version = "2.11.3" +name = "schemars" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", + "dyn-clone", + "ref-cast", + "serde", + "serde_json", ] [[package]] @@ -4938,8 +5905,8 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -4952,7 +5919,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -4975,8 +5942,8 @@ dependencies = [ "serde", "serde_json", "sqlx", - "strum", - "thiserror", + "strum 0.25.0", + "thiserror 1.0.69", "time", "tracing", "url", @@ -5010,7 +5977,7 @@ dependencies = [ "proc-macro2", "quote", "sea-bae", - "syn 2.0.63", + "syn 2.0.106", "unicode-ident", ] @@ -5074,8 +6041,8 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.63", - "thiserror", + "syn 2.0.106", + "thiserror 1.0.69", ] [[package]] @@ -5117,10 +6084,32 @@ dependencies = [ "der", "generic-array 0.14.7", "pkcs8", - "subtle 2.4.1", + "serdect", + "subtle 2.6.1", "zeroize", ] +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + [[package]] name = "semver" version = "0.11.0" @@ -5148,12 +6137,6 @@ dependencies = [ "pest", ] -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - [[package]] name = "send_wrapper" version = "0.6.0" @@ -5162,10 +6145,11 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.202" +version = "1.0.226" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "0dca6411025b24b60bfa7ec1fe1f8e710ac09782dca409ee8237ba74b51295fd" dependencies = [ + "serde_core", "serde_derive", ] @@ -5179,35 +6163,37 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_core" +version = "1.0.226" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba2ba63999edb9dac981fb34b3e5c0d111a69b0924e253ed29d83f7c99e966a4" +dependencies = [ + "serde_derive", +] + [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.226" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "8db53ae22f34573731bafa1db20f04027b2d25e02d8205921b569171699cdb33" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", + "memchr", "ryu", "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" -dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -5222,6 +6208,38 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c522100790450cf78eeac1507263d0a350d4d5b30df0c8e1fe051a10c22b376e" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.11.4", + "schemars 0.9.0", + "schemars 1.0.4", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327ada00f7d64abaac1e55a6911e90cf665aa051b9a561c7006c157f4633135e" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "serde_yaml" version = "0.8.26" @@ -5240,13 +6258,23 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.11.4", "itoa", "ryu", "serde", "unsafe-libyaml", ] +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + [[package]] name = "sha1" version = "0.10.6" @@ -5291,6 +6319,16 @@ dependencies = [ "keccak", ] +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -5300,6 +6338,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook" version = "0.3.17" @@ -5346,18 +6390,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] - [[package]] name = "simple_logger" version = "4.3.3" @@ -5370,12 +6402,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - [[package]] name = "slab" version = "0.4.9" @@ -5390,6 +6416,9 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -5412,17 +6441,13 @@ dependencies = [ ] [[package]] -name = "solang-parser" -version = "0.3.3" +name = "socket2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" dependencies = [ - "itertools 0.11.0", - "lalrpop", - "lalrpop-util", - "phf", - "thiserror", - "unicode-xid", + "libc", + "windows-sys 0.59.0", ] [[package]] @@ -5498,21 +6523,21 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.6", + "indexmap 2.11.4", "log", "memchr", "once_cell", "paste", "percent-encoding", "rust_decimal", - "rustls", - "rustls-pemfile", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", "serde", "serde_json", "sha2 0.10.8", "smallvec", "sqlformat", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tokio-stream", @@ -5601,7 +6626,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.69", "time", "tracing", "uuid 1.8.0", @@ -5646,7 +6671,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.69", "time", "tracing", "uuid 1.8.0", @@ -5684,19 +6709,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared 0.10.0", - "precomputed-hash", -] - [[package]] name = "stringprep" version = "0.1.4" @@ -5758,8 +6770,14 @@ name = "strum" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + +[[package]] +name = "strum" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ - "strum_macros", + "strum_macros 0.27.2", ] [[package]] @@ -5772,7 +6790,19 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.63", + "syn 2.0.106", +] + +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] @@ -5783,35 +6813,26 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.4.1" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] -name = "svm-rs" -version = "0.3.5" +name = "syn" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "dirs", - "fs2", - "hex", - "once_cell", - "reqwest", - "semver 1.0.23", - "serde", - "serde_json", - "sha2 0.10.8", - "thiserror", - "url", - "zip", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] name = "syn" -version = "1.0.109" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -5819,14 +6840,15 @@ dependencies = [ ] [[package]] -name = "syn" -version = "2.0.63" +name = "syn-solidity" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704" +checksum = "a0b198d366dbec045acfcd97295eb653a7a2b40e4dc764ef1e79aafcad439d3c" dependencies = [ + "paste", "proc-macro2", "quote", - "unicode-ident", + "syn 2.0.106", ] [[package]] @@ -5838,7 +6860,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -5847,6 +6869,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + [[package]] name = "system-configuration" version = "0.5.1" @@ -5876,54 +6904,64 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ - "cfg-if", - "fastrand 2.1.0", - "rustix 0.38.34", - "windows-sys 0.52.0", + "fastrand 2.3.0", + "getrandom 0.3.3", + "once_cell", + "rustix 1.1.2", + "windows-sys 0.61.0", ] [[package]] -name = "term" -version = "0.7.0" +name = "textwrap" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "dirs-next", - "rustversion", - "winapi", + "unicode-width", ] [[package]] -name = "textwrap" -version = "0.11.0" +name = "thiserror" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "unicode-width", + "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" -version = "1.0.60" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.16", ] [[package]] name = "thiserror-impl" -version = "1.0.60" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] @@ -5946,18 +6984,27 @@ dependencies = [ "once_cell", ] +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + [[package]] name = "threshold-bls" -version = "0.3.0-alpha.2" +version = "0.4.0-alpha.1" dependencies = [ + "alloy", "ark-bls12-381", "ark-bn254", "ark-ec", - "ark-ff", - "ark-serialize", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", "bincode", "chacha20poly1305", - "ethers-core", "hkdf 0.8.0", "log", "proptest 0.9.6", @@ -5966,7 +7013,7 @@ dependencies = [ "serde", "sha2 0.8.2", "static_assertions", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -6045,16 +7092,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.2.0" @@ -6063,7 +7100,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -6083,34 +7120,46 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f63835928ca123f1bef57abbcd23bb2ba0ac9ae1235f1e65bda0d06e7786bd" +dependencies = [ + "rustls 0.23.31", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", ] [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.23.31", + "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.3", "tungstenite", - "webpki-roots 0.25.4", + "webpki-roots 0.26.11", ] [[package]] @@ -6126,26 +7175,11 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.12", -] - [[package]] name = "toml_datetime" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] [[package]] name = "toml_edit" @@ -6153,43 +7187,32 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.11.4", "toml_datetime", "winnow 0.5.40", ] -[[package]] -name = "toml_edit" -version = "0.22.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" -dependencies = [ - "indexmap 2.2.6", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.6.26", -] - [[package]] name = "tonic" -version = "0.11.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" dependencies = [ - "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", - "h2", - "http", - "http-body", - "hyper", + "h2 0.4.12", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.7.0", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", - "prost", + "socket2 0.6.0", + "sync_wrapper 1.0.2", "tokio", "tokio-stream", "tower", @@ -6200,43 +7223,68 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.11.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" +checksum = "4c40aaccc9f9eccf2cd82ebc111adc13030d23e887244bc9cfa5d1d636049de3" dependencies = [ "prettyplease", "proc-macro2", - "prost-build", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] name = "tonic-health" -version = "0.11.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cef6e24bc96871001a7e48e820ab240b3de2201e59b517cf52835df2f1d2350" +checksum = "2a82868bf299e0a1d2e8dce0dc33a46c02d6f045b2c1f1d6cc8dc3d0bf1812ef" dependencies = [ - "async-stream", "prost", "tokio", "tokio-stream", "tonic", + "tonic-prost", +] + +[[package]] +name = "tonic-prost" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66bd50ad6ce1252d87ef024b3d64fe4c3cf54a86fb9ef4c631fdd0ded7aeaa67" +dependencies = [ + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4a16cba4043dc3ff43fcb3f96b4c5c154c64cbd18ca8dce2ab2c6a451d058a2" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.106", + "tempfile", + "tonic-build", ] [[package]] name = "tower" -version = "0.4.13" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "indexmap 1.9.3", - "pin-project", + "indexmap 2.11.4", "pin-project-lite", - "rand 0.8.5", "slab", + "sync_wrapper 1.0.2", "tokio", "tokio-util", "tower-layer", @@ -6246,15 +7294,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -6276,7 +7324,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] @@ -6288,16 +7336,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "tracing-subscriber" version = "0.3.18" @@ -6321,21 +7359,20 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" dependencies = [ - "byteorder", "bytes", "data-encoding", - "http", + "http 1.3.1", "httparse", "log", - "rand 0.8.5", - "rustls", + "rand 0.9.2", + "rustls 0.23.31", + "rustls-pki-types", "sha1", - "thiserror", - "url", + "thiserror 2.0.16", "utf-8", ] @@ -6378,6 +7415,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -6425,12 +7468,12 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "universal-hash" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" dependencies = [ "generic-array 0.14.7", - "subtle 2.4.1", + "subtle 2.6.1", ] [[package]] @@ -6448,12 +7491,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -6489,7 +7526,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] @@ -6499,7 +7536,7 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ - "getrandom", + "getrandom 0.2.15", "rand 0.8.5", "serde", "uuid-macro-internal", @@ -6513,9 +7550,15 @@ checksum = "9881bea7cbe687e36c9ab3b778c36cd0487402e270304e8b1296d5085303c1a2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + [[package]] name = "value-bag" version = "1.9.0" @@ -6575,16 +7618,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "want" version = "0.3.1" @@ -6600,6 +7633,24 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.14.7+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +dependencies = [ + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "wasite" version = "0.1.0" @@ -6608,26 +7659,28 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "ab10a69fbd0a177f5f649ad4d8d3305499c42bab9aef2f7ff592d0ec8f833819" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "0bb702423545a6007bbc368fde243ba47ca275e549c8a28617f56f6ba53b1d1c" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", "wasm-bindgen-shared", ] @@ -6645,9 +7698,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "fc65f4f411d91494355917b605e1480033152658d71f722a90647f56a70c88a0" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6655,22 +7708,39 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "ffc003a991398a8ee604a401e194b6b3a39677b3173d6e74495eb51b82e99a32" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "293c37f4efa430ca14db3721dfbe48d8c33308096bd44d80ebaa775ab71ba1cf" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasmtimer" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1c598d6b99ea013e35844697fc4670d08339d5cda15588f193c6beedd12f644b" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] [[package]] name = "web-sys" @@ -6682,13 +7752,23 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webpki-roots" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" dependencies = [ - "rustls-webpki", + "rustls-webpki 0.101.7", ] [[package]] @@ -6697,6 +7777,24 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "webpki-roots" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.2", +] + +[[package]] +name = "webpki-roots" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "whoami" version = "1.5.1" @@ -6707,6 +7805,12 @@ dependencies = [ "wasite", ] +[[package]] +name = "widestring" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" + [[package]] name = "winapi" version = "0.3.9" @@ -6744,9 +7848,15 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] +[[package]] +name = "windows-link" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" + [[package]] name = "windows-sys" version = "0.48.0" @@ -6762,7 +7872,25 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" +dependencies = [ + "windows-link", ] [[package]] @@ -6782,18 +7910,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -6804,9 +7932,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -6816,9 +7944,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -6828,15 +7956,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -6846,9 +7974,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -6858,9 +7986,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -6870,9 +7998,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -6882,9 +8010,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -6897,9 +8025,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.26" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] @@ -6914,6 +8042,22 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + [[package]] name = "ws_stream_wasm" version = "0.7.4" @@ -6926,8 +8070,8 @@ dependencies = [ "log", "pharos", "rustc_version 0.4.0", - "send_wrapper 0.6.0", - "thiserror", + "send_wrapper", + "thiserror 1.0.69", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -6951,12 +8095,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - [[package]] name = "yansi" version = "1.0.1" @@ -6980,14 +8118,14 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.106", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -7000,36 +8138,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", -] - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "aes", - "byteorder", - "bzip2", - "constant_time_eq", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac 0.12.1", - "pbkdf2 0.11.0", - "sha1", - "time", - "zstd 0.11.2+zstd.1.5.2", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", + "syn 2.0.106", ] [[package]] @@ -7038,17 +8147,7 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" dependencies = [ - "zstd-safe 7.1.0", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", + "zstd-safe", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 86c244d2..8832800d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.3.0-alpha.2" +version = "0.4.0-alpha.1" edition = "2021" license = "MIT OR Apache-2.0" documentation = "https://docs.arpanetwork.io/" @@ -49,19 +49,14 @@ debug-assertions = true debug = true [workspace.dependencies] -arpa-log = { version = "0.3.0-alpha.2", path = "crates/log" } -arpa-core = { version = "0.3.0-alpha.2", path = "crates/core" } -arpa-dal = { version = "0.3.0-alpha.2", path = "crates/dal" } -arpa-sqlite-db = { version = "0.3.0-alpha.2", path = "crates/dal/sqlite" } -arpa-contract-client = { version = "0.3.0-alpha.2", path = "crates/contract-client" } -dkg-core = { version = "0.3.0-alpha.2", path = "crates/dkg-core" } -threshold-bls = { version = "0.3.0-alpha.2", path = "crates/threshold-bls", default-features = false, features = [ +arpa-log = { version = "0.4.0-alpha.1", path = "crates/log" } +arpa-core = { version = "0.4.0-alpha.1", path = "crates/core" } +arpa-dal = { version = "0.4.0-alpha.1", path = "crates/dal" } +arpa-sqlite-db = { version = "0.4.0-alpha.1", path = "crates/dal/sqlite" } +arpa-contract-client = { version = "0.4.0-alpha.1", path = "crates/contract-client" } +dkg-core = { version = "0.4.0-alpha.1", path = "crates/dkg-core" } +threshold-bls = { version = "0.4.0-alpha.1", path = "crates/threshold-bls", default-features = false, features = [ "bn254", ] } -ethers = "=2.0.13" -ethers-middleware = "=2.0.13" -ethers-contract-abigen = "=2.0.13" -ethers-contract = "=2.0.13" -ethers-core = "=2.0.13" -ethers-providers = "=2.0.13" -ethers-signers = "=2.0.13" +alloy = "=1.0.36" + diff --git a/crates/arpa-node/Cargo.toml b/crates/arpa-node/Cargo.toml index e4081f69..e8be9ea2 100644 --- a/crates/arpa-node/Cargo.toml +++ b/crates/arpa-node/Cargo.toml @@ -25,8 +25,7 @@ name = "node-config-checker" path = "src/node_config_checker.rs" [build-dependencies] -prost-build = "0.12" -tonic-build = "0.11" +tonic-prost-build = "0.14" serde_json = "1.0" [dependencies] @@ -51,9 +50,10 @@ futures = "0.3.5" async-trait = "0.1.35" tokio = { version = "1.37.0", features = ["full"] } rustc-hex = "2.1.0" -tonic = "0.11" -tonic-health = "0.11" -prost = "0.12" +tonic = "0.14" +tonic-health = "0.14" +prost = "0.14" +tonic-prost = "0.14" serde_yaml = "0.8" tokio-retry = "0.3" log = "0.4" @@ -61,10 +61,10 @@ log4rs = "1.2.0" log-mdc = "0.1.0" chrono = "0.4" structopt = "0.3" -ethers = { workspace = true, features = ["abigen", "rustls", "ws"] } +alloy = { workspace = true, features = ["full"] } uuid = { version = "1.2.2", features = ["v4", "fast-rng", "macro-diagnostics"] } -tower = "0.4" -hyper = "0.14" +tower = "0.5" +hyper = "1.7" reedline-repl-rs = { version = "1.0.6", features = ["async"] } actix-web = "4" check-latest = { version = "1.0.2", default-features = false, features = [ @@ -75,5 +75,6 @@ check-latest = { version = "1.0.2", default-features = false, features = [ unittest = [] [dev-dependencies] +alloy = { workspace = true, features = ["full", "provider-anvil-node"] } arpa-node = { path = ".", features = [] } regex = "1.11.1" diff --git a/crates/arpa-node/build.rs b/crates/arpa-node/build.rs index 370d6720..0d7fff29 100644 --- a/crates/arpa-node/build.rs +++ b/crates/arpa-node/build.rs @@ -1,6 +1,9 @@ use std::fs; +#[cfg(feature = "unittest")] use std::io::Write; +#[cfg(feature = "unittest")] use std::path::{Path, PathBuf}; +#[cfg(feature = "unittest")] use std::process::Command; const RPC_STUB_DIR: &str = "./src/rpc_stub"; @@ -16,12 +19,12 @@ fn main() -> Result<(), Box> { println!("cargo:rerun-if-changed=proto"); println!("cargo:rerun-if-changed=src/listener/test-contract"); - let mut prost_build = prost_build::Config::new(); + let mut prost_build = tonic_prost_build::Config::new(); prost_build.btree_map(["members"]); fs::create_dir_all(RPC_STUB_DIR)?; let protos = &["proto/committer.proto", "proto/management.proto"]; - tonic_build::configure() + tonic_prost_build::configure() .out_dir(RPC_STUB_DIR) .compile_with_config(prost_build, protos, &[PROTO_DIR])?; diff --git a/crates/arpa-node/src/committer/client.rs b/crates/arpa-node/src/committer/client.rs index a45e409c..4ab80a70 100644 --- a/crates/arpa-node/src/committer/client.rs +++ b/crates/arpa-node/src/committer/client.rs @@ -2,8 +2,8 @@ use super::{CommitterClient, CommitterService, ServiceClient}; use crate::error::{NodeError, NodeResult}; use crate::rpc_stub::committer::committer_service_client::CommitterServiceClient; use crate::rpc_stub::committer::CommitPartialSignatureRequest; +use alloy::primitives::Address; use arpa_core::{address_to_string, jitter, BLSTaskType, ExponentialBackoffRetryDescriptor}; -use ethers::types::Address; use log::error; use tokio_retry::{strategy::ExponentialBackoff, RetryIf}; use tonic::Request; @@ -73,7 +73,7 @@ impl ServiceClient> for Genera impl CommitterService for GeneralCommitterClient { async fn commit_partial_signature( self, - chain_id: usize, + chain_id: u64, task_type: BLSTaskType, request_id: Vec, message: Vec, diff --git a/crates/arpa-node/src/committer/mod.rs b/crates/arpa-node/src/committer/mod.rs index 5c8b1a75..17157920 100644 --- a/crates/arpa-node/src/committer/mod.rs +++ b/crates/arpa-node/src/committer/mod.rs @@ -2,9 +2,9 @@ pub mod client; pub mod server; use crate::error::NodeResult; +use alloy::primitives::Address; use arpa_core::{BLSTaskType, ExponentialBackoffRetryDescriptor}; use arpa_dal::GroupInfoHandler; -use ethers::types::Address; use std::sync::Arc; use threshold_bls::group::Curve; use tokio::sync::RwLock; @@ -16,7 +16,7 @@ pub trait ServiceClient { pub trait CommitterService { async fn commit_partial_signature( self, - chain_id: usize, + chain_id: u64, task_type: BLSTaskType, request_id: Vec, message: Vec, diff --git a/crates/arpa-node/src/committer/server.rs b/crates/arpa-node/src/committer/server.rs index a48340d4..0e246f7e 100644 --- a/crates/arpa-node/src/committer/server.rs +++ b/crates/arpa-node/src/committer/server.rs @@ -10,9 +10,9 @@ use crate::{ CommitPartialSignatureReply, CommitPartialSignatureRequest, }, }; +use alloy::primitives::Address; use arpa_core::{BLSTaskError, BLSTaskType, SchedulerError}; use arpa_dal::GroupInfoHandler; -use ethers::types::Address; use futures::Future; use std::{marker::PhantomData, sync::Arc}; use threshold_bls::{ @@ -82,7 +82,7 @@ where return Err(Status::not_found(NodeError::NotCommitter.to_string())); } - let chain_id = req.chain_id as usize; + let chain_id = req.chain_id as u64; let req_id_address: Address = req .id_address @@ -128,7 +128,7 @@ where self.context .read() .await - .get_relayed_chain(req.chain_id as usize) + .get_relayed_chain(req.chain_id as u64) .unwrap() .get_randomness_result_cache() }; @@ -226,7 +226,7 @@ where let group_cache = context.read().await.get_main_chain().get_group_cache(); - let (mut health_reporter, health_service) = tonic_health::server::health_reporter(); + let (health_reporter, health_service) = tonic_health::server::health_reporter(); health_reporter .set_serving::>>() .await; @@ -272,7 +272,7 @@ where let group_cache = context.read().await.get_main_chain().get_group_cache(); - let (mut health_reporter, health_service) = tonic_health::server::health_reporter(); + let (health_reporter, health_service) = tonic_health::server::health_reporter(); health_reporter .set_serving::>>() .await; diff --git a/crates/arpa-node/src/context/chain/mod.rs b/crates/arpa-node/src/context/chain/mod.rs index af758c47..9ce19a5f 100644 --- a/crates/arpa-node/src/context/chain/mod.rs +++ b/crates/arpa-node/src/context/chain/mod.rs @@ -25,7 +25,7 @@ pub trait Chain< type RandomnessResultCaches; type ChainIdentity; - fn id(&self) -> usize; + fn id(&self) -> u64; fn description(&self) -> &str; diff --git a/crates/arpa-node/src/context/chain/types.rs b/crates/arpa-node/src/context/chain/types.rs index 21bcac66..ca0d82fc 100644 --- a/crates/arpa-node/src/context/chain/types.rs +++ b/crates/arpa-node/src/context/chain/types.rs @@ -55,7 +55,7 @@ pub struct GeneralMainChain< PC: Curve, S: SignatureScheme + ThresholdScheme, > { - id: usize, + id: u64, description: String, is_eigenlayer: bool, is_consistent_asset_and_node_account: bool, @@ -149,7 +149,7 @@ where type ChainIdentity = ChainIdentityHandlerType; - fn id(&self) -> usize { + fn id(&self) -> u64 { self.id } @@ -532,7 +532,7 @@ pub struct GeneralRelayedChain< PC: Curve, S: SignatureScheme + ThresholdScheme, > { - id: usize, + id: u64, description: String, chain_identity: Arc>>, node_cache: Arc>>>, @@ -618,7 +618,7 @@ where type ChainIdentity = ChainIdentityHandlerType; - fn id(&self) -> usize { + fn id(&self) -> u64 { self.id } diff --git a/crates/arpa-node/src/context/mod.rs b/crates/arpa-node/src/context/mod.rs index 895f3d11..1bf86ea2 100644 --- a/crates/arpa-node/src/context/mod.rs +++ b/crates/arpa-node/src/context/mod.rs @@ -85,9 +85,9 @@ pub trait Context< fn get_main_chain(&self) -> &Self::MainChain; - fn contains_relayed_chain(&self, index: usize) -> bool; + fn contains_relayed_chain(&self, index: u64) -> bool; - fn get_relayed_chain(&self, index: usize) -> Option<&RelayedChainType>; + fn get_relayed_chain(&self, index: u64) -> Option<&RelayedChainType>; fn add_relayed_chain(&mut self, relayed_chain: RelayedChainType) -> NodeResult<()>; @@ -102,7 +102,7 @@ pub trait TaskWaiter { } pub trait ContextFetcher { - fn get_supported_relayed_chains(&self) -> Vec; + fn get_supported_relayed_chains(&self) -> Vec; fn get_fixed_task_handler(&self) -> Arc>; diff --git a/crates/arpa-node/src/context/types.rs b/crates/arpa-node/src/context/types.rs index ef99937b..3a724389 100644 --- a/crates/arpa-node/src/context/types.rs +++ b/crates/arpa-node/src/context/types.rs @@ -36,7 +36,7 @@ pub struct GeneralContext< S: SignatureScheme + ThresholdScheme, > { main_chain: GeneralMainChain, - relayed_chains: HashMap>, + relayed_chains: HashMap>, eq: Arc>, ts: Arc>, f_ts: Arc>, @@ -84,13 +84,13 @@ where &self.main_chain } - fn contains_relayed_chain(&self, index: usize) -> bool { + fn contains_relayed_chain(&self, index: u64) -> bool { self.relayed_chains.contains_key(&index) } fn get_relayed_chain( &self, - index: usize, + index: u64, ) -> Option< &Box< dyn RelayedChain< @@ -186,7 +186,7 @@ impl< + 'static, > ContextFetcher for GeneralContext { - fn get_supported_relayed_chains(&self) -> Vec { + fn get_supported_relayed_chains(&self) -> Vec { self.relayed_chains.keys().cloned().collect() } diff --git a/crates/arpa-node/src/error/mod.rs b/crates/arpa-node/src/error/mod.rs index 8bce910c..c9f3f6d3 100644 --- a/crates/arpa-node/src/error/mod.rs +++ b/crates/arpa-node/src/error/mod.rs @@ -1,9 +1,9 @@ +use alloy::transports::TransportError; use arpa_contract_client::error::ContractClientError; use arpa_core::SchedulerError; use arpa_dal::error::DataAccessError; use arpa_sqlite_db::DBError; use dkg_core::{primitives::DKGError, DKGNodeError}; -use ethers::providers::ProviderError; use rustc_hex::FromHexError; use thiserror::Error; use threshold_bls::sig::BLSError; @@ -54,6 +54,9 @@ pub enum NodeError { #[error(transparent)] ContractClientError(#[from] ContractClientError), + #[error(transparent)] + TransportError(#[from] TransportError), + #[error(transparent)] RpcClientError(#[from] tonic::transport::Error), @@ -69,9 +72,6 @@ pub enum NodeError { #[error(transparent)] FromHexError(#[from] FromHexError), - #[error(transparent)] - ProviderError(#[from] ProviderError), - #[error("can't parse address format")] AddressFormatError, diff --git a/crates/arpa-node/src/event/dkg_success.rs b/crates/arpa-node/src/event/dkg_success.rs index 4155f4ac..b036e76a 100644 --- a/crates/arpa-node/src/event/dkg_success.rs +++ b/crates/arpa-node/src/event/dkg_success.rs @@ -1,19 +1,19 @@ use crate::subscriber::DebuggableEvent; +use alloy::primitives::Address; use arpa_core::Group; -use ethers::types::Address; use threshold_bls::group::Curve; use super::{types::Topic, Event}; #[derive(Clone, Debug)] pub struct DKGSuccess { - pub chain_id: usize, + pub chain_id: u64, pub id_address: Address, pub group: Group, } impl DKGSuccess { - pub fn new(chain_id: usize, id_address: Address, group: Group) -> Self { + pub fn new(chain_id: u64, id_address: Address, group: Group) -> Self { DKGSuccess { chain_id, id_address, diff --git a/crates/arpa-node/src/event/new_block.rs b/crates/arpa-node/src/event/new_block.rs index c1883271..09d27ea6 100644 --- a/crates/arpa-node/src/event/new_block.rs +++ b/crates/arpa-node/src/event/new_block.rs @@ -3,12 +3,12 @@ use crate::subscriber::DebuggableEvent; #[derive(Clone, Debug)] pub struct NewBlock { - pub chain_id: usize, + pub chain_id: u64, pub block_height: usize, } impl NewBlock { - pub fn new(chain_id: usize, block_height: usize) -> Self { + pub fn new(chain_id: u64, block_height: usize) -> Self { NewBlock { chain_id, block_height, diff --git a/crates/arpa-node/src/event/new_dkg_task.rs b/crates/arpa-node/src/event/new_dkg_task.rs index be387351..19d43758 100644 --- a/crates/arpa-node/src/event/new_dkg_task.rs +++ b/crates/arpa-node/src/event/new_dkg_task.rs @@ -4,13 +4,13 @@ use arpa_core::DKGTask; #[derive(Clone, Debug)] pub struct NewDKGTask { - pub chain_id: usize, + pub chain_id: u64, pub dkg_task: DKGTask, pub self_index: usize, } impl NewDKGTask { - pub fn new(chain_id: usize, dkg_task: DKGTask, self_index: usize) -> Self { + pub fn new(chain_id: u64, dkg_task: DKGTask, self_index: usize) -> Self { NewDKGTask { chain_id, dkg_task, diff --git a/crates/arpa-node/src/event/new_randomness_task.rs b/crates/arpa-node/src/event/new_randomness_task.rs index dbcad040..58c5255c 100644 --- a/crates/arpa-node/src/event/new_randomness_task.rs +++ b/crates/arpa-node/src/event/new_randomness_task.rs @@ -4,12 +4,12 @@ use arpa_core::RandomnessTask; #[derive(Clone, Debug)] pub struct NewRandomnessTask { - pub chain_id: usize, + pub chain_id: u64, pub randomness_task: RandomnessTask, } impl NewRandomnessTask { - pub fn new(chain_id: usize, randomness_task: RandomnessTask) -> Self { + pub fn new(chain_id: u64, randomness_task: RandomnessTask) -> Self { NewRandomnessTask { chain_id, randomness_task, diff --git a/crates/arpa-node/src/event/node_activation.rs b/crates/arpa-node/src/event/node_activation.rs index dd9b544b..1c5695fa 100644 --- a/crates/arpa-node/src/event/node_activation.rs +++ b/crates/arpa-node/src/event/node_activation.rs @@ -1,4 +1,4 @@ -use ethers::types::Address; +use alloy::primitives::Address; use crate::subscriber::DebuggableEvent; @@ -6,13 +6,13 @@ use super::{types::Topic, Event}; #[derive(Clone, Debug)] pub struct NodeActivation { - pub chain_id: usize, + pub chain_id: u64, pub is_eigenlayer: bool, pub node_registry_address: Address, } impl NodeActivation { - pub fn new(chain_id: usize, is_eigenlayer: bool, node_registry_address: Address) -> Self { + pub fn new(chain_id: u64, is_eigenlayer: bool, node_registry_address: Address) -> Self { NodeActivation { chain_id, is_eigenlayer, diff --git a/crates/arpa-node/src/event/provider_reconnection.rs b/crates/arpa-node/src/event/provider_reconnection.rs index 07ab09ed..6826845c 100644 --- a/crates/arpa-node/src/event/provider_reconnection.rs +++ b/crates/arpa-node/src/event/provider_reconnection.rs @@ -3,11 +3,11 @@ use crate::subscriber::DebuggableEvent; #[derive(Clone, Debug)] pub struct ProviderReconnection { - pub chain_id: usize, + pub chain_id: u64, } impl ProviderReconnection { - pub fn new(chain_id: usize) -> Self { + pub fn new(chain_id: u64) -> Self { ProviderReconnection { chain_id } } } diff --git a/crates/arpa-node/src/event/ready_to_fulfill_randomness_task.rs b/crates/arpa-node/src/event/ready_to_fulfill_randomness_task.rs index d4b90d45..6b488bca 100644 --- a/crates/arpa-node/src/event/ready_to_fulfill_randomness_task.rs +++ b/crates/arpa-node/src/event/ready_to_fulfill_randomness_task.rs @@ -4,12 +4,12 @@ use arpa_dal::cache::RandomnessResultCache; #[derive(Clone, Debug)] pub struct ReadyToFulfillRandomnessTask { - pub chain_id: usize, + pub chain_id: u64, pub tasks: Vec, } impl ReadyToFulfillRandomnessTask { - pub fn new(chain_id: usize, tasks: Vec) -> Self { + pub fn new(chain_id: u64, tasks: Vec) -> Self { ReadyToFulfillRandomnessTask { chain_id, tasks } } } diff --git a/crates/arpa-node/src/event/ready_to_handle_randomness_task.rs b/crates/arpa-node/src/event/ready_to_handle_randomness_task.rs index 35dbce20..06b5e58e 100644 --- a/crates/arpa-node/src/event/ready_to_handle_randomness_task.rs +++ b/crates/arpa-node/src/event/ready_to_handle_randomness_task.rs @@ -4,12 +4,12 @@ use arpa_core::RandomnessTask; #[derive(Clone, Debug)] pub struct ReadyToHandleRandomnessTask { - pub chain_id: usize, + pub chain_id: u64, pub tasks: Vec, } impl ReadyToHandleRandomnessTask { - pub fn new(chain_id: usize, tasks: Vec) -> Self { + pub fn new(chain_id: u64, tasks: Vec) -> Self { ReadyToHandleRandomnessTask { chain_id, tasks } } } diff --git a/crates/arpa-node/src/event/types.rs b/crates/arpa-node/src/event/types.rs index 9185003b..8adec0d1 100644 --- a/crates/arpa-node/src/event/types.rs +++ b/crates/arpa-node/src/event/types.rs @@ -2,21 +2,21 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Hash, Eq)] pub enum Topic { - NewBlock(usize), + NewBlock(u64), NewDKGTask, RunDKG, DKGPhase, DKGSuccess, DKGPostProcess, - NewRandomnessTask(usize), + NewRandomnessTask(u64), NewGroupRelayTask, - NewGroupRelayConfirmationTask(usize), - ReadyToHandleRandomnessTask(usize), + NewGroupRelayConfirmationTask(u64), + ReadyToHandleRandomnessTask(u64), ReadyToHandleGroupRelayTask, - ReadyToHandleGroupRelayConfirmationTask(usize), - ReadyToFulfillRandomnessTask(usize), + ReadyToHandleGroupRelayConfirmationTask(u64), + ReadyToFulfillRandomnessTask(u64), ReadyToFulfillGroupRelayTask, - ReadyToFulfillGroupRelayConfirmationTask(usize), + ReadyToFulfillGroupRelayConfirmationTask(u64), NodeActivation, ProviderReconnection, } diff --git a/crates/arpa-node/src/lib.rs b/crates/arpa-node/src/lib.rs index 350167f1..eee05f69 100644 --- a/crates/arpa-node/src/lib.rs +++ b/crates/arpa-node/src/lib.rs @@ -1,5 +1,7 @@ #![allow(incomplete_features)] #![allow(async_fn_in_trait)] +#![allow(clippy::large_enum_variant)] +#![allow(clippy::result_large_err)] pub mod algorithm; pub mod committer; pub mod context; diff --git a/crates/arpa-node/src/listener/block.rs b/crates/arpa-node/src/listener/block.rs index 55923804..31c08e91 100644 --- a/crates/arpa-node/src/listener/block.rs +++ b/crates/arpa-node/src/listener/block.rs @@ -85,7 +85,7 @@ impl Listener for BlockListener { Ok(()) } - fn chain_id(&self) -> usize { + fn chain_id(&self) -> u64 { self.listener_descriptor.chain_id } @@ -100,14 +100,20 @@ mod tests { use crate::event::types::Topic; use crate::queue::EventSubscriber; use crate::subscriber::{DebuggableEvent, DebuggableSubscriber, Subscriber}; + use alloy::network::TransactionBuilder; + use alloy::node_bindings::{Anvil, AnvilInstance}; + use alloy::providers::Provider; + use alloy::providers::WsConnect; + use alloy::rpc::types::TransactionRequest; + use alloy::signers::Signer; + use alloy::{ + primitives::{Address, U256}, + signers::local::PrivateKeySigner, + }; use anyhow::anyhow; - use arpa_core::{Config, FixedIntervalRetryDescriptor, GeneralMainChainIdentity, ListenerType}; - use ethers::middleware::SignerMiddleware; - use ethers::signers::{LocalWallet, Signer}; - use ethers::{ - providers::{Http, Middleware, Provider, Ws}, - types::{Address, TransactionRequest, U256}, - utils::{Anvil, AnvilInstance}, + use arpa_core::{ + build_client, Config, FixedIntervalRetryDescriptor, GeneralMainChainIdentity, ListenerType, + ProviderClientWithSigner, }; use std::sync::Arc; use std::time::Duration; @@ -118,7 +124,7 @@ mod tests { async fn mock_subscriber( eq: &mut EventQueue, subscriber_name: &str, - chain_id: usize, + chain_id: u64, ) -> tokio::sync::mpsc::Receiver> { let (sender, receiver) = tokio::sync::mpsc::channel(100); @@ -174,36 +180,43 @@ mod tests { } async fn setup_test_environment() -> ( - usize, + u64, Arc>>, Arc>, ListenerDescriptor, - Arc>, - Arc, LocalWallet>>, + ProviderClientWithSigner, + PrivateKeySigner, AnvilInstance, ) { let anvil = Anvil::new().spawn(); - let ws_provider = Arc::new(Provider::::connect(anvil.ws_endpoint()).await.unwrap()); - let http_provider = Provider::::try_from(anvil.endpoint()).unwrap(); + let ws_connect = WsConnect::new(anvil.ws_endpoint()); + + // let ws_provider = Arc::new(Provider::::connect(ws_connect.clone()).await.unwrap()); + // let http_provider = Provider::::try_from(anvil.endpoint()).unwrap(); - let wallet: LocalWallet = anvil.keys()[0].clone().into(); + let wallet: PrivateKeySigner = anvil.keys()[0].clone().into(); - let chain_id = anvil.chain_id() as usize; + let chain_id = anvil.chain_id(); - let controller_address = Address::random(); - let adapter_address = Address::random(); + let controller_address = Address::ZERO; + let adapter_address = Address::ZERO; let config = Config::default(); + let client = build_client(wallet.clone(), chain_id, ws_connect.clone()) + .await + .unwrap(); + let chain_identity = GeneralMainChainIdentity::new( chain_id, wallet.clone(), - ws_provider.clone(), + ws_connect.clone(), + client.clone(), anvil.ws_endpoint(), controller_address, adapter_address, - Address::random(), + Address::ZERO, config .get_time_limits() .contract_transaction_retry_descriptor, @@ -229,23 +242,22 @@ mod tests { }, }; - let signer = wallet.with_chain_id(anvil.chain_id()); - let client = Arc::new(SignerMiddleware::new(http_provider, signer)); + let signer = wallet.with_chain_id(Some(anvil.chain_id())); ( chain_id, chain_identity_arc, event_queue, listener_descriptor, - ws_provider, client, + signer, anvil, ) } async fn verify_new_block_event( mut event_receiver: tokio::sync::mpsc::Receiver>, - expected_chain_id: usize, + expected_chain_id: u64, expected_block_height: Option, timeout_duration: Duration, ) -> NodeResult { @@ -280,7 +292,7 @@ mod tests { async fn setup_event_subscriber( event_queue: &Arc>, - chain_id: usize, + chain_id: u64, ) -> tokio::sync::mpsc::Receiver> { let mut eq_write = event_queue.write().await; mock_subscriber(&mut *eq_write, "test_subscriber", chain_id).await @@ -329,8 +341,8 @@ mod tests { chain_identity_arc, event_queue, listener_descriptor, - _ws_provider, client, + _wallet, _anvil, ) = setup_test_environment().await; @@ -343,16 +355,13 @@ mod tests { sleep(Duration::from_millis(500)).await; - let tx = TransactionRequest::new() - .to(Address::random()) - .value(U256::from(1)); + let tx = TransactionRequest::default() + .to(Address::ZERO) + .value(U256::from(1)) + .with_chain_id(chain_id); - client - .send_transaction(tx, None) - .await - .unwrap() - .await - .unwrap(); + let pending_tx = client.send_transaction(tx).await.unwrap(); + pending_tx.get_receipt().await.unwrap(); let result = verify_new_block_event(event_receiver, chain_id, None, Duration::from_secs(5)).await; diff --git a/crates/arpa-node/src/listener/mod.rs b/crates/arpa-node/src/listener/mod.rs index 0db55392..7a8c48c0 100644 --- a/crates/arpa-node/src/listener/mod.rs +++ b/crates/arpa-node/src/listener/mod.rs @@ -85,7 +85,7 @@ pub trait Listener: Debug + Display { Ok(()) } - fn chain_id(&self) -> usize; + fn chain_id(&self) -> u64; fn listener_descriptor(&self) -> ListenerDescriptor; @@ -131,7 +131,7 @@ pub mod tests { handle_interruption_counter: Arc, should_fail: Arc, interruption_should_fail: Arc, - chain_id: usize, + chain_id: u64, initialized: Arc, } @@ -187,13 +187,13 @@ pub mod tests { } } - fn chain_id(&self) -> usize { + fn chain_id(&self) -> u64 { self.chain_id } } fn create_test_listener( - chain_id: usize, + chain_id: u64, ) -> ( TestListener, Arc, diff --git a/crates/arpa-node/src/listener/new_randomness_task.rs b/crates/arpa-node/src/listener/new_randomness_task.rs index 33ccee49..f4c62459 100644 --- a/crates/arpa-node/src/listener/new_randomness_task.rs +++ b/crates/arpa-node/src/listener/new_randomness_task.rs @@ -5,6 +5,8 @@ use crate::{ event::new_randomness_task::NewRandomnessTask, queue::{event_queue::EventQueue, EventPublisher}, }; +use alloy::primitives::Address; +use alloy::providers::Provider; use arpa_contract_client::adapter::AdapterLogs; use arpa_core::{ log::{build_task_related_payload, LogType}, @@ -12,7 +14,6 @@ use arpa_core::{ }; use arpa_dal::BLSTasksHandler; use async_trait::async_trait; -use ethers::{providers::Middleware, types::Address}; use log::info; use serde_json::json; use std::{marker::PhantomData, sync::Arc}; @@ -127,7 +128,7 @@ impl Listener for NewRandomnessTaskListener { Ok(()) } - fn chain_id(&self) -> usize { + fn chain_id(&self) -> u64 { self.listener_descriptor.chain_id } @@ -168,7 +169,7 @@ mod tests { ws_provider: Arc>, wallet: LocalWallet, id_address: Address, - chain_id: usize, + chain_id: u64, client: Arc, LocalWallet>>, chain_identity_arc: Arc>>, randomness_tasks_cache: Arc>>>, @@ -275,7 +276,7 @@ mod tests { let adapter_address = mock_adapter.address(); println!("Mock Adapter deployed at: {}", adapter_address); - let controller_address = Address::random(); + let controller_address = random_address(); let config = Config::default(); let chain_identity = GeneralMainChainIdentity::new( chain_id, @@ -284,7 +285,7 @@ mod tests { anvil.ws_endpoint(), controller_address, adapter_address, - Address::random(), + random_address(), config .get_time_limits() .contract_transaction_retry_descriptor, @@ -426,7 +427,7 @@ mod tests { fn verify_against_event( &self, event: &NewRandomnessTask, - expected_chain_id: usize, + expected_chain_id: u64, _current_block_number: u64, ) -> NodeResult<()> { println!( diff --git a/crates/arpa-node/src/listener/post_commit_grouping.rs b/crates/arpa-node/src/listener/post_commit_grouping.rs index 35764c7a..3997657d 100644 --- a/crates/arpa-node/src/listener/post_commit_grouping.rs +++ b/crates/arpa-node/src/listener/post_commit_grouping.rs @@ -5,11 +5,11 @@ use crate::{ event::dkg_success::DKGSuccess, queue::{event_queue::EventQueue, EventPublisher}, }; +use alloy::providers::Provider; use arpa_contract_client::controller::ControllerViews; use arpa_core::{DKGStatus, ListenerDescriptor}; use arpa_dal::GroupInfoHandler; use async_trait::async_trait; -use ethers::providers::Middleware; use std::{marker::PhantomData, sync::Arc}; use threshold_bls::group::Curve; use tokio::sync::RwLock; @@ -95,7 +95,7 @@ impl Listener for PostCommitGroupingListener< Ok(()) } - fn chain_id(&self) -> usize { + fn chain_id(&self) -> u64 { self.listener_descriptor.chain_id } @@ -182,7 +182,7 @@ mod tests { pc: PhantomData, }; - let dummy_id_address = Address::random(); + let dummy_id_address = random_address(); let dummy_group = Group:: { index: 1, epoch: 1, @@ -191,7 +191,7 @@ mod tests { state: true, public_key: None, members: BTreeMap::new(), - committers: vec![Address::random()], + committers: vec![random_address()], c: PhantomData, }; @@ -228,7 +228,7 @@ mod tests { wallet.clone().with_chain_id(anvil.chain_id()), )); - let node_registry_address = Address::random(); + let node_registry_address = random_address(); let controller = deploy_with_args_and_get_mock_controller(client, node_registry_address) .await @@ -238,7 +238,7 @@ mod tests { } fn setup_chain_identity( - chain_id: usize, + chain_id: u64, wallet: LocalWallet, ws_provider: Arc>, ws_endpoint: String, @@ -252,8 +252,8 @@ mod tests { ws_provider.clone(), ws_endpoint, controller_address, - Address::random(), - Address::random(), + random_address(), + random_address(), config .get_time_limits() .contract_transaction_retry_descriptor, @@ -319,7 +319,7 @@ mod tests { async fn setup_group_cache( id_address: Address, - chain_id: usize, + chain_id: u64, group_index: usize, epoch: usize, size: usize, @@ -340,7 +340,7 @@ mod tests { threshold, assignment_block_height: 100, members: member_addresses.clone(), - coordinator_address: Address::random(), + coordinator_address: random_address(), }; group_cache_write.save_task_info(chain_id, dkg_task).await?; @@ -353,7 +353,7 @@ mod tests { } fn create_listener( - chain_id: usize, + chain_id: u64, chain_identity_arc: Arc>>, group_cache: Arc>>>, event_queue: Arc>, @@ -380,7 +380,7 @@ mod tests { fn assert_dkg_success_event( event: &DKGSuccess, - expected_chain_id: usize, + expected_chain_id: u64, expected_id_address: Address, expected_group_index: usize, expected_epoch: usize, @@ -399,7 +399,7 @@ mod tests { async fn wait_and_verify_event( event_receiver: &mut tokio::sync::mpsc::Receiver>, - expected_chain_id: usize, + expected_chain_id: u64, expected_id_address: Address, expected_group_index: usize, expected_epoch: usize, @@ -464,8 +464,8 @@ mod tests { let mut member_addresses = Vec::new(); member_addresses.push(id_address); - member_addresses.push(Address::random()); - member_addresses.push(Address::random()); + member_addresses.push(random_address()); + member_addresses.push(random_address()); let committer_addresses = vec![id_address]; diff --git a/crates/arpa-node/src/listener/post_grouping.rs b/crates/arpa-node/src/listener/post_grouping.rs index 2ed46d5b..a2c54568 100644 --- a/crates/arpa-node/src/listener/post_grouping.rs +++ b/crates/arpa-node/src/listener/post_grouping.rs @@ -108,7 +108,7 @@ impl Listener for PostGroupingListener { Ok(()) } - fn chain_id(&self) -> usize { + fn chain_id(&self) -> u64 { self.listener_descriptor.chain_id } @@ -209,7 +209,7 @@ mod tests { } async fn create_test_caches( - chain_id: usize, + chain_id: u64, id_address: Address, ) -> ( Arc>>, @@ -238,8 +238,8 @@ mod tests { size: 3, threshold: 2, assignment_block_height: 50, - members: vec![id_address, Address::random(), Address::random()], - coordinator_address: Address::random(), + members: vec![id_address, random_address(), random_address()], + coordinator_address: random_address(), }; group_cache_write.save_task_info(0, dkg_task).await?; @@ -249,7 +249,7 @@ mod tests { Ok(()) } - fn create_listener_descriptor(chain_id: usize) -> ListenerDescriptor { + fn create_listener_descriptor(chain_id: u64) -> ListenerDescriptor { ListenerDescriptor { chain_id, l_type: ListenerType::PostGrouping, @@ -287,8 +287,8 @@ mod tests { provider, anvil.ws_endpoint(), controller, - Address::random(), - Address::random(), + random_address(), + random_address(), config .get_time_limits() .contract_transaction_retry_descriptor, @@ -304,7 +304,7 @@ mod tests { } async fn create_test_listener_with_chain_identity( - chain_id: usize, + chain_id: u64, id_address: Address, block_height: usize, dkg_status: DKGStatus, @@ -344,7 +344,7 @@ mod tests { } async fn create_test_listener( - chain_id: usize, + chain_id: u64, id_address: Address, block_height: usize, dkg_status: DKGStatus, @@ -378,7 +378,7 @@ mod tests { let size = 3usize; let threshold = 2usize; let empty_public_key = [U256::zero(), U256::zero(), U256::zero(), U256::zero()]; - let member_addresses = vec![id_address, Address::random(), Address::random()]; + let member_addresses = vec![id_address, random_address(), random_address()]; let tx_request = controller.set_group( group_index.into(), @@ -406,7 +406,7 @@ mod tests { #[tokio::test] async fn test_post_grouping_listener_timeout() -> NodeResult<()> { let chain_id = 1; - let id_address = Address::random(); + let id_address = random_address(); let dkg_timeout_duration = 100; let anvil = Anvil::new().chain_id(chain_id as u64).spawn(); @@ -417,7 +417,7 @@ mod tests { let wallet = wallet.with_chain_id(chain_id as u64); let client = Arc::new(SignerMiddleware::new(http_provider.clone(), wallet.clone())); - let node_registry_address = Address::random(); + let node_registry_address = random_address(); let controller = deploy_with_args_and_get_mock_controller(client.clone(), node_registry_address) .await @@ -441,8 +441,8 @@ mod tests { ws_provider, anvil.ws_endpoint(), controller_address, - Address::random(), - Address::random(), + random_address(), + random_address(), config .get_time_limits() .contract_transaction_retry_descriptor, @@ -484,7 +484,7 @@ mod tests { #[tokio::test] async fn test_post_grouping_listener_no_timeout() -> NodeResult<()> { let chain_id = 1; - let id_address = Address::random(); + let id_address = random_address(); let dkg_timeout_duration = 100; let (listener, mut event_receiver) = create_test_listener( @@ -511,7 +511,7 @@ mod tests { #[tokio::test] async fn test_post_grouping_listener_dkg_none() -> NodeResult<()> { let chain_id = 1; - let id_address = Address::random(); + let id_address = random_address(); let dkg_timeout_duration = 100; let (listener, mut event_receiver) = create_test_listener( diff --git a/crates/arpa-node/src/listener/pre_grouping.rs b/crates/arpa-node/src/listener/pre_grouping.rs index cad24ba1..03657a85 100644 --- a/crates/arpa-node/src/listener/pre_grouping.rs +++ b/crates/arpa-node/src/listener/pre_grouping.rs @@ -5,6 +5,7 @@ use crate::{ event::new_dkg_task::NewDKGTask, queue::{event_queue::EventQueue, EventPublisher}, }; +use alloy::providers::Provider; use arpa_contract_client::controller::ControllerLogs; use arpa_core::{ log::{build_task_related_payload, LogType}, @@ -12,7 +13,6 @@ use arpa_core::{ }; use arpa_dal::GroupInfoHandler; use async_trait::async_trait; -use ethers::providers::Middleware; use log::info; use serde_json::json; use std::{marker::PhantomData, sync::Arc}; @@ -127,7 +127,7 @@ impl Listener for PreGroupingListener { Ok(()) } - fn chain_id(&self) -> usize { + fn chain_id(&self) -> u64 { self.listener_descriptor.chain_id } @@ -164,7 +164,7 @@ mod tests { anvil: AnvilInstance, wallet: LocalWallet, id_address: Address, - chain_id: usize, + chain_id: u64, controller_address: Address, adapter_address: Address, node_registry_address: Address, @@ -176,9 +176,9 @@ mod tests { let wallet: LocalWallet = anvil.keys()[0].clone().into(); let id_address = wallet.address(); let chain_id = anvil.chain_id() as usize; - let controller_address = Address::random(); - let adapter_address = Address::random(); - let node_registry_address = Address::random(); + let controller_address = random_address(); + let adapter_address = random_address(); + let node_registry_address = random_address(); Self { anvil, @@ -284,9 +284,9 @@ mod tests { impl DkgTaskParams { fn new(id_address: Address, include_self: bool) -> Self { let members = if include_self { - vec![id_address, Address::random(), Address::random()] + vec![id_address, random_address(), random_address()] } else { - vec![Address::random(), Address::random(), Address::random()] + vec![random_address(), random_address(), random_address()] }; Self { @@ -297,12 +297,12 @@ mod tests { size: U256::from(3), threshold: U256::from(2), assignment_block_height: U256::from(100), - coordinator_address: Address::random(), + coordinator_address: random_address(), } } } - fn create_listener_descriptor(chain_id: usize) -> ListenerDescriptor { + fn create_listener_descriptor(chain_id: u64) -> ListenerDescriptor { ListenerDescriptor { chain_id, l_type: ListenerType::PreGrouping, @@ -411,8 +411,8 @@ mod tests { size: 3, threshold: 2, assignment_block_height: 100, - members: vec![env.id_address, Address::random(), Address::random()], - coordinator_address: Address::random(), + members: vec![env.id_address, random_address(), random_address()], + coordinator_address: random_address(), }; components @@ -534,8 +534,8 @@ mod tests { size: 3, threshold: 2, assignment_block_height: 50, - members: vec![env.id_address, Address::random(), Address::random()], - coordinator_address: Address::random(), + members: vec![env.id_address, random_address(), random_address()], + coordinator_address: random_address(), }; group_cache_write.save_task_info(0, dkg_task).await?; diff --git a/crates/arpa-node/src/listener/randomness_signature_aggregation.rs b/crates/arpa-node/src/listener/randomness_signature_aggregation.rs index 72aadfe1..eec796b0 100644 --- a/crates/arpa-node/src/listener/randomness_signature_aggregation.rs +++ b/crates/arpa-node/src/listener/randomness_signature_aggregation.rs @@ -4,11 +4,11 @@ use crate::{ event::ready_to_fulfill_randomness_task::ReadyToFulfillRandomnessTask, queue::{event_queue::EventQueue, EventPublisher}, }; +use alloy::primitives::Address; use arpa_core::ListenerDescriptor; use arpa_dal::cache::RandomnessResultCache; use arpa_dal::{BlockInfoHandler, GroupInfoHandler, SignatureResultCacheHandler}; use async_trait::async_trait; -use ethers::types::Address; use std::{marker::PhantomData, sync::Arc}; use threshold_bls::group::Curve; use tokio::sync::RwLock; @@ -100,7 +100,7 @@ impl Listener for RandomnessSignatureAggregationListene Ok(()) } - fn chain_id(&self) -> usize { + fn chain_id(&self) -> u64 { self.listener_descriptor.chain_id } @@ -121,10 +121,14 @@ mod tests { use crate::queue::EventSubscriber; use crate::scheduler::TaskScheduler; use crate::subscriber::{DebuggableEvent, DebuggableSubscriber, Subscriber}; + use alloy::node_bindings::Anvil; + use alloy::primitives::U256; + use alloy::providers::WsConnect; + use alloy::signers::local::PrivateKeySigner; use arpa_core::{ - ComponentTaskType, Config, DKGStatus, FixedIntervalRetryDescriptor, - GeneralMainChainIdentity, ListenerType, RandomnessRequestType, RandomnessTask, - PLACEHOLDER_ADDRESS, + build_client, random_address, ComponentTaskType, Config, DKGStatus, + FixedIntervalRetryDescriptor, GeneralMainChainIdentity, ListenerType, + RandomnessRequestType, RandomnessTask, PLACEHOLDER_ADDRESS, }; use arpa_dal::{ cache::{ @@ -133,11 +137,6 @@ mod tests { }, BLSTasksHandler, GroupInfoHandler, NodeInfoHandler, SignatureResultCacheHandler, }; - use ethers::{ - providers::{Provider, Ws}, - types::Address, - utils::Anvil, - }; use std::time::Duration; use threshold_bls::schemes::bn254::G2Curve; use threshold_bls::schemes::bn254::G2Scheme; @@ -156,8 +155,8 @@ mod tests { size: 3, threshold: 2, assignment_block_height: 100, - members: vec![address, Address::random(), Address::random()], - coordinator_address: Address::random(), + members: vec![address, random_address(), random_address()], + coordinator_address: random_address(), }; group_cache.save_task_info(0, task).await.unwrap(); @@ -179,7 +178,7 @@ mod tests { group_cache: &mut Box>, address: Address, ) { - setup_dkg_task(group_cache, address, vec![Address::random()]).await; + setup_dkg_task(group_cache, address, vec![random_address()]).await; } async fn mock_set_block_height(block_cache: &mut Box, height: u64) { @@ -196,11 +195,11 @@ mod tests { group_index: 1, request_type: RandomnessRequestType::Randomness, params: vec![1, 2, 3], - requester: Address::random(), - seed: ethers::types::U256::from(123), + requester: random_address(), + seed: U256::from(123), request_confirmations: 10, callback_gas_limit: 100000, - callback_max_gas_price: ethers::types::U256::from(1000000000), + callback_max_gas_price: 1000000000, assignment_block_height: fulfillment_block_number as usize, } } @@ -214,7 +213,7 @@ mod tests { .await .unwrap(); - let addresses = [Address::random(), Address::random()]; + let addresses = [random_address(), random_address()]; for (i, addr) in addresses.iter().enumerate() { let partial_sig_data = vec![i as u8, 42, 255]; @@ -286,12 +285,13 @@ mod tests { async fn build_context() -> NodeContext { let config = Config::default(); - let fake_wallet = "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318" - .parse() - .unwrap(); + let fake_wallet: PrivateKeySigner = + "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318" + .parse() + .unwrap(); let node_cache: Arc>>> = Arc::new(RwLock::new( - Box::new(InMemoryNodeInfoCache::::new(Address::random())), + Box::new(InMemoryNodeInfoCache::::new(random_address())), )); let group_cache: Arc>>> = Arc::new(RwLock::new( @@ -309,7 +309,15 @@ mod tests { let avnil = Anvil::new().spawn(); - let provider = Arc::new(Provider::::connect(avnil.ws_endpoint()).await.unwrap()); + let ws_connect = WsConnect::new(avnil.ws_endpoint()); + + let client = build_client( + fake_wallet.clone(), + config.get_main_chain_id(), + ws_connect.clone(), + ) + .await + .unwrap(); let contract_transaction_retry_descriptor = config .get_time_limits() @@ -321,11 +329,12 @@ mod tests { let main_chain_identity = GeneralMainChainIdentity::new( config.get_main_chain_id(), fake_wallet, - provider, + ws_connect, + client, avnil.ws_endpoint(), - Address::random(), - Address::random(), - Address::random(), + random_address(), + random_address(), + random_address(), contract_transaction_retry_descriptor, contract_view_retry_descriptor, None, diff --git a/crates/arpa-node/src/listener/ready_to_handle_randomness_task.rs b/crates/arpa-node/src/listener/ready_to_handle_randomness_task.rs index a9eba94b..06b7d9c9 100644 --- a/crates/arpa-node/src/listener/ready_to_handle_randomness_task.rs +++ b/crates/arpa-node/src/listener/ready_to_handle_randomness_task.rs @@ -5,11 +5,12 @@ use crate::{ event::ready_to_handle_randomness_task::ReadyToHandleRandomnessTask, queue::{event_queue::EventQueue, EventPublisher}, }; +use alloy::primitives::Address; +use alloy::providers::Provider; use arpa_contract_client::adapter::AdapterViews; use arpa_core::{ListenerDescriptor, RandomnessTask}; use arpa_dal::{BLSTasksHandler, BlockInfoHandler, GroupInfoHandler}; use async_trait::async_trait; -use ethers::{providers::Middleware, types::Address}; use std::{marker::PhantomData, sync::Arc}; use threshold_bls::group::Curve; use tokio::sync::RwLock; @@ -130,7 +131,7 @@ impl Listener for ReadyToHandleRandomnessTaskListener

usize { + fn chain_id(&self) -> u64 { self.listener_descriptor.chain_id } @@ -275,7 +276,7 @@ mod tests { async fn create_test_subscriber( eq: &mut EventQueue, subscriber_name: &str, - chain_id: usize, + chain_id: u64, ) -> tokio::sync::mpsc::Receiver> { let (sender, receiver) = tokio::sync::mpsc::channel(100); @@ -353,7 +354,7 @@ mod tests { group_index: 1, request_type: RandomnessRequestType::Randomness, params, - requester: Address::random(), + requester: random_address(), seed: U256::from(seed), request_confirmations: 5, callback_gas_limit: 100000, @@ -388,7 +389,7 @@ mod tests { threshold: 2, assignment_block_height: 90, members: vec![id_address], - coordinator_address: Address::random(), + coordinator_address: random_address(), }; group_cache_write.save_task_info(0, dkg_task).await.unwrap(); group_cache_write @@ -450,7 +451,7 @@ mod tests { async fn verify_event_content( event: &ReadyToHandleRandomnessTask, - expected_chain_id: usize, + expected_chain_id: u64, expected_task_count: Option, expected_request_ids: Option>>, test_name: &str, @@ -512,7 +513,7 @@ mod tests { println!("Adapter contract deployed at: {}", adapter_address); - let controller_address = Address::random(); + let controller_address = random_address(); let config = Config::default(); let chain_identity = GeneralMainChainIdentity::new( @@ -521,7 +522,7 @@ mod tests { ws_provider.clone(), anvil.ws_endpoint(), controller_address, - Address::random(), + random_address(), adapter_address, config .get_time_limits() diff --git a/crates/arpa-node/src/listener/schedule_node_activation.rs b/crates/arpa-node/src/listener/schedule_node_activation.rs index 98b6b15b..91322e55 100644 --- a/crates/arpa-node/src/listener/schedule_node_activation.rs +++ b/crates/arpa-node/src/listener/schedule_node_activation.rs @@ -5,10 +5,11 @@ use crate::{ event::node_activation::NodeActivation, queue::{event_queue::EventQueue, EventPublisher}, }; +use alloy::primitives::Address; +use alloy::providers::Provider; use arpa_contract_client::{controller::ControllerViews, node_registry::NodeRegistryViews}; use arpa_core::ListenerDescriptor; use async_trait::async_trait; -use ethers::{providers::Middleware, types::Address}; use std::{marker::PhantomData, sync::Arc}; use threshold_bls::group::Curve; use tokio::sync::RwLock; @@ -105,7 +106,7 @@ impl Listener for NodeActivationListener { Ok(()) } - fn chain_id(&self) -> usize { + fn chain_id(&self) -> u64 { self.listener_descriptor.chain_id } @@ -145,7 +146,7 @@ mod tests { ws_provider: Arc>, wallet: LocalWallet, id_address: Address, - chain_id: usize, + chain_id: u64, controller_address: Address, node_registry_address: Address, } @@ -195,7 +196,7 @@ mod tests { self.ws_provider.clone(), ws_endpoint, self.controller_address, - Address::random(), + random_address(), self.node_registry_address, config .get_time_limits() @@ -388,7 +389,7 @@ mod tests { fn assert_node_activation_event( event: &NodeActivation, - expected_chain_id: usize, + expected_chain_id: u64, expected_is_eigenlayer: bool, expected_node_registry_address: Address, ) { diff --git a/crates/arpa-node/src/listener/schedule_provider_reconnection.rs b/crates/arpa-node/src/listener/schedule_provider_reconnection.rs index 562082b7..d116c8a1 100644 --- a/crates/arpa-node/src/listener/schedule_provider_reconnection.rs +++ b/crates/arpa-node/src/listener/schedule_provider_reconnection.rs @@ -4,13 +4,13 @@ use crate::{ error::NodeResult, scheduler::{fixed::SimpleFixedTaskScheduler, FixedTaskScheduler}, }; +use alloy::providers::Provider; use arpa_core::{ jitter_fluctuate, log::{build_general_payload, LogType}, ComponentTaskType, ListenerDescriptor, ListenerType, }; use async_trait::async_trait; -use ethers::providers::Middleware; use log::{debug, error}; use std::{marker::PhantomData, sync::Arc, time::Duration}; use threshold_bls::group::Curve; @@ -141,7 +141,7 @@ impl Listener for ProviderReconnectionListener { Ok(()) } - fn chain_id(&self) -> usize { + fn chain_id(&self) -> u64 { self.listener_descriptor.chain_id } @@ -160,16 +160,17 @@ impl Listener for ProviderReconnectionListener { mod tests { use super::*; use crate::{context::ChainIdentityHandlerType, scheduler::TaskScheduler}; + use alloy::node_bindings::Anvil; + use alloy::node_bindings::AnvilInstance; + use alloy::providers::WsConnect; + use alloy::signers::local::PrivateKeySigner; + use alloy::signers::Signer; + use arpa_core::build_client; + use arpa_core::random_address; use arpa_core::{ Config, FixedIntervalRetryDescriptor, GeneralMainChainIdentity, ListenerType, SubscriberType, }; - use ethers::{ - providers::{Provider, Ws}, - signers::{LocalWallet, Signer}, - types::Address, - utils::{Anvil, AnvilInstance}, - }; use std::{sync::Arc, time::Duration}; use threshold_bls::schemes::bn254::G2Curve; use tokio::sync::RwLock; @@ -198,7 +199,7 @@ mod tests { Ok(()) } - fn chain_id(&self) -> usize { + fn chain_id(&self) -> u64 { self.descriptor.chain_id } @@ -207,7 +208,7 @@ mod tests { } } - fn create_mock_listener(chain_id: usize, l_type: ListenerType, message: &str) -> MockListener { + fn create_mock_listener(chain_id: u64, l_type: ListenerType, message: &str) -> MockListener { MockListener { descriptor: ListenerDescriptor { chain_id, @@ -226,7 +227,7 @@ mod tests { async fn setup_test_environment() -> NodeResult<( AnvilInstance, - usize, + u64, Arc>>, Arc>, )> { @@ -235,30 +236,36 @@ mod tests { let anvil = Anvil::new().spawn(); println!("Anvil instance started at {}", anvil.endpoint()); - let ws_provider = Arc::new(Provider::::connect(anvil.ws_endpoint()).await?); + let ws_connect = + WsConnect::new(anvil.ws_endpoint()).with_retry_interval(Duration::from_millis(3000)); + println!("Connected to Anvil WebSocket at {}", anvil.ws_endpoint()); - let wallet: LocalWallet = anvil.keys()[0].clone().into(); - let wallet_with_chain_id = wallet.clone().with_chain_id(anvil.chain_id()); - let chain_id = anvil.chain_id() as usize; + let wallet: PrivateKeySigner = anvil.keys()[0].clone().into(); + let wallet_with_chain_id = wallet.clone().with_chain_id(Some(anvil.chain_id())); + let chain_id = anvil.chain_id(); println!( "Using wallet address: {}, Chain ID: {}", wallet.clone().address(), chain_id ); - let adapter_address = Address::random(); - let controller_address = Address::random(); + let adapter_address = random_address(); + let controller_address = random_address(); let config = Config::default(); + let client = + build_client(wallet_with_chain_id.clone(), chain_id, ws_connect.clone()).await?; + let chain_identity = GeneralMainChainIdentity::new( chain_id, wallet_with_chain_id.clone(), - ws_provider.clone(), + ws_connect.clone(), + client, anvil.ws_endpoint(), controller_address, adapter_address, - Address::random(), + random_address(), config .get_time_limits() .contract_transaction_retry_descriptor, @@ -281,7 +288,7 @@ mod tests { async fn add_test_tasks( f_ts: &Arc>, - chain_id: usize, + chain_id: u64, ) -> NodeResult<()> { let mut scheduler = f_ts.write().await; diff --git a/crates/arpa-node/src/management/mod.rs b/crates/arpa-node/src/management/mod.rs index faa12201..339cd4e1 100644 --- a/crates/arpa-node/src/management/mod.rs +++ b/crates/arpa-node/src/management/mod.rs @@ -5,6 +5,7 @@ use super::{ error::NodeResult, scheduler::FixedTaskScheduler, }; +use alloy::primitives::Address; use anyhow::Result; use arpa_contract_client::controller::ControllerTransactions; use arpa_core::{ @@ -15,7 +16,6 @@ use arpa_core::{ DEFAULT_COMMIT_PARTIAL_SIGNATURE_RETRY_USE_JITTER, }; use arpa_dal::error::DataAccessResult; -use ethers::types::Address; use threshold_bls::{ group::Curve, sig::{Share, SignatureScheme, ThresholdScheme}, @@ -57,12 +57,11 @@ pub trait NodeService { pub trait ComponentService { async fn list_fixed_tasks(&self) -> SchedulerResult>; - async fn start_listener(&self, chain_id: usize, task_type: ListenerType) - -> SchedulerResult<()>; + async fn start_listener(&self, chain_id: u64, task_type: ListenerType) -> SchedulerResult<()>; async fn shutdown_listener( &self, - chain_id: usize, + chain_id: u64, task_type: ListenerType, ) -> SchedulerResult<()>; } @@ -98,7 +97,7 @@ pub trait BLSRandomnessService { async fn send_partial_sig( &self, - chain_id: usize, + chain_id: u64, member_id_address: Address, msg: Vec, randomness_task_request_id: Vec, @@ -181,11 +180,7 @@ where .collect()) } - async fn start_listener( - &self, - chain_id: usize, - task_type: ListenerType, - ) -> SchedulerResult<()> { + async fn start_listener(&self, chain_id: u64, task_type: ListenerType) -> SchedulerResult<()> { let main_chain_id = self .get_main_chain() .get_chain_identity() @@ -218,7 +213,7 @@ where async fn shutdown_listener( &self, - chain_id: usize, + chain_id: u64, task_type: ListenerType, ) -> SchedulerResult<()> { self.get_fixed_task_handler() @@ -486,7 +481,7 @@ where async fn send_partial_sig( &self, - chain_id: usize, + chain_id: u64, member_id_address: Address, msg: Vec, randomness_task_request_id: Vec, diff --git a/crates/arpa-node/src/management/server.rs b/crates/arpa-node/src/management/server.rs index 4638bc73..47dce8d2 100644 --- a/crates/arpa-node/src/management/server.rs +++ b/crates/arpa-node/src/management/server.rs @@ -1,3 +1,4 @@ +use super::{BLSRandomnessService, DBService, DKGService, GroupInfo, NodeInfo, NodeService}; use crate::context::types::GeneralContext; use crate::context::ContextFetcher; use crate::error::NodeError; @@ -15,28 +16,23 @@ use crate::rpc_stub::management::{ StartListenerReply, StartListenerRequest, VerifyPartialSigsReply, VerifyPartialSigsRequest, VerifySigReply, VerifySigRequest, }; +use alloy::hex::FromHexError; use arpa_core::{ address_to_string, Group as ModelGroup, ListenerType, Member as ModelMember, SchedulerError, }; use arpa_dal::error::DataAccessError; use arpa_log::debug; use hyper::http::HeaderValue; -use rustc_hex::FromHexError; use std::sync::Arc; -use std::{ - task::{Context, Poll}, - time::Duration, -}; +use std::task::{Context, Poll}; +use thiserror::Error; use threshold_bls::group::Curve; use threshold_bls::sig::{SignatureScheme, ThresholdScheme}; use tokio::sync::RwLock; -use tonic::transport::Body; -use tonic::{body::BoxBody, transport::Server, Request, Response, Status}; +use tonic::{transport::Server, Request, Response, Status}; use tower::{Layer, Service}; use uuid::Uuid; -use super::{BLSRandomnessService, DBService, DKGService, GroupInfo, NodeInfo, NodeService}; - type NodeContext = Arc>>; pub(crate) struct NodeManagementServiceServer< @@ -99,7 +95,7 @@ where self.context .write() .await - .start_listener(req.chain_id as usize, task_type) + .start_listener(req.chain_id as u64, task_type) .await .map_err(|e: SchedulerError| Status::already_exists(e.to_string()))?; @@ -119,7 +115,7 @@ where self.context .write() .await - .shutdown_listener(req.chain_id as usize, task_type) + .shutdown_listener(req.chain_id as u64, task_type) .await .map_err(|e: SchedulerError| Status::not_found(e.to_string()))?; @@ -310,7 +306,7 @@ where .write() .await .send_partial_sig( - req.chain_id as usize, + req.chain_id as u64, member_id_address, msg, request_id, @@ -417,7 +413,7 @@ where // The stack of middleware that our service will be wrapped in let layer = tower::ServiceBuilder::new() // Apply middleware from tower - .timeout(Duration::from_secs(30)) + // .timeout(Duration::from_secs(30)) // Apply our own middleware .layer(LogLayer::new(context.clone())) // Interceptors can be also be applied as middleware @@ -476,8 +472,18 @@ struct LogService< context: NodeContext, } +#[derive(Debug, Error)] +enum LogError { + #[error("{0}")] + Injected(String), + #[error("Inner error: {0}")] + Inner(E), +} + impl< S, + ReqBody, + ResBody, PC: Curve + std::fmt::Debug + Clone + Sync + Send + 'static, SS: SignatureScheme + ThresholdScheme @@ -485,20 +491,24 @@ impl< + Send + Sync + 'static, - > Service> for LogService + > Service> for LogService where - S: Service, Response = hyper::Response> + Clone + Send + 'static, + S: Service, Response = hyper::Response> + + Clone + + Send + + 'static, S::Future: Send + 'static, + ReqBody: std::fmt::Debug + Send + 'static, { type Response = S::Response; - type Error = S::Error; + type Error = LogError; type Future = futures::future::BoxFuture<'static, Result>; fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { - self.inner.poll_ready(cx) + self.inner.poll_ready(cx).map_err(LogError::Inner) } - fn call(&mut self, req: hyper::Request) -> Self::Future { + fn call(&mut self, req: hyper::Request) -> Self::Future { // This is necessary because tonic internally uses `tower::buffer::Buffer`. // See https://github.com/tower-rs/tower/issues/547#issuecomment-767629149 // for details on why this is necessary @@ -523,10 +533,12 @@ where match req.headers().get("authorization") { Some(t) if token == t => {} - _ => return Ok(Status::unauthenticated("No valid auth token").to_http()), + _ => { + return Err(LogError::Injected("No valid auth token".to_string())); + } }; - let response = inner.call(req).await?; + let response = inner.call(req).await.map_err(LogError::Inner)?; log_mdc::remove("management_request_id"); diff --git a/crates/arpa-node/src/node_client.rs b/crates/arpa-node/src/node_client.rs index d62ea906..9980745b 100644 --- a/crates/arpa-node/src/node_client.rs +++ b/crates/arpa-node/src/node_client.rs @@ -1,9 +1,12 @@ +use alloy::providers::WsConnect; +use alloy::signers::local::PrivateKeySigner; use arpa_contract_client::controller::ControllerClientBuilder; use arpa_contract_client::controller::ControllerViews; use arpa_contract_client::error::ContractClientError; use arpa_contract_client::node_registry::NodeRegistryViews; use arpa_contract_client::node_registry::{NodeRegistryClientBuilder, NodeRegistryTransactions}; use arpa_core::address_to_string; +use arpa_core::build_client; use arpa_core::build_wallet_from_config; use arpa_core::log::build_general_payload; use arpa_core::log::build_transaction_receipt_payload; @@ -22,12 +25,6 @@ use arpa_node::context::types::GeneralContext; use arpa_node::context::{Context, TaskWaiter}; use arpa_sqlite_db::SqliteDB; use check_latest::check_max_async; -use ethers::core::k256::ecdsa::SigningKey; -use ethers::providers::Provider; -use ethers::providers::Ws; -use ethers::signers::Signer; -use ethers::signers::Wallet; -use ethers::types::U256; use log::{error, info, LevelFilter}; use log4rs::append::console::ConsoleAppender; use log4rs::append::rolling_file::policy::compound::roll::delete::DeleteRoller; @@ -66,7 +63,7 @@ pub struct Opt { fn init_logger( node_id: &str, - l1_chain_id: usize, + l1_chain_id: u64, log_level: &str, context_logging: bool, log_file_path: &str, @@ -211,7 +208,7 @@ async fn main() -> Result<(), Box> { async fn start( config: Config, - wallet: Wallet, + wallet: PrivateKeySigner, mut shutdown_rx: tokio::sync::broadcast::Receiver<()>, ) -> Result<(), Box> { let id_address = wallet.address(); @@ -234,7 +231,7 @@ async fn start( let db = SqliteDB::build( data_path.as_os_str().to_str().unwrap(), - &wallet.signer().to_bytes(), + wallet.to_bytes().as_slice(), ) .await?; @@ -301,21 +298,28 @@ async fn start( let randomness_result_cache = Arc::new(RwLock::new(db.build_randomness_result_cache(0).await?)); - let provider = Arc::new( - Provider::::connect_with_reconnects( - config.get_provider_endpoint(), - DEFAULT_WEBSOCKET_PROVIDER_RECONNECT_TIMES, - ) - .await? - .interval(Duration::from_millis( - config.get_time_limits().provider_polling_interval_millis, - )), + // let provider = Arc::new( + // Provider::::connect_with_reconnects( + // config.get_provider_endpoint(), + // DEFAULT_WEBSOCKET_PROVIDER_RECONNECT_TIMES, + // ) + // .await? + // .interval(Duration::from_millis( + // config.get_time_limits().provider_polling_interval_millis, + // )), + // ); + + let ws_connect = WsConnect::new(config.get_provider_endpoint()).with_retry_interval( + Duration::from_millis(config.get_time_limits().provider_polling_interval_millis), ); + let client = build_client(wallet.clone(), l1_chain_id, ws_connect.clone()).await?; + let main_chain_identity = GeneralMainChainIdentity::new( - config.get_main_chain_id(), + l1_chain_id, wallet.clone(), - provider, + ws_connect, + client, config.get_provider_endpoint().to_string(), config .get_controller_address() @@ -355,25 +359,23 @@ async fn start( let mut context = GeneralContext::new(main_chain, config); for relayed_chain_config in relayed_chains_config { - let provider = Arc::new( - Provider::::connect_with_reconnects( - relayed_chain_config.get_provider_endpoint(), - DEFAULT_WEBSOCKET_PROVIDER_RECONNECT_TIMES, - ) - .await? - .interval(Duration::from_millis( + let relayed_chain_id = relayed_chain_config.get_chain_id(); + + let ws_connect = WsConnect::new(relayed_chain_config.get_provider_endpoint()) + .with_max_retries(DEFAULT_WEBSOCKET_PROVIDER_RECONNECT_TIMES) + .with_retry_interval(Duration::from_millis( relayed_chain_config .get_time_limits() .provider_polling_interval_millis, - )), - ); + )); - let relayed_chain_id = relayed_chain_config.get_chain_id(); + let client = build_client(wallet.clone(), relayed_chain_id, ws_connect.clone()).await?; let relayed_chain_identity = GeneralRelayedChainIdentity::new( relayed_chain_id, wallet.clone(), - provider, + ws_connect, + client, relayed_chain_config.get_provider_endpoint().to_string(), relayed_chain_config .get_controller_oracle_address() @@ -450,8 +452,8 @@ async fn start( "Node registered", l1_chain_id, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()), + receipt.gas_used, + receipt.effective_gas_price, ) ); } @@ -464,8 +466,8 @@ async fn start( "Node register failed", l1_chain_id, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()), + receipt.gas_used, + receipt.effective_gas_price, ) ); } diff --git a/crates/arpa-node/src/node_config_checker.rs b/crates/arpa-node/src/node_config_checker.rs index 26f3f7ae..827a6436 100644 --- a/crates/arpa-node/src/node_config_checker.rs +++ b/crates/arpa-node/src/node_config_checker.rs @@ -1,7 +1,6 @@ use arpa_core::address_to_string; use arpa_core::build_wallet_from_config; use arpa_core::Config; -use ethers::signers::Signer; use std::path::PathBuf; use structopt::StructOpt; diff --git a/crates/arpa-node/src/node_shell.rs b/crates/arpa-node/src/node_shell.rs index e564ef64..46263157 100644 --- a/crates/arpa-node/src/node_shell.rs +++ b/crates/arpa-node/src/node_shell.rs @@ -1,27 +1,35 @@ +use alloy::eips::{BlockId, BlockNumberOrTag}; +use alloy::primitives::{Address, B256, U256}; +use alloy::providers::{Provider, WsConnect}; +use alloy::signers::k256::ecdsa::SigningKey; +use alloy::signers::local::coins_bip39::English; +use alloy::signers::local::{MnemonicBuilder, PrivateKeySigner}; use arpa_contract_client::adapter::AdapterViews; -use arpa_contract_client::contract_stub::adapter::Adapter as AdapterContract; -use arpa_contract_client::contract_stub::ierc20::IERC20 as ArpaContract; -use arpa_contract_client::contract_stub::staking::Staking as StakingContract; +use arpa_contract_client::ethers::adapter::Adapter::{self, AdapterInstance}; use arpa_contract_client::ethers::adapter::AdapterClient; -use arpa_contract_client::ethers::controller::ControllerClient; -use arpa_contract_client::ethers::controller_oracle::ControllerOracleClient; +use arpa_contract_client::ethers::controller::{self, Controller, ControllerClient}; +use arpa_contract_client::ethers::controller_oracle::{ + self, ControllerOracle, ControllerOracleClient, +}; +use arpa_contract_client::ethers::ierc20::IERC20 as ArpaContract; +use arpa_contract_client::ethers::node_registry::INodeRegistry::{self}; use arpa_contract_client::ethers::node_registry::NodeRegistryClient; +use arpa_contract_client::ethers::staking::Staking as StakingContract; +use arpa_contract_client::ethers::{ + parse_controller_contract_group, parse_controller_contract_member, + parse_controller_oracle_contract_group, parse_controller_oracle_contract_member, +}; use arpa_contract_client::node_registry::{NodeRegistryTransactions, NodeRegistryViews}; use arpa_contract_client::{ServiceClient, TransactionCaller, ViewCaller}; use arpa_core::{ - address_to_string, build_wallet_from_config, pad_to_bytes32, Account, Config, ConfigError, - GeneralMainChainIdentity, GeneralRelayedChainIdentity, Keystore, WsWalletSigner, + address_to_string, build_client, build_wallet_from_config, pad_to_bytes32_fixed_bytes, Account, + Config, ConfigError, GeneralMainChainIdentity, GeneralRelayedChainIdentity, Keystore, + ProviderClientWithSigner, }; use arpa_dal::NodeInfoFetcher; use arpa_node::context::ChainIdentityHandlerType; use arpa_node::management::client::GeneralManagementClient; use arpa_sqlite_db::SqliteDB; -use ethers::prelude::k256::ecdsa::SigningKey; -use ethers::providers::{Middleware, Provider, Ws}; -use ethers::signers::coins_bip39::English; -use ethers::signers::Signer; -use ethers::signers::{LocalWallet, MnemonicBuilder}; -use ethers::types::{Address, BlockId, BlockNumber, H256, U256, U64}; use reedline_repl_rs::clap::{value_parser, Arg, ArgAction, ArgMatches, Command}; use reedline_repl_rs::Repl; use std::collections::BTreeMap; @@ -29,7 +37,6 @@ use std::env; use std::fs::File; use std::io::{BufRead, BufReader}; use std::path::PathBuf; -use std::sync::Arc; use std::time::Duration; use structopt::StructOpt; use threshold_bls::curve::bn254::G2Curve; @@ -63,8 +70,8 @@ pub struct Opt { struct Context { config: Config, - wallet: LocalWallet, - chain_identities: BTreeMap>, + wallet: PrivateKeySigner, + chain_identities: BTreeMap>, db: SqliteDB, staking_contract_address: Option

, node_registry_address: Option
, @@ -73,7 +80,7 @@ struct Context { } impl Context { - pub fn chain_identity(&self, chain_id: usize) -> anyhow::Result<&ChainIdentityHandlerType> { + pub fn chain_identity(&self, chain_id: u64) -> anyhow::Result<&ChainIdentityHandlerType> { if !self.chain_identities.contains_key(&chain_id) { return Err(ConfigError::InvalidChainId(chain_id).into()); } @@ -81,24 +88,26 @@ impl Context { } pub async fn staking_contract_address(&mut self) -> anyhow::Result
{ + let node_registry_address = self.node_registry_address().await?; + if self.staking_contract_address.is_none() { let main_chain_id = self.config.get_main_chain_id(); let client = self .chain_identities .get(&main_chain_id) .unwrap() - .build_controller_client(); + .build_node_registry_client(node_registry_address); let controller_contract = client.prepare_service_client().await?; - let staking_contract_address = ControllerClient::call_contract_view( + let staking_contract_address = NodeRegistryClient::call_contract_view( main_chain_id, - "controller_config", - controller_contract.get_controller_config(), + "node_registry_config", + controller_contract.getNodeRegistryConfig(), self.config.get_time_limits().contract_view_retry_descriptor, ) .await? - .0; + .stakingContractAddress; self.staking_contract_address = Some(staking_contract_address); @@ -121,11 +130,11 @@ impl Context { let node_registry_address = ControllerClient::call_contract_view( main_chain_id, "controller_config", - controller_contract.get_controller_config(), + controller_contract.getControllerConfig(), self.config.get_time_limits().contract_view_retry_descriptor, ) .await? - .0; + .nodeRegistryContractAddress; self.node_registry_address = Some(node_registry_address); @@ -140,32 +149,32 @@ impl Context { pub struct RandomnessRequestResult { pub request_id: String, pub group_index: u32, - pub committer: ethers::core::types::Address, - pub participant_members: Vec, - pub randommness: ethers::core::types::U256, - pub payment: ethers::core::types::U256, - pub flat_fee: ethers::core::types::U256, + pub committer: Address, + pub participant_members: Vec
, + pub randommness: U256, + pub payment: U256, + pub flat_fee: U256, pub success: bool, } #[derive(Debug)] pub struct Block { /// Hash of the block - pub hash: Option, + pub hash: Option, /// Hash of the parent - pub parent_hash: H256, + pub parent_hash: B256, /// Hash of the uncles - pub uncles_hash: H256, + pub uncles_hash: B256, /// Miner/author's address. None if pending. pub author: Option
, /// State root hash - pub state_root: H256, + pub state_root: B256, /// Transactions root hash - pub transactions_root: H256, + pub transactions_root: B256, /// Transactions receipts root hash - pub receipts_root: H256, + pub receipts_root: B256, /// Block number. None if pending. - pub number: Option, + pub number: Option, /// Gas Used pub gas_used: U256, /// Gas Limit @@ -176,21 +185,21 @@ pub struct Block { pub size: Option, } -impl From> for Block { - fn from(block: ethers::types::Block) -> Self { +impl From> for Block { + fn from(block: alloy::rpc::types::Block) -> Self { Self { - hash: block.hash, - parent_hash: block.parent_hash, - uncles_hash: block.uncles_hash, - author: block.author, - state_root: block.state_root, - transactions_root: block.transactions_root, - receipts_root: block.receipts_root, - number: block.number, - gas_used: block.gas_used, - gas_limit: block.gas_limit, - timestamp: block.timestamp, - size: block.size, + hash: Some(block.header.hash), + parent_hash: block.header.parent_hash, + uncles_hash: block.header.ommers_hash, + author: Some(block.header.beneficiary), + state_root: block.header.state_root, + transactions_root: block.header.transactions_root, + receipts_root: block.header.receipts_root, + number: Some(block.header.number), + gas_used: U256::from(block.header.gas_used), + gas_limit: U256::from(block.header.gas_limit), + timestamp: U256::from(block.header.timestamp), + size: block.header.size, } } } @@ -213,7 +222,7 @@ async fn send( Some(("approve-arpa-to-staking", sub_matches)) => { let main_chain_id = context.config.get_main_chain_id(); let amount = sub_matches.get_one::("amount").unwrap(); - let amount = U256::from_dec_str(amount).unwrap(); + let amount = U256::from_str_radix(amount, 10).unwrap(); let arpa_contract = ArpaContract::new( context.config.find_arpa_address(main_chain_id)?, @@ -223,7 +232,7 @@ async fn send( let trx_hash = ArpaClient::call_contract_transaction( main_chain_id, "approve-arpa-to-staking", - arpa_contract.client_ref(), + arpa_contract.provider(), arpa_contract.approve(context.staking_contract_address().await?, amount), context .config @@ -242,7 +251,7 @@ async fn send( Some(("stake", sub_matches)) => { let main_chain_id = context.config.get_main_chain_id(); let amount = sub_matches.get_one::("amount").unwrap(); - let amount = U256::from_dec_str(amount).unwrap(); + let amount = U256::from_str_radix(amount, 10).unwrap(); let staking_contract = StakingContract::new( context.staking_contract_address().await?, @@ -252,7 +261,7 @@ async fn send( let is_operator = StakingClient::call_contract_view( main_chain_id, "is_operator", - staking_contract.is_operator(context.wallet.address()), + staking_contract.isOperator(context.wallet.address()), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -273,7 +282,7 @@ async fn send( let balance = ArpaClient::call_contract_view( main_chain_id, "balance_of", - arpa_contract.balance_of(context.chain_identity(main_chain_id)?.get_id_address()), + arpa_contract.balanceOf(context.chain_identity(main_chain_id)?.get_id_address()), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -310,7 +319,7 @@ async fn send( let trx_hash = StakingClient::call_contract_transaction( main_chain_id, "stake", - staking_contract.client_ref(), + staking_contract.provider(), staking_contract.stake(amount), context .config @@ -329,7 +338,7 @@ async fn send( Some(("unstake", sub_matches)) => { let main_chain_id = context.config.get_main_chain_id(); let amount = sub_matches.get_one::("amount").unwrap(); - let amount = U256::from_dec_str(amount).unwrap(); + let amount = U256::from_str_radix(amount, 10).unwrap(); let staking_contract = StakingContract::new( context.staking_contract_address().await?, @@ -339,7 +348,7 @@ async fn send( let staked_amount = StakingClient::call_contract_view( main_chain_id, "staked_amount", - staking_contract.get_stake(context.chain_identity(main_chain_id)?.get_id_address()), + staking_contract.getStake(context.chain_identity(main_chain_id)?.get_id_address()), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -356,7 +365,7 @@ async fn send( let trx_hash = StakingClient::call_contract_transaction( main_chain_id, "unstake", - staking_contract.client_ref(), + staking_contract.provider(), staking_contract.unstake(amount), context .config @@ -382,8 +391,8 @@ async fn send( let trx_hash = StakingClient::call_contract_transaction( main_chain_id, "claim_frozen_principal", - staking_contract.client_ref(), - staking_contract.claim_frozen_principal(), + staking_contract.provider(), + staking_contract.claimFrozenPrincipal(), context .config .get_time_limits() @@ -429,7 +438,7 @@ async fn send( let node = NodeRegistryViews::get_node(&client, context.wallet.address()).await?; - if node.id_address != Address::zero() { + if node.id_address != Address::ZERO { return Ok(Some("Node already registered".to_string())); } @@ -482,7 +491,7 @@ async fn send( let node = NodeRegistryViews::get_node(&client, context.wallet.address()).await?; - if node.id_address == Address::zero() { + if node.id_address == Address::ZERO { return Ok(Some("Node has not registered".to_string())); } @@ -508,7 +517,7 @@ async fn send( let node = NodeRegistryViews::get_node(&client, context.wallet.address()).await?; - if node.id_address == Address::zero() { + if node.id_address == Address::ZERO { return Ok(Some("Node has not registered".to_string())); } @@ -517,8 +526,8 @@ async fn send( let trx_hash = ControllerClient::call_contract_transaction( main_chain_id, "node_quit", - controller_contract.client_ref(), - controller_contract.node_quit(), + controller_contract.provider(), + controller_contract.nodeQuit(), context .config .get_time_limits() @@ -544,7 +553,7 @@ async fn send( let node = NodeRegistryViews::get_node(&client, context.wallet.address()).await?; - if node.id_address == Address::zero() { + if node.id_address == Address::ZERO { return Ok(Some("Node has not registered".to_string())); } @@ -563,9 +572,8 @@ async fn send( let trx_hash = ControllerClient::call_contract_transaction( main_chain_id, "change_dkg_public_key", - controller_contract.client_ref(), - controller_contract - .change_dkg_public_key(bincode::serialize(&dkg_public_key)?.into()), + controller_contract.provider(), + controller_contract.changeDkgPublicKey(bincode::serialize(&dkg_public_key)?.into()), context .config .get_time_limits() @@ -581,11 +589,11 @@ async fn send( ))) } Some(("withdraw", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let recipient = sub_matches.get_one::("recipient").unwrap(); let recipient = recipient.parse::
()?; - if recipient == Address::zero() { + if recipient == Address::ZERO { return Ok(Some("Invalid recipient address".to_string())); } if *chain_id == context.config.get_main_chain_id() { @@ -596,7 +604,7 @@ async fn send( let node = NodeRegistryViews::get_node(&client, context.wallet.address()).await?; - if node.id_address == Address::zero() { + if node.id_address == Address::ZERO { return Ok(Some("Node has not registered".to_string())); } @@ -605,8 +613,8 @@ async fn send( let trx_hash = ControllerClient::call_contract_transaction( *chain_id, "node_withdraw", - controller_contract.client_ref(), - controller_contract.node_withdraw(recipient), + controller_contract.provider(), + controller_contract.nodeWithdraw(recipient), context .config .get_time_limits() @@ -630,8 +638,8 @@ async fn send( let trx_hash = ControllerOracleClient::call_contract_transaction( *chain_id, "node_withdraw", - controller_oracle_contract.client_ref(), - controller_oracle_contract.node_withdraw(recipient), + controller_oracle_contract.provider(), + controller_oracle_contract.nodeWithdraw(recipient), context .config .contract_transaction_retry_descriptor(*chain_id)?, @@ -672,7 +680,7 @@ async fn call( } // getGroup Some(("group", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let group_index = sub_matches.get_one::("group-index").unwrap(); if *chain_id == context.config.get_main_chain_id() { @@ -684,10 +692,11 @@ async fn call( let group = ControllerClient::call_contract_view( *chain_id, "get_group", - controller_contract.get_group((*group_index).into()), + controller_contract.getGroup(U256::from(*group_index)), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; + let group = parse_controller_contract_group::(group); Ok(Some(format!("{:#?}", group))) } else { let client = context @@ -700,16 +709,17 @@ async fn call( let group = ControllerOracleClient::call_contract_view( *chain_id, "get_group", - controller_oracle_contract.get_group((*group_index).into()), + controller_oracle_contract.getGroup(U256::from(*group_index)), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; + let group = parse_controller_oracle_contract_group::(group); Ok(Some(format!("{:#?}", group))) } } // getValidGroupIndices Some(("valid-group-indices", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); if *chain_id == context.config.get_main_chain_id() { let client = context.chain_identity(*chain_id)?.build_controller_client(); @@ -719,7 +729,7 @@ async fn call( let valid_group_indices = ControllerClient::call_contract_view( *chain_id, "valid_group_indices", - controller_contract.get_valid_group_indices(), + controller_contract.getValidGroupIndices(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -735,7 +745,7 @@ async fn call( let valid_group_indices = ControllerOracleClient::call_contract_view( *chain_id, "valid_group_indices", - controller_oracle_contract.get_valid_group_indices(), + controller_oracle_contract.getValidGroupIndices(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -745,7 +755,7 @@ async fn call( } // getGroupEpoch Some(("group-epoch", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); if *chain_id == context.config.get_main_chain_id() { let client = context.chain_identity(*chain_id)?.build_controller_client(); @@ -755,7 +765,7 @@ async fn call( let group_epoch = ControllerClient::call_contract_view( *chain_id, "group_epoch", - controller_contract.get_group_epoch(), + controller_contract.getGroupEpoch(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -770,7 +780,7 @@ async fn call( let group_epoch = ControllerOracleClient::call_contract_view( *chain_id, "group_epoch", - controller_oracle_contract.get_group_epoch(), + controller_oracle_contract.getGroupEpoch(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -779,7 +789,7 @@ async fn call( } // getGroupCount Some(("group-count", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); if *chain_id == context.config.get_main_chain_id() { let client = context.chain_identity(*chain_id)?.build_controller_client(); @@ -788,7 +798,7 @@ async fn call( let group_count = ControllerClient::call_contract_view( *chain_id, "group_count", - controller_contract.get_group_count(), + controller_contract.getGroupCount(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -803,7 +813,7 @@ async fn call( let group_count = ControllerOracleClient::call_contract_view( *chain_id, "group_count", - controller_oracle_contract.get_group_count(), + controller_oracle_contract.getGroupCount(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -813,7 +823,7 @@ async fn call( } // getBelongingGroup Some(("belonging-group", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let node_address = sub_matches.get_one::("id-address").unwrap(); let node_address = node_address.parse::
()?; @@ -822,10 +832,13 @@ async fn call( let controller_contract = client.prepare_service_client().await?; - let (belonging_group_index, member_index) = ControllerClient::call_contract_view( + let controller::Controller::getBelongingGroupReturn { + _0: belonging_group_index, + _1: member_index, + } = ControllerClient::call_contract_view( *chain_id, "belonging_group", - controller_contract.get_belonging_group(node_address), + controller_contract.getBelongingGroup(node_address), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -841,14 +854,16 @@ async fn call( let controller_oracle_contract = client.prepare_service_client().await?; - let (belonging_group_index, member_index) = - ControllerOracleClient::call_contract_view( - *chain_id, - "belonging_group", - controller_oracle_contract.get_belonging_group(node_address), - context.config.contract_view_retry_descriptor(*chain_id)?, - ) - .await?; + let controller_oracle::ControllerOracle::getBelongingGroupReturn { + _0: belonging_group_index, + _1: member_index, + } = ControllerOracleClient::call_contract_view( + *chain_id, + "belonging_group", + controller_oracle_contract.getBelongingGroup(node_address), + context.config.contract_view_retry_descriptor(*chain_id)?, + ) + .await?; Ok(Some(format!( "belonging_group_index: {:#?}, member_index: {:#?}", @@ -858,7 +873,7 @@ async fn call( } // getMember Some(("member", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let group_index = sub_matches.get_one::("group-index").unwrap(); let member_index = sub_matches.get_one::("member-index").unwrap(); @@ -870,11 +885,14 @@ async fn call( let member = ControllerClient::call_contract_view( *chain_id, "member", - controller_contract.get_member((*group_index).into(), (*member_index).into()), + controller_contract + .getMember(U256::from(*group_index), U256::from(*member_index)), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; + let member = parse_controller_contract_member::(member, *member_index); + Ok(Some(format!("{:#?}", member))) } else { let client = context @@ -887,11 +905,14 @@ async fn call( *chain_id, "member", controller_oracle_contract - .get_member((*group_index).into(), (*member_index).into()), + .getMember(U256::from(*group_index), U256::from(*member_index)), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; + let member = + parse_controller_oracle_contract_member::(member, *member_index); + Ok(Some(format!("{:#?}", member))) } } @@ -909,7 +930,7 @@ async fn call( let coordinator = ControllerClient::call_contract_view( main_chain_id, "coordinator", - controller_contract.get_coordinator((*group_index).into()), + controller_contract.getCoordinator(U256::from(*group_index)), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -920,7 +941,7 @@ async fn call( } // getNodeWithdrawableTokens Some(("node-withdrawable-tokens", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let node_address = sub_matches.get_one::("id-address").unwrap(); let node_address = node_address.parse::
()?; @@ -932,14 +953,16 @@ async fn call( let node_registry_contract = client.prepare_service_client().await?; - let (node_withdrawable_eth, node_withdrawable_arpa) = - NodeRegistryClient::call_contract_view( - *chain_id, - "node_withdrawable_tokens", - node_registry_contract.get_node_withdrawable_tokens(node_address), - context.config.contract_view_retry_descriptor(*chain_id)?, - ) - .await?; + let INodeRegistry::getNodeWithdrawableTokensReturn { + _0: node_withdrawable_eth, + _1: node_withdrawable_arpa, + } = NodeRegistryClient::call_contract_view( + *chain_id, + "node_withdrawable_tokens", + node_registry_contract.getNodeWithdrawableTokens(node_address), + context.config.contract_view_retry_descriptor(*chain_id)?, + ) + .await?; Ok(Some(format!( "node_withdrawable_eth: {:#?}, node_withdrawable_arpa: {:#?}", @@ -952,14 +975,16 @@ async fn call( let controller_oracle_contract = client.prepare_service_client().await?; - let (node_withdrawable_eth, node_withdrawable_arpa) = - ControllerOracleClient::call_contract_view( - *chain_id, - "node_withdrawable_tokens", - controller_oracle_contract.get_node_withdrawable_tokens(node_address), - context.config.contract_view_retry_descriptor(*chain_id)?, - ) - .await?; + let ControllerOracle::getNodeWithdrawableTokensReturn { + _0: node_withdrawable_eth, + _1: node_withdrawable_arpa, + } = ControllerOracleClient::call_contract_view( + *chain_id, + "node_withdrawable_tokens", + controller_oracle_contract.getNodeWithdrawableTokens(node_address), + context.config.contract_view_retry_descriptor(*chain_id)?, + ) + .await?; Ok(Some(format!( "node_withdrawable_eth: {:#?}, node_withdrawable_arpa: {:#?}", @@ -976,19 +1001,19 @@ async fn call( let controller_contract = client.prepare_service_client().await?; - let ( - node_registry_contract_address, - adapter_contract_address, - disqualified_node_penalty_amount, - default_number_of_committers, - default_dkg_phase_duration, - group_max_capacity, - ideal_number_of_groups, - dkg_post_process_reward, - ) = ControllerClient::call_contract_view( + let Controller::getControllerConfigReturn { + nodeRegistryContractAddress: node_registry_contract_address, + adapterContractAddress: adapter_contract_address, + disqualifiedNodePenaltyAmount: disqualified_node_penalty_amount, + defaultNumberOfCommitters: default_number_of_committers, + defaultDkgPhaseDuration: default_dkg_phase_duration, + groupMaxCapacity: group_max_capacity, + idealNumberOfGroups: ideal_number_of_groups, + dkgPostProcessReward: dkg_post_process_reward, + } = ControllerClient::call_contract_view( main_chain_id, "controller_config", - controller_contract.get_controller_config(), + controller_contract.getControllerConfig(), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -1008,40 +1033,38 @@ async fn call( dkg_post_process_reward,))) } Some(("fulfillments-as-committer", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let client = context .chain_identity(*chain_id)? .build_adapter_client(context.wallet.address()); let adapter_contract = - ServiceClient::>::prepare_service_client(&client) + ServiceClient::>::prepare_service_client(&client) .await?; let filter = adapter_contract - .randomness_request_result_filter() - .address(ethers::types::ValueOrArray::Value( - context.chain_identity(*chain_id)?.get_adapter_address(), - )) + .RandomnessRequestResult_filter() + .address(context.chain_identity(*chain_id)?.get_adapter_address()) .topic3(context.chain_identity(*chain_id)?.get_id_address()) .from_block( context .config .find_adapter_deployed_block_height(*chain_id)?, ) - .to_block(BlockNumber::Latest); + .to_block(BlockNumberOrTag::Latest); let logs = filter.query().await?; let logs = logs .iter() - .map(|log| RandomnessRequestResult { - request_id: format!("0x{}", hex::encode(log.request_id)), - group_index: log.group_index, + .map(|(log, _)| RandomnessRequestResult { + request_id: format!("0x{}", hex::encode(log.requestId)), + group_index: log.groupIndex, committer: log.committer, - participant_members: log.participant_members.clone(), + participant_members: log.participantMembers.clone(), randommness: log.randommness, payment: log.payment, - flat_fee: log.flat_fee, + flat_fee: log.flatFee, success: log.success, }) .collect::>(); @@ -1051,40 +1074,38 @@ async fn call( Ok(Some(format!("log: {:#?}", logs))) } Some(("fulfillments-as-participant", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let client = context .chain_identity(*chain_id)? .build_adapter_client(context.chain_identity(*chain_id)?.get_id_address()); let adapter_contract = - ServiceClient::>::prepare_service_client(&client) + ServiceClient::>::prepare_service_client(&client) .await?; let filter = adapter_contract - .randomness_request_result_filter() - .address(ethers::types::ValueOrArray::Value( - context.chain_identity(*chain_id)?.get_adapter_address(), - )) + .RandomnessRequestResult_filter() + .address(context.chain_identity(*chain_id)?.get_adapter_address()) .from_block( context .config .find_adapter_deployed_block_height(*chain_id)?, ) - .to_block(BlockNumber::Latest); + .to_block(BlockNumberOrTag::Latest); let logs = filter.query().await?; let logs = logs .iter() - .filter(|log| log.participant_members.contains(&context.wallet.address())) - .map(|log| RandomnessRequestResult { - request_id: format!("0x{}", hex::encode(log.request_id)), - group_index: log.group_index, + .filter(|(log, _)| log.participantMembers.contains(&context.wallet.address())) + .map(|(log, _)| RandomnessRequestResult { + request_id: format!("0x{}", hex::encode(log.requestId)), + group_index: log.groupIndex, committer: log.committer, - participant_members: log.participant_members.clone(), + participant_members: log.participantMembers.clone(), randommness: log.randommness, payment: log.payment, - flat_fee: log.flat_fee, + flat_fee: log.flatFee, success: log.success, }) .collect::>(); @@ -1104,7 +1125,7 @@ async fn call( main_chain_id, "delegation_reward", staking_contract - .get_delegation_reward(context.chain_identity(main_chain_id)?.get_id_address()), + .getDelegationReward(context.chain_identity(main_chain_id)?.get_id_address()), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -1123,7 +1144,7 @@ async fn call( let delegates_count = StakingClient::call_contract_view( main_chain_id, "delegates_count", - staking_contract.get_delegates_count(), + staking_contract.getDelegatesCount(), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -1142,7 +1163,7 @@ async fn call( let amount = StakingClient::call_contract_view( main_chain_id, "get_stake", - staking_contract.get_stake(context.chain_identity(main_chain_id)?.get_id_address()), + staking_contract.getStake(context.chain_identity(main_chain_id)?.get_id_address()), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -1158,11 +1179,14 @@ async fn call( context.chain_identity(main_chain_id)?.get_client(), ); - let (amounts, timestamps) = StakingClient::call_contract_view( + let StakingContract::getFrozenPrincipalReturn { + amounts, + unlockTimestamps, + } = StakingClient::call_contract_view( main_chain_id, "frozen_principal", staking_contract - .get_frozen_principal(context.chain_identity(main_chain_id)?.get_id_address()), + .getFrozenPrincipal(context.chain_identity(main_chain_id)?.get_id_address()), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -1171,24 +1195,21 @@ async fn call( Ok(Some(format!( "amounts: {:#?}, unfreeze timestamps: {:#?}", - amounts, timestamps + amounts, unlockTimestamps ))) } Some(("balance-of-eth", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let provider = context.chain_identity(*chain_id)?.get_provider(); let balance = provider - .get_balance( - context.chain_identity(*chain_id)?.get_id_address(), - Some(BlockId::Number(BlockNumber::Latest)), - ) + .get_balance(context.chain_identity(*chain_id)?.get_id_address()) .await?; Ok(Some(format!("balance: {:#?}", balance))) } Some(("balance-of-arpa", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let arpa_contract = ArpaContract::new( context.config.find_arpa_address(*chain_id)?, context.chain_identity(*chain_id)?.get_client(), @@ -1197,7 +1218,7 @@ async fn call( let balance = ArpaClient::call_contract_view( *chain_id, "balance_of", - arpa_contract.balance_of(context.wallet.address()), + arpa_contract.balanceOf(context.wallet.address()), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1206,27 +1227,27 @@ async fn call( } // getAdapterConfig Some(("adapter-config", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let client = context .chain_identity(*chain_id)? .build_adapter_client(context.wallet.address()); let adapter_contract = - ServiceClient::>::prepare_service_client(&client) + ServiceClient::>::prepare_service_client(&client) .await?; - let ( - minimum_request_confirmations, - max_gas_limit, - gas_after_payment_calculation, - gas_except_callback, - signature_task_exclusive_window, - reward_per_signature, - committer_reward_per_signature, - ) = AdapterClient::call_contract_view( + let Adapter::getAdapterConfigReturn { + minimumRequestConfirmations, + maxGasLimit, + gasAfterPaymentCalculation, + gasExceptCallback, + signatureTaskExclusiveWindow, + rewardPerSignature, + committerRewardPerSignature, + } = AdapterClient::call_contract_view( *chain_id, "adapter_config", - adapter_contract.get_adapter_config(), + adapter_contract.getAdapterConfig(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1234,31 +1255,31 @@ async fn call( Ok(Some(format!( "minimum_request_confirmations: {:#?}, max_gas_limit: {:#?}, gas_after_payment_calculation: {:#?}, gas_except_callback: {:#?}, \ signature_task_exclusive_window: {:#?}, reward_per_signature: {:#?}, committer_reward_per_signature: {:#?}", - minimum_request_confirmations, - max_gas_limit, - gas_after_payment_calculation, - gas_except_callback, - signature_task_exclusive_window, - reward_per_signature, - committer_reward_per_signature, + minimumRequestConfirmations, + maxGasLimit, + gasAfterPaymentCalculation, + gasExceptCallback, + signatureTaskExclusiveWindow, + rewardPerSignature, + committerRewardPerSignature, ))) } // getLastAssignedGroupIndex Some(("last-assigned-group-index", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let client = context .chain_identity(*chain_id)? .build_adapter_client(context.wallet.address()); let adapter_contract = - ServiceClient::>::prepare_service_client(&client) + ServiceClient::>::prepare_service_client(&client) .await?; let last_assigned_group_index = AdapterClient::call_contract_view( *chain_id, "last_assigned_group_index", - adapter_contract.get_last_assigned_group_index(), + adapter_contract.getLastAssignedGroupIndex(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1270,19 +1291,19 @@ async fn call( } // getRandomnessCount Some(("randomness-count", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let client = context .chain_identity(*chain_id)? .build_adapter_client(context.wallet.address()); let adapter_contract = - ServiceClient::>::prepare_service_client(&client) + ServiceClient::>::prepare_service_client(&client) .await?; let randomness_count = AdapterClient::call_contract_view( *chain_id, "randomness_count", - adapter_contract.get_randomness_count(), + adapter_contract.getRandomnessCount(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1290,14 +1311,14 @@ async fn call( Ok(Some(format!("randomness_count: {:#?}", randomness_count))) } Some(("block", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let block_number = sub_matches.get_one::("block-number").unwrap(); match block_number.as_str() { "latest" => { let block: Option = context .chain_identity(*chain_id)? .get_provider() - .get_block(BlockNumber::Latest) + .get_block(BlockId::Number(BlockNumberOrTag::Latest)) .await? .map(|block| block.into()); return Ok(Some(format!("block: {:#?}", block))); @@ -1306,7 +1327,7 @@ async fn call( let block: Option = context .chain_identity(*chain_id)? .get_provider() - .get_block(BlockNumber::Earliest) + .get_block(BlockId::Number(BlockNumberOrTag::Earliest)) .await? .map(|block| block.into()); return Ok(Some(format!("block: {:#?}", block))); @@ -1315,7 +1336,7 @@ async fn call( let block: Option = context .chain_identity(*chain_id)? .get_provider() - .get_block(BlockNumber::Pending) + .get_block(BlockId::Number(BlockNumberOrTag::Pending)) .await? .map(|block| block.into()); return Ok(Some(format!("block: {:#?}", block))); @@ -1325,7 +1346,7 @@ async fn call( let block: Option = context .chain_identity(*chain_id)? .get_provider() - .get_block(BlockNumber::Number(block_number.into())) + .get_block(BlockId::Number(block_number.into())) .await? .map(|block| block.into()); return Ok(Some(format!("block: {:#?}", block))); @@ -1336,7 +1357,7 @@ async fn call( } // current-gas-price Some(("current-gas-price", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let gas_price = context .chain_identity(*chain_id)? .get_provider() @@ -1347,14 +1368,14 @@ async fn call( } // trx-receipt Some(("trx-receipt", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let trx_hash = sub_matches.get_one::("trx-hash").unwrap(); let receipt = context .chain_identity(*chain_id)? .get_provider() .get_transaction_receipt( - pad_to_bytes32(&hex::decode( + pad_to_bytes32_fixed_bytes(&hex::decode( if let Some(trx_hash_without_prefix) = trx_hash.strip_prefix("0x") { trx_hash_without_prefix } else { @@ -1369,23 +1390,23 @@ async fn call( } // getCumulativeData Some(("cumulative-data", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let client = context .chain_identity(*chain_id)? .build_adapter_client(context.wallet.address()); let adapter_contract = - ServiceClient::>::prepare_service_client(&client) + ServiceClient::>::prepare_service_client(&client) .await?; - let ( - cumulative_flat_fee, - cumulative_committer_reward, - cumulative_partial_signature_reward, - ) = AdapterClient::call_contract_view( + let Adapter::getCumulativeDataReturn { + _0: cumulative_flat_fee, + _1: cumulative_committer_reward, + _2: cumulative_partial_signature_reward, + } = AdapterClient::call_contract_view( *chain_id, "cumulative_data", - adapter_contract.get_cumulative_data(), + adapter_contract.getCumulativeData(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1394,7 +1415,7 @@ async fn call( cumulative_flat_fee, cumulative_committer_reward, cumulative_partial_signature_reward))) } Some(("last-randomness", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let client = context .chain_identity(*chain_id)? .build_adapter_client(context.wallet.address()); @@ -1404,19 +1425,22 @@ async fn call( Ok(Some(last_randomness.to_string())) } Some(("pending-request-commitment", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let client = context .chain_identity(*chain_id)? .build_adapter_client(context.wallet.address()); let adapter_contract = - ServiceClient::>::prepare_service_client(&client) + ServiceClient::>::prepare_service_client(&client) .await?; let r_id = sub_matches.get_one::("request-id").unwrap(); let pending_request_commitment = adapter_contract - .get_pending_request_commitment(pad_to_bytes32(&hex::decode(r_id)?).unwrap()) + .getPendingRequestCommitment( + pad_to_bytes32_fixed_bytes(&hex::decode(r_id)?).unwrap(), + ) + .call() .await?; Ok(Some(format!( @@ -1447,7 +1471,7 @@ fn generate( let name = sub_matches.get_one::("name"); let mut rng = rand::thread_rng(); - LocalWallet::new_keystore(path, &mut rng, password, name.map(|x| &**x))?; + PrivateKeySigner::new_keystore(path, &mut rng, password, name.map(|x| &**x))?; Ok(Some("keystore generated successfully.".to_owned())) } @@ -1458,13 +1482,12 @@ fn generate( .map_or("m/44'/60'/0'/0/0", |s| s); let password = sub_matches.get_one::("password").unwrap(); - let mut rng = rand::thread_rng(); MnemonicBuilder::::default() .word_count(12) .derivation_path(derivation_path)? .write_to(path) .password(password) - .build_random(&mut rng)?; + .build_random()?; Ok(Some("Mnemonic generated successfully.".to_owned())) } @@ -1564,18 +1587,22 @@ async fn main() -> anyhow::Result<()> { let mut chain_identities = BTreeMap::new(); - let provider = Arc::new( - Provider::::connect_with_reconnects(config.get_provider_endpoint(), 0) - .await? - .interval(Duration::from_millis( - config.get_time_limits().provider_polling_interval_millis, - )), + let ws_connect = WsConnect::new(config.get_provider_endpoint()).with_retry_interval( + Duration::from_millis(config.get_time_limits().provider_polling_interval_millis), ); + let client = build_client( + wallet.clone(), + config.get_main_chain_id(), + ws_connect.clone(), + ) + .await?; + let main_chain_identity = GeneralMainChainIdentity::new( config.get_main_chain_id(), wallet.clone(), - provider, + ws_connect, + client, config.get_provider_endpoint().to_owned(), config .get_controller_address() @@ -1601,20 +1628,25 @@ async fn main() -> anyhow::Result<()> { chain_identities.insert(config.get_main_chain_id(), boxed_main_chain_identity); for relayed_chain in config.get_relayed_chains().iter() { - let provider = Arc::new( - Provider::::connect_with_reconnects(relayed_chain.get_provider_endpoint(), 0) - .await? - .interval(Duration::from_millis( - relayed_chain - .get_time_limits() - .provider_polling_interval_millis, - )), + let ws_connect = WsConnect::new(relayed_chain.get_provider_endpoint()).with_retry_interval( + Duration::from_millis( + relayed_chain + .get_time_limits() + .provider_polling_interval_millis, + ), ); + let client = build_client( + wallet.clone(), + relayed_chain.get_chain_id(), + ws_connect.clone(), + ) + .await?; let relayed_chain_identity = GeneralRelayedChainIdentity::new( relayed_chain.get_chain_id(), wallet.clone(), - provider, + ws_connect, + client, relayed_chain.get_provider_endpoint().to_string(), relayed_chain .get_controller_oracle_address() @@ -1643,7 +1675,7 @@ async fn main() -> anyhow::Result<()> { .as_os_str() .to_str() .unwrap(), - &wallet.signer().to_bytes(), + wallet.to_bytes().as_slice(), ) .await .unwrap(); diff --git a/crates/arpa-node/src/queue/event_queue.rs b/crates/arpa-node/src/queue/event_queue.rs index c5f58fbc..bac442c1 100644 --- a/crates/arpa-node/src/queue/event_queue.rs +++ b/crates/arpa-node/src/queue/event_queue.rs @@ -53,13 +53,12 @@ pub mod tests { queue::event_queue::EventQueue, subscriber::{block::BlockSubscriber, Subscriber}, }; - use arpa_core::{Config, GeneralMainChainIdentity, ListenerDescriptor, ListenerType}; - use arpa_dal::{cache::InMemoryBlockInfoCache, BlockInfoHandler}; - use ethers::{ - providers::{Provider, Ws}, - types::Address, - utils::Anvil, + use alloy::{node_bindings::Anvil, providers::WsConnect, signers::local::PrivateKeySigner}; + use arpa_core::{ + build_client, random_address, Config, GeneralMainChainIdentity, ListenerDescriptor, + ListenerType, }; + use arpa_dal::{cache::InMemoryBlockInfoCache, BlockInfoHandler}; use std::{sync::Arc, time::Duration}; use threshold_bls::schemes::bn254::G2Curve; use tokio::sync::RwLock; @@ -82,9 +81,10 @@ pub mod tests { s.subscribe().await; - let fake_wallet = "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318" - .parse() - .unwrap(); + let fake_wallet: PrivateKeySigner = + "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318" + .parse() + .unwrap(); let contract_transaction_retry_descriptor = config .get_time_limits() @@ -95,21 +95,22 @@ pub mod tests { let avnil = Anvil::new().spawn(); - let provider = Arc::new( - Provider::::connect(avnil.ws_endpoint()) - .await - .unwrap() - .interval(Duration::from_millis(3000)), - ); + let ws_connect = + WsConnect::new(avnil.ws_endpoint()).with_retry_interval(Duration::from_millis(3000)); + + let client = build_client(fake_wallet.clone(), chain_id, ws_connect.clone()) + .await + .unwrap(); let chain_identity = GeneralMainChainIdentity::new( 0, fake_wallet, - provider, + ws_connect, + client, avnil.ws_endpoint(), - Address::random(), - Address::random(), - Address::random(), + random_address(), + random_address(), + random_address(), contract_transaction_retry_descriptor, contract_view_retry_descriptor, None, diff --git a/crates/arpa-node/src/stats/mod.rs b/crates/arpa-node/src/stats/mod.rs index 7b28cbcd..c6af351d 100644 --- a/crates/arpa-node/src/stats/mod.rs +++ b/crates/arpa-node/src/stats/mod.rs @@ -92,9 +92,12 @@ mod tests { http::{self}, test, }; + use alloy::node_bindings::Anvil; + use alloy::providers::WsConnect; + use alloy::signers::local::PrivateKeySigner; use arpa_core::{ - Config, GeneralMainChainIdentity, ListenerDescriptor, ListenerType, RandomnessTask, - PLACEHOLDER_ADDRESS, + build_client, random_address, Config, GeneralMainChainIdentity, ListenerDescriptor, + ListenerType, RandomnessTask, PLACEHOLDER_ADDRESS, }; use arpa_dal::{ cache::{ @@ -103,22 +106,18 @@ mod tests { }, BLSTasksHandler, GroupInfoHandler, NodeInfoHandler, SignatureResultCacheHandler, }; - use ethers::{ - providers::{Provider, Ws}, - types::Address, - utils::Anvil, - }; use threshold_bls::{curve::bn254::G2Curve, schemes::bn254::G2Scheme}; async fn build_context() -> NodeContext { let config = Config::default(); - let fake_wallet = "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318" - .parse() - .unwrap(); + let fake_wallet: PrivateKeySigner = + "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318" + .parse() + .unwrap(); let node_cache: Arc>>> = Arc::new(RwLock::new( - Box::new(InMemoryNodeInfoCache::::new(Address::random())), + Box::new(InMemoryNodeInfoCache::::new(random_address())), )); let group_cache: Arc>>> = Arc::new(RwLock::new( @@ -134,9 +133,14 @@ mod tests { RandomnessResultCache, >::new()))); - let avnil = Anvil::new().spawn(); + let chain_id = config.get_main_chain_id(); + + let avnil = Anvil::new().chain_id(chain_id).spawn(); - let provider = Arc::new(Provider::::connect(avnil.ws_endpoint()).await.unwrap()); + let ws_connect = WsConnect::new(avnil.ws_endpoint()); + let client = build_client(fake_wallet.clone(), chain_id, ws_connect.clone()) + .await + .unwrap(); let contract_transaction_retry_descriptor = config .get_time_limits() @@ -145,16 +149,15 @@ mod tests { let contract_view_retry_descriptor = config.get_time_limits().contract_view_retry_descriptor; - let chain_id = config.get_main_chain_id(); - let main_chain_identity = GeneralMainChainIdentity::new( chain_id, fake_wallet, - provider, + ws_connect, + client, avnil.ws_endpoint(), - Address::random(), - Address::random(), - Address::random(), + random_address(), + random_address(), + random_address(), contract_transaction_retry_descriptor, contract_view_retry_descriptor, config.get_max_priority_fee_per_gas(), diff --git a/crates/arpa-node/src/subscriber/block.rs b/crates/arpa-node/src/subscriber/block.rs index f928af7b..54ad8667 100644 --- a/crates/arpa-node/src/subscriber/block.rs +++ b/crates/arpa-node/src/subscriber/block.rs @@ -12,14 +12,14 @@ use tokio::sync::RwLock; #[derive(Debug)] pub struct BlockSubscriber { - chain_id: usize, + chain_id: u64, block_cache: Arc>>, eq: Arc>, } impl BlockSubscriber { pub fn new( - chain_id: usize, + chain_id: u64, block_cache: Arc>>, eq: Arc>, ) -> Self { @@ -33,7 +33,7 @@ impl BlockSubscriber { #[async_trait] impl Subscriber for BlockSubscriber { - async fn notify(&self, topic: Topic, payload: &(dyn DebuggableEvent)) -> NodeResult<()> { + async fn notify(&self, topic: Topic, payload: &dyn DebuggableEvent) -> NodeResult<()> { debug!("{:?}", topic); let &NewBlock { block_height, .. } = payload.as_any().downcast_ref::().unwrap(); diff --git a/crates/arpa-node/src/subscriber/in_grouping.rs b/crates/arpa-node/src/subscriber/in_grouping.rs index c989226a..2253cdac 100644 --- a/crates/arpa-node/src/subscriber/in_grouping.rs +++ b/crates/arpa-node/src/subscriber/in_grouping.rs @@ -15,7 +15,6 @@ use arpa_core::{ use arpa_dal::{GroupInfoHandler, NodeInfoHandler}; use async_trait::async_trait; use core::fmt::Debug; -use ethers::types::U256; use log::{debug, error, info}; use rand::{prelude::ThreadRng, RngCore}; use std::{marker::PhantomData, sync::Arc}; @@ -171,8 +170,8 @@ impl< self.group_cache.read().await.get_group()?, None, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()) + receipt.gas_used, + receipt.effective_gas_price ) ); } @@ -187,8 +186,8 @@ impl< self.group_cache.read().await.get_group()?, None, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()) + receipt.gas_used, + receipt.effective_gas_price ) ); } @@ -258,8 +257,8 @@ impl< self.group_cache.read().await.get_group()?, None, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()) + receipt.gas_used, + receipt.effective_gas_price ) ); } @@ -274,8 +273,8 @@ impl< self.group_cache.read().await.get_group()?, None, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()) + receipt.gas_used, + receipt.effective_gas_price ) ); } @@ -313,7 +312,7 @@ impl< #[async_trait] impl Subscriber for InGroupingSubscriber { - async fn notify(&self, topic: Topic, payload: &(dyn DebuggableEvent)) -> NodeResult<()> { + async fn notify(&self, topic: Topic, payload: &dyn DebuggableEvent) -> NodeResult<()> { debug!("{:?}", topic); let RunDKG { dkg_task: task, .. } = diff --git a/crates/arpa-node/src/subscriber/post_grouping.rs b/crates/arpa-node/src/subscriber/post_grouping.rs index 8c2ac97b..9de97696 100644 --- a/crates/arpa-node/src/subscriber/post_grouping.rs +++ b/crates/arpa-node/src/subscriber/post_grouping.rs @@ -17,7 +17,6 @@ use arpa_core::{ use arpa_dal::GroupInfoHandler; use arpa_log::*; use async_trait::async_trait; -use ethers::types::U256; use log::{debug, error, info}; use std::{marker::PhantomData, sync::Arc}; use threshold_bls::group::Curve; @@ -26,7 +25,7 @@ use tokio::sync::RwLock; #[derive(Debug)] pub struct PostGroupingSubscriber { chain_identity: Arc>>, - supported_relayed_chains: Vec, + supported_relayed_chains: Vec, group_cache: Arc>>>, eq: Arc>, ts: Arc>, @@ -36,7 +35,7 @@ pub struct PostGroupingSubscriber { impl PostGroupingSubscriber { pub fn new( chain_identity: Arc>>, - supported_relayed_chains: Vec, + supported_relayed_chains: Vec, group_cache: Arc>>>, eq: Arc>, ts: Arc>, @@ -64,7 +63,7 @@ pub trait DKGPostProcessHandler { pub struct GeneralDKGPostProcessHandler { chain_identity: Arc>>, - supported_relayed_chains: Vec, + supported_relayed_chains: Vec, group_cache: Arc>>>, c: PhantomData, } @@ -137,8 +136,8 @@ impl DKGPostProcessHandler self.group_cache.read().await.get_group()?, None, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()) + receipt.gas_used, + receipt.effective_gas_price ) ); } @@ -158,8 +157,8 @@ impl DKGPostProcessHandler self.group_cache.read().await.get_group()?, Some(*relayed_chain_id), receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()) + receipt.gas_used, + receipt.effective_gas_price ) ); } @@ -177,7 +176,7 @@ impl Subscriber for PostGroupingSubscriber { #[log_function] - async fn notify(&self, topic: Topic, payload: &(dyn DebuggableEvent)) -> NodeResult<()> { + async fn notify(&self, topic: Topic, payload: &dyn DebuggableEvent) -> NodeResult<()> { debug!("{:?}", topic); let DKGPostProcess { diff --git a/crates/arpa-node/src/subscriber/post_success_grouping.rs b/crates/arpa-node/src/subscriber/post_success_grouping.rs index 17768a66..610130fc 100644 --- a/crates/arpa-node/src/subscriber/post_success_grouping.rs +++ b/crates/arpa-node/src/subscriber/post_success_grouping.rs @@ -39,7 +39,7 @@ impl PostSuccessGroupingSubscriber { impl Subscriber for PostSuccessGroupingSubscriber { - async fn notify(&self, topic: Topic, payload: &(dyn DebuggableEvent)) -> NodeResult<()> { + async fn notify(&self, topic: Topic, payload: &dyn DebuggableEvent) -> NodeResult<()> { debug!("{:?}", topic); let DKGSuccess { diff --git a/crates/arpa-node/src/subscriber/pre_grouping.rs b/crates/arpa-node/src/subscriber/pre_grouping.rs index 1c437cc2..45aaabc1 100644 --- a/crates/arpa-node/src/subscriber/pre_grouping.rs +++ b/crates/arpa-node/src/subscriber/pre_grouping.rs @@ -44,7 +44,7 @@ impl EventPublisher for PreGro #[async_trait] impl Subscriber for PreGroupingSubscriber { - async fn notify(&self, topic: Topic, payload: &(dyn DebuggableEvent)) -> NodeResult<()> { + async fn notify(&self, topic: Topic, payload: &dyn DebuggableEvent) -> NodeResult<()> { debug!("{:?}", topic); let NewDKGTask { diff --git a/crates/arpa-node/src/subscriber/randomness_signature_aggregation.rs b/crates/arpa-node/src/subscriber/randomness_signature_aggregation.rs index d8c483db..1c25ba9d 100644 --- a/crates/arpa-node/src/subscriber/randomness_signature_aggregation.rs +++ b/crates/arpa-node/src/subscriber/randomness_signature_aggregation.rs @@ -7,6 +7,7 @@ use crate::{ queue::{event_queue::EventQueue, EventSubscriber}, scheduler::{dynamic::SimpleDynamicTaskScheduler, TaskScheduler}, }; +use alloy::primitives::Address; use arpa_contract_client::{ adapter::{AdapterTransactions, AdapterViews}, error::ContractClientError, @@ -19,7 +20,6 @@ use arpa_core::{ use arpa_dal::{cache::RandomnessResultCache, BLSResultCacheState}; use arpa_dal::{BlockInfoHandler, SignatureResultCacheHandler}; use async_trait::async_trait; -use ethers::types::{Address, U256}; use log::{debug, error, info}; use serde_json::json; use std::{collections::BTreeMap, marker::PhantomData, sync::Arc}; @@ -34,7 +34,7 @@ pub struct RandomnessSignatureAggregationSubscriber< PC: Curve, S: SignatureScheme + ThresholdScheme, > { - chain_id: usize, + chain_id: u64, id_address: Address, chain_identity: Arc>>, block_cache: Arc>>, @@ -50,7 +50,7 @@ impl { pub fn new( - chain_id: usize, + chain_id: u64, id_address: Address, chain_identity: Arc>>, block_cache: Arc>>, @@ -191,8 +191,8 @@ impl FulfillRandomnessHandler for GeneralFulfillRandomnessHandler TaskType::BLS(BLSTaskType::Randomness), randomness_task_json, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()), + receipt.gas_used, + receipt.effective_gas_price, ) ); } @@ -218,8 +218,8 @@ impl FulfillRandomnessHandler for GeneralFulfillRandomnessHandler TaskType::BLS(BLSTaskType::Randomness), randomness_task_json, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()), + receipt.gas_used, + receipt.effective_gas_price, ) ); } @@ -275,7 +275,7 @@ where ::Error: Sync + Send, ::Error: Sync + Send, { - async fn notify(&self, topic: Topic, payload: &(dyn DebuggableEvent)) -> NodeResult<()> { + async fn notify(&self, topic: Topic, payload: &dyn DebuggableEvent) -> NodeResult<()> { debug!("{:?}", topic); let ReadyToFulfillRandomnessTask { diff --git a/crates/arpa-node/src/subscriber/ready_to_handle_randomness_task.rs b/crates/arpa-node/src/subscriber/ready_to_handle_randomness_task.rs index 26be03fe..b4ba3d27 100644 --- a/crates/arpa-node/src/subscriber/ready_to_handle_randomness_task.rs +++ b/crates/arpa-node/src/subscriber/ready_to_handle_randomness_task.rs @@ -8,6 +8,7 @@ use crate::{ queue::{event_queue::EventQueue, EventSubscriber}, scheduler::{dynamic::SimpleDynamicTaskScheduler, TaskScheduler}, }; +use alloy::primitives::{Address, U256}; use arpa_core::{ log::{build_task_related_payload, LogType}, u256_to_vec, BLSTaskType, ComponentTaskType, ExponentialBackoffRetryDescriptor, RandomnessTask, @@ -16,7 +17,6 @@ use arpa_core::{ use arpa_dal::cache::RandomnessResultCache; use arpa_dal::{BLSTasksHandler, GroupInfoHandler, SignatureResultCacheHandler}; use async_trait::async_trait; -use ethers::types::{Address, U256}; use log::{debug, error, info}; use serde_json::json; use std::{marker::PhantomData, sync::Arc}; @@ -33,7 +33,7 @@ pub struct ReadyToHandleRandomnessTaskSubscriber< PC: Curve, S: SignatureScheme + ThresholdScheme, > { - pub chain_id: usize, + pub chain_id: u64, id_address: Address, group_cache: Arc>>>, randomness_tasks_cache: Arc>>>, @@ -51,7 +51,7 @@ impl>>>, randomness_tasks_cache: Arc>>>, @@ -93,7 +93,7 @@ pub struct GeneralRandomnessHandler< PC: Curve, S: SignatureScheme + ThresholdScheme, > { - chain_id: usize, + chain_id: u64, id_address: Address, tasks: Vec, group_cache: Arc>>>, @@ -330,7 +330,7 @@ where ::Error: Sync + Send, ::Error: Sync + Send, { - async fn notify(&self, topic: Topic, payload: &(dyn DebuggableEvent)) -> NodeResult<()> { + async fn notify(&self, topic: Topic, payload: &dyn DebuggableEvent) -> NodeResult<()> { debug!("{:?}", topic); let ReadyToHandleRandomnessTask { tasks, .. } = payload diff --git a/crates/arpa-node/src/subscriber/schedule_node_activation.rs b/crates/arpa-node/src/subscriber/schedule_node_activation.rs index 0103d796..35997df3 100644 --- a/crates/arpa-node/src/subscriber/schedule_node_activation.rs +++ b/crates/arpa-node/src/subscriber/schedule_node_activation.rs @@ -8,7 +8,6 @@ use crate::{ use arpa_contract_client::{error::ContractClientError, node_registry::NodeRegistryTransactions}; use arpa_core::log::{build_general_payload, build_transaction_receipt_payload, LogType}; use async_trait::async_trait; -use ethers::{providers::Middleware, types::U256}; use log::{debug, error, info}; use std::{marker::PhantomData, sync::Arc}; use threshold_bls::group::Curve; @@ -38,7 +37,7 @@ impl NodeActivationSubscriber { impl Subscriber for NodeActivationSubscriber { - async fn notify(&self, topic: Topic, payload: &(dyn DebuggableEvent)) -> NodeResult<()> { + async fn notify(&self, topic: Topic, payload: &dyn DebuggableEvent) -> NodeResult<()> { debug!("{:?}", topic); let &NodeActivation { @@ -55,14 +54,7 @@ impl Subscriber let receipt_result = if is_eigenlayer { node_registry_client - .node_activate_as_eigenlayer_operator( - self.chain_identity - .read() - .await - .get_client() - .inner() - .signer(), - ) + .node_activate_as_eigenlayer_operator(self.chain_identity.read().await.get_signer()) .await } else { node_registry_client @@ -79,8 +71,8 @@ impl Subscriber "Node activated", chain_id, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()), + receipt.gas_used, + receipt.effective_gas_price, ) ); } @@ -93,8 +85,8 @@ impl Subscriber "Node activate failed", chain_id, receipt.transaction_hash, - receipt.gas_used.unwrap_or(U256::zero()), - receipt.effective_gas_price.unwrap_or(U256::zero()), + receipt.gas_used, + receipt.effective_gas_price, ) ); } diff --git a/crates/contract-client/Cargo.toml b/crates/contract-client/Cargo.toml index f4a920a6..d00ba524 100644 --- a/crates/contract-client/Cargo.toml +++ b/crates/contract-client/Cargo.toml @@ -16,6 +16,7 @@ dkg-core.workspace = true threshold-bls.workspace = true arpa-core.workspace = true +futures-util = "0.3" tokio = { version = "1.37.0", features = ["full"] } thiserror = "1.0.15" anyhow = "1.0.31" @@ -23,20 +24,17 @@ serde = "1.0.106" log = "0.4" async-trait = "0.1.35" bincode = "1.2.1" -tonic = "0.11" -prost = "0.12" -ethers = { workspace = true, features = ["abigen", "rustls", "ws"] } +tonic = "0.14" +prost = "0.14" +alloy = { workspace = true, features = ["full", "json"] } rustc-hex = "2.1.0" tokio-retry = "0.3" +rand = "0.8" [lib] name = "arpa_contract_client" path = "src/lib.rs" -[build-dependencies] -tonic-build = "0.11" -prost-build = "0.12" -ethers-contract-abigen.workspace = true - [dev-dependencies] simple_logger = "4.2.0" +alloy = { workspace = true, features = ["full", "json", "provider-anvil-node"] } diff --git a/crates/contract-client/abi/Controller.json b/crates/contract-client/abi/Controller.json index c862b78a..7d252450 100644 --- a/crates/contract-client/abi/Controller.json +++ b/crates/contract-client/abi/Controller.json @@ -1 +1,18936 @@ -{"abi":[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addReward","inputs":[{"name":"nodes","type":"address[]","internalType":"address[]"},{"name":"ethAmount","type":"uint256","internalType":"uint256"},{"name":"arpaAmount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"commitDkg","inputs":[{"name":"params","type":"tuple","internalType":"struct IController.CommitDkgParams","components":[{"name":"groupIndex","type":"uint256","internalType":"uint256"},{"name":"groupEpoch","type":"uint256","internalType":"uint256"},{"name":"publicKey","type":"bytes","internalType":"bytes"},{"name":"partialPublicKey","type":"bytes","internalType":"bytes"},{"name":"disqualifiedNodes","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getBelongingGroup","inputs":[{"name":"nodeAddress","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"int256","internalType":"int256"},{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"view"},{"type":"function","name":"getControllerConfig","inputs":[],"outputs":[{"name":"nodeRegistryContractAddress","type":"address","internalType":"address"},{"name":"adapterContractAddress","type":"address","internalType":"address"},{"name":"disqualifiedNodePenaltyAmount","type":"uint256","internalType":"uint256"},{"name":"defaultNumberOfCommitters","type":"uint256","internalType":"uint256"},{"name":"defaultDkgPhaseDuration","type":"uint256","internalType":"uint256"},{"name":"groupMaxCapacity","type":"uint256","internalType":"uint256"},{"name":"idealNumberOfGroups","type":"uint256","internalType":"uint256"},{"name":"dkgPostProcessReward","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getCoordinator","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getGroup","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","internalType":"struct IController.Group","components":[{"name":"index","type":"uint256","internalType":"uint256"},{"name":"epoch","type":"uint256","internalType":"uint256"},{"name":"size","type":"uint256","internalType":"uint256"},{"name":"threshold","type":"uint256","internalType":"uint256"},{"name":"members","type":"tuple[]","internalType":"struct IController.Member[]","components":[{"name":"nodeIdAddress","type":"address","internalType":"address"},{"name":"partialPublicKey","type":"uint256[4]","internalType":"uint256[4]"}]},{"name":"committers","type":"address[]","internalType":"address[]"},{"name":"commitCacheList","type":"tuple[]","internalType":"struct IController.CommitCache[]","components":[{"name":"nodeIdAddress","type":"address[]","internalType":"address[]"},{"name":"commitResult","type":"tuple","internalType":"struct IController.CommitResult","components":[{"name":"groupEpoch","type":"uint256","internalType":"uint256"},{"name":"publicKey","type":"uint256[4]","internalType":"uint256[4]"},{"name":"disqualifiedNodes","type":"address[]","internalType":"address[]"}]}]},{"name":"isStrictlyMajorityConsensusReached","type":"bool","internalType":"bool"},{"name":"publicKey","type":"uint256[4]","internalType":"uint256[4]"}]}],"stateMutability":"view"},{"type":"function","name":"getGroupCount","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getGroupEpoch","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getGroupThreshold","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getLastOutput","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getMember","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"},{"name":"memberIndex","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","internalType":"struct IController.Member","components":[{"name":"nodeIdAddress","type":"address","internalType":"address"},{"name":"partialPublicKey","type":"uint256[4]","internalType":"uint256[4]"}]}],"stateMutability":"view"},{"type":"function","name":"getValidGroupIndices","inputs":[],"outputs":[{"name":"","type":"uint256[]","internalType":"uint256[]"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"lastOutput","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"isPartialKeyRegistered","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"},{"name":"nodeIdAddress","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"nodeJoin","inputs":[{"name":"nodeIdAddress","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"nodeLeave","inputs":[{"name":"nodeIdAddress","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"nodeWithdrawETH","inputs":[{"name":"recipient","type":"address","internalType":"address"},{"name":"ethAmount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"postProcessDkg","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"},{"name":"groupEpoch","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"proxiableUUID","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setControllerConfig","inputs":[{"name":"nodeRegistryContractAddress","type":"address","internalType":"address"},{"name":"adapterContractAddress","type":"address","internalType":"address"},{"name":"disqualifiedNodePenaltyAmount","type":"uint256","internalType":"uint256"},{"name":"defaultNumberOfCommitters","type":"uint256","internalType":"uint256"},{"name":"defaultDkgPhaseDuration","type":"uint256","internalType":"uint256"},{"name":"groupMaxCapacity","type":"uint256","internalType":"uint256"},{"name":"idealNumberOfGroups","type":"uint256","internalType":"uint256"},{"name":"dkgPostProcessReward","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setLastOutput","inputs":[{"name":"lastOutput","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"upgradeTo","inputs":[{"name":"newImplementation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"upgradeToAndCall","inputs":[{"name":"newImplementation","type":"address","internalType":"address"},{"name":"data","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"event","name":"AdminChanged","inputs":[{"name":"previousAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"newAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"BeaconUpgraded","inputs":[{"name":"beacon","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ControllerConfigSet","inputs":[{"name":"nodeRegistryContractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"adapterContractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"disqualifiedNodePenaltyAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"defaultNumberOfCommitters","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"defaultDkgPhaseDuration","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"groupMaxCapacity","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"idealNumberOfGroups","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"dkgPostProcessReward","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"DkgTask","inputs":[{"name":"globalEpoch","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"groupIndex","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"groupEpoch","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"size","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"threshold","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"members","type":"address[]","indexed":false,"internalType":"address[]"},{"name":"assignmentBlockHeight","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"coordinatorAddress","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Upgraded","inputs":[{"name":"implementation","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"CannotLeaveGroupDuringDkg","inputs":[]},{"type":"error","name":"CoordinatorNotFound","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"DkgNotInProgress","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"DkgStillInProgress","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"},{"name":"phase","type":"int8","internalType":"int8"}]},{"type":"error","name":"DuplicatedDisqualifiedNode","inputs":[]},{"type":"error","name":"EpochMismatch","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"},{"name":"inputGroupEpoch","type":"uint256","internalType":"uint256"},{"name":"currentGroupEpoch","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"GroupNotExist","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidPartialPublicKey","inputs":[]},{"type":"error","name":"InvalidPublicKey","inputs":[]},{"type":"error","name":"NodeNotInGroup","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"},{"name":"nodeIdAddress","type":"address","internalType":"address"}]},{"type":"error","name":"PartialKeyAlreadyRegistered","inputs":[{"name":"groupIndex","type":"uint256","internalType":"uint256"},{"name":"nodeIdAddress","type":"address","internalType":"address"}]},{"type":"error","name":"SenderNotAdapter","inputs":[]},{"type":"error","name":"SenderNotNodeRegistry","inputs":[]}],"bytecode":{"object":"0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e7565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000e5576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051615ae26200011f60003960008181610de201528181610e2501528181610ffd0152818161104001526110dc0152615ae26000f3fe608060405260043610620001c35760003560e01c80638da5cb5b11620000f3578063e37eb96c1162000095578063f2fde38b116200006c578063f2fde38b146200056c578063f3df08021462000591578063f49e0ba914620005b6578063fe4b84df14620005f257600080fd5b8063e37eb96c14620004fd578063ed157c3f1462000522578063f1d49f6b146200054757600080fd5b8063c2db900b11620000ca578063c2db900b1462000426578063ceb60654146200045c578063d11b8e68146200049057600080fd5b80638da5cb5b14620003ba578063914eb34d14620003da578063b330a0fd14620003ff57600080fd5b806342424d6f116200016957806351a2b9a0116200014057806351a2b9a0146200035c57806352d1902d1462000373578063715018a6146200038b5780637ee49cfd14620003a357600080fd5b806342424d6f14620002be5780634d79a89314620003115780634f1ef286146200034557600080fd5b806335fe4a3f116200019e57806335fe4a3f14620002395780633659cfe6146200025e5780633b6c00b0146200028357600080fd5b806306545a9314620001c85780630ad98f6a14620001ed5780630bf9c5c61462000214575b600080fd5b348015620001d557600080fd5b5060d0545b6040519081526020015b60405180910390f35b348015620001fa57600080fd5b50620002126200020c36600462003658565b62000617565b005b3480156200022157600080fd5b50620002126200023336600462003687565b620006af565b3480156200024657600080fd5b506200021262000258366004620036aa565b62000c01565b3480156200026b57600080fd5b50620002126200027d366004620036aa565b62000dd8565b3480156200029057600080fd5b50620002a8620002a2366004620036aa565b62000ec3565b60408051928352602083019190915201620001e4565b348015620002cb57600080fd5b50620002f8620002dd366004620036ca565b600090815260ce60205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001620001e4565b3480156200031e57600080fd5b50620003366200033036600462003687565b62000f56565b604051620001e491906200372a565b620002126200035636600462003837565b62000ff3565b3480156200036957600080fd5b5060d554620001da565b3480156200038057600080fd5b50620001da620010cf565b3480156200039857600080fd5b506200021262001185565b348015620003b057600080fd5b5060cf54620001da565b348015620003c757600080fd5b506097546001600160a01b0316620002f8565b348015620003e757600080fd5b5062000212620003f93660046200392c565b6200119d565b3480156200040c57600080fd5b506200041762001238565b604051620001e491906200397e565b3480156200043357600080fd5b506200044b62000445366004620039c4565b620012bb565b6040519015158152602001620001e4565b3480156200046957600080fd5b50620004816200047b366004620036ca565b62001687565b604051620001e4919062003b24565b3480156200049d57600080fd5b5060c95460ca5460cb5460d45460cc5460d35460d25460cd54604080516001600160a01b03998a168152989097166020890152958701949094526060860192909252608085015260a084015260c083015260e082015261010001620001e4565b3480156200050a57600080fd5b50620002126200051c36600462003be2565b620019a5565b3480156200052f57600080fd5b50620001da62000541366004620036aa565b620023f0565b3480156200055457600080fd5b50620002126200056636600462003cb9565b62002500565b3480156200057957600080fd5b50620002126200058b366004620036aa565b62002663565b3480156200059e57600080fd5b5062000212620005b0366004620036ca565b620026df565b348015620005c357600080fd5b50620002a8620005d5366004620036ca565b600090815260d16020526040902060038101546002909101549091565b348015620005ff57600080fd5b506200021262000611366004620036ca565b62002710565b60c9546001600160a01b031633146200064357604051630e2c730d60e41b815260040160405180910390fd5b60ca5460405163056cc7b560e11b81526001600160a01b0384811660048301526024820184905290911690630ad98f6a90604401600060405180830381600087803b1580156200069257600080fd5b505af1158015620006a7573d6000803e3d6000fd5b505050505050565b60d0548210620006da57604051637f6efcb560e11b8152600481018390526024015b60405180910390fd5b6040516358914d0360e01b815260cf60048201526024810183905233604482015273__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562000738573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200075e919062003d29565b19620007875760405163eb51f5f960e01b815260048101839052336024820152604401620006d1565b600082815260d16020526040902060018101548214620007d257600181015460405163048b63c360e11b815260048101859052602481018490526044810191909152606401620006d1565b600083815260ce60205260409020546001600160a01b03166200080c57604051635291bbcf60e01b815260048101849052602401620006d1565b600083815260ce602090815260409182902054825163221f951160e01b815292516001600160a01b0390911692839263221f9511926004808401938290030181865afa15801562000861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000887919062003d43565b60000b600019146200091f5783816001600160a01b031663221f95116040518163ffffffff1660e01b8152600401602060405180830381865afa158015620008d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008f9919062003d43565b60405163f7c06f9160e01b8152600481019290925260000b6024820152604401620006d1565b806001600160a01b0316639cb8a26a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200095b57600080fd5b505af115801562000970573d6000803e3d6000fd5b505050600085815260ce6020526040902080546001600160a01b031916905550600782015460ff1662000b455760d554604051630295316d60e51b815260cf6004820152602481018690526044810191909152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__906352a62da090606401600060405180830381865af415801562000a05573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000a2f919081019062003e37565b9150915060005b825181101562000af75760c95483516001600160a01b0390911690638ed470089085908490811062000a6c5762000a6c62003e98565b602090810291909101015160cb546040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260006044820152606401600060405180830381600087803b15801562000ac857600080fd5b505af115801562000add573d6000803e3d6000fd5b50505050808062000aee9062003ec4565b91505062000a36565b5060005b815181101562000b415762000b2c82828151811062000b1e5762000b1e62003e98565b60200260200101516200282f565b8062000b388162003ec4565b91505062000afb565b5050505b60408051600180825281830190925260009160208083019080368337019050509050338160008151811062000b7e5762000b7e62003e98565b6001600160a01b03928316602091820292909201015260c95460cd5460405163914eb34d60e01b8152919092169163914eb34d9162000bc69185916000919060040162003ee0565b600060405180830381600087803b15801562000be157600080fd5b505af115801562000bf6573d6000803e3d6000fd5b505050505050505050565b60c9546001600160a01b0316331462000c2d57604051630e2c730d60e41b815260040160405180910390fd5b60405163787c576760e01b815260cf60048201526001600160a01b0382166024820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__9063787c5767906044016040805180830381865af415801562000c91573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000cb7919062003f07565b91509150816000191462000dd357600082815260ce60205260409020546001600160a01b03161562000cfc5760405163cccf9bf160e01b815260040160405180910390fd5b60d55460405163cd21da9960e01b815260cf60048201526024810184905260448101839052606481019190915260009073__$99f6e31d9157e72684c1fb13c20fb01510$__9063cd21da9990608401600060405180830381865af415801562000d69573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000d93919081019062003f2c565b905060005b815181101562000dd05762000dbb82828151811062000b1e5762000b1e62003e98565b8062000dc78162003ec4565b91505062000d98565b50505b505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300362000e235760405162461bcd60e51b8152600401620006d19062003f65565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031662000e6e60008051602062005a66833981519152546001600160a01b031690565b6001600160a01b03161462000e975760405162461bcd60e51b8152600401620006d19062003fb1565b62000ea28162002e66565b6040805160008082526020820190925262000ec09183919062002e70565b50565b60405163787c576760e01b815260cf60048201526001600160a01b0382166024820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__9063787c5767906044016040805180830381865af415801562000f27573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f4d919062003f07565b91509150915091565b62000f606200344e565b600083815260d16020526040902060040180548390811062000f865762000f8662003e98565b6000918252602091829020604080518082018252600590930290910180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b81548152602001906001019080831162000fcd5750505050508152505090505b92915050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036200103e5760405162461bcd60e51b8152600401620006d19062003f65565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200108960008051602062005a66833981519152546001600160a01b031690565b6001600160a01b031614620010b25760405162461bcd60e51b8152600401620006d19062003fb1565b620010bd8262002e66565b620010cb8282600162002e70565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620011715760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401620006d1565b5060008051602062005a6683398151915290565b6200118f62002fe8565b6200119b600062003044565b565b60ca546001600160a01b03163314620011c95760405163469666c560e01b815260040160405180910390fd5b60c95460405163914eb34d60e01b81526001600160a01b039091169063914eb34d90620011ff9086908690869060040162003ee0565b600060405180830381600087803b1580156200121a57600080fd5b505af11580156200122f573d6000803e3d6000fd5b50505050505050565b604051631c2da66560e31b815260cf600482015260609073__$99f6e31d9157e72684c1fb13c20fb01510$__9063e16d332890602401600060405180830381865af41580156200128c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620012b6919081019062003f2c565b905090565b600082815260d160209081526040808320815161012081018352815481526001820154818501526002820154818401526003820154606082015260048201805484518187028101870190955280855286959294608086019390929190879084015b82821015620013985760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b8154815260200190600101908083116200136b57505050505081525050815260200190600101906200131c565b50505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015620013fb57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620013dc575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b8282101562001579578382906000526020600020906007020160405180604001604052908160008201805480602002602001604051908101604052809291908181526020018280548015620014a857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162001489575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b815481526020019060010190808311620014e45750505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200155c57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200153d575b505050505081525050815250508152602001906001019062001429565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b815481526020019060010190808311620015ac57505050505081525050905060005b8160800151518110156200167c57836001600160a01b031682608001518281518110620015ff57620015ff62003e98565b6020026020010151600001516001600160a01b03160362001667578160800151818151811062001633576200163362003e98565b60200260200101516020015160006004811062001654576200165462003e98565b6020020151600014159250505062000fed565b80620016738162003ec4565b915050620015ce565b506000949350505050565b6200169162003478565b600082815260d1602090815260408083208151610120810183528154815260018201548185015260028201548184015260038201546060820152600482018054845181870281018701909552808552919592946080870194939192919084015b828210156200176d5760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311620017405750505050508152505081526020019060010190620016f1565b50505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015620017d057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620017b1575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156200194e5783829060005260206000209060070201604051806040016040529081600082018054806020026020016040519081016040528092919081815260200182805480156200187d57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200185e575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b815481526020019060010190808311620018b95750505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200193157602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162001912575b5050505050815250508152505081526020019060010190620017fe565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b81548152602001906001019080831162001981575050505050815250509050919050565b60d054815110620019d0578051604051637f6efcb560e11b81526004810191909152602401620006d1565b8051600090815260ce60205260409020546001600160a01b031662001a0f578051604051635291bbcf60e01b81526004810191909152602401620006d1565b8051600090815260ce602090815260409182902054825163221f951160e01b815292516001600160a01b0390911692839263221f9511926004808401938290030181865afa15801562001a66573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a8c919062003d43565b60000b1962001ab55781516040516343609fe160e01b81526004810191909152602401620006d1565b8151600090815260d16020908152604090912060018101549184015190911462001b105782516020840151600183015460405163048b63c360e11b8152600481019390935260248301919091526044820152606401620006d1565b82516040516358914d0360e01b815260cf6004820152602481019190915233604482015273__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562001b71573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001b97919062003d29565b1962001bc357825160405163eb51f5f960e01b81526004810191909152336024820152604401620006d1565b825162001bd19033620012bb565b1562001bfd57825160405163173ca10960e31b81526004810191909152336024820152604401620006d1565b60608301516040516316f6db8160e01b815260009173__$34d23ddaee48904c6c566425acbfa0fc0e$__916316f6db819162001c3c9160040162004051565b608060405180830381865af415801562001c5a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001c80919062004066565b604051636fda2c7960e01b815290915073__$34d23ddaee48904c6c566425acbfa0fc0e$__90636fda2c799062001cbc908490600401620040ec565b602060405180830381865af415801562001cda573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001d00919062004112565b62001d1e57604051631886185760e01b815260040160405180910390fd5b60408085015190516316f6db8160e01b815260009173__$34d23ddaee48904c6c566425acbfa0fc0e$__916316f6db819162001d5d9160040162004051565b608060405180830381865af415801562001d7b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001da1919062004066565b604051636fda2c7960e01b815290915073__$34d23ddaee48904c6c566425acbfa0fc0e$__90636fda2c799062001ddd908490600401620040ec565b602060405180830381865af415801562001dfb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001e21919062004112565b62001e3f5760405163145a1fdd60e31b815260040160405180910390fd5b84516040516358914d0360e01b815260cf6004808301919091526024820192909252336044820152839185019073__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562001ea9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ecf919062003d29565b8154811062001ee25762001ee262003e98565b906000526020600020906005020160010190600462001f03929190620034c8565b50600783015460ff1662000dd05760005b856080015151811015620020f95760cf73__$99f6e31d9157e72684c1fb13c20fb01510$__6358914d03909188600001518960800151858151811062001f5e5762001f5e62003e98565b60200260200101516040518463ffffffff1660e01b815260040162001f9f9392919092835260208301919091526001600160a01b0316604082015260600190565b602060405180830381865af415801562001fbd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001fe3919062003d29565b196200203b578551608087015180518390811062002005576200200562003e98565b602002602001015160405163eb51f5f960e01b8152600401620006d19291909182526001600160a01b0316602082015260400190565b60006200204a82600162004130565b90505b866080015151811015620020e3578660800151818151811062002074576200207462003e98565b60200260200101516001600160a01b0316876080015183815181106200209e576200209e62003e98565b60200260200101516001600160a01b031603620020ce576040516342381c9560e01b815260040160405180910390fd5b80620020da8162003ec4565b9150506200204d565b5080620020f08162003ec4565b91505062001f14565b50604080516060810182526020808801518252810183905260808701518183015286519151636aba6eeb60e11b8152909173__$99f6e31d9157e72684c1fb13c20fb01510$__9163d574ddd6916200215a9160cf9190869060040162004146565b602060405180830381865af415801562002178573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200219e919062004112565b6200228557604080516001818301818152608083019093526000928291606083016020803683375050508152602001839052805180519192503391600090620021eb57620021eb62003e98565b6001600160a01b0390921660209283029190910182015260068601805460018101825560009182529082902083518051859460079094029092019262002237928492909101906200350b565b5060208281015180516001840190815591810151909190620022609060028501906004620034c8565b50604082015180516200227e9160058401916020909101906200350b565b5050505050505b855160d55460405163449cf2fd60e11b815260cf600482015260248101929092526044820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__90638939e5fa90606401600060405180830381865af4158015620022ed573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620023179190810190620041d1565b915091508115620023e65760005b815181101562000bf65760c95482516001600160a01b0390911690638ed47008908490849081106200235b576200235b62003e98565b602090810291909101015160cb546040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260006044820152606401600060405180830381600087803b158015620023b757600080fd5b505af1158015620023cc573d6000803e3d6000fd5b505050508080620023dd9062003ec4565b91505062002325565b5050505050505050565b60c9546000906001600160a01b031633146200241f57604051630e2c730d60e41b815260040160405180910390fd5b60d554604051629bf68360e11b815260cf60048201526001600160a01b03841660248201526044810191909152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__90630137ed0690606401600060405180830381865af41580156200248e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620024b891908101906200421b565b9150915060005b8151811015620024f757620024e282828151811062000b1e5762000b1e62003e98565b80620024ee8162003ec4565b915050620024bf565b50909392505050565b6200250a62002fe8565b6040805160a0810182526001600160a01b038a8116808352908a16602083018190528284018a905260608301889052608090920184905260c980546001600160a01b0319908116909217905560ca8054909116909117905560cb87905560cc85905560cd829055516301a79f6360e71b815260cf600482015260248101839052604481018490526064810186905273__$99f6e31d9157e72684c1fb13c20fb01510$__9063d3cfb1809060840160006040518083038186803b158015620025d057600080fd5b505af4158015620025e5573d6000803e3d6000fd5b5050604080516001600160a01b03808d1682528b166020820152908101899052606081018890526080810187905260a0810186905260c0810185905260e081018490527ff95156a904d33c289d45bd80fdb27f108976d7a2de754073eb7506cf618779ad925061010001905060405180910390a15050505050505050565b6200266d62002fe8565b6001600160a01b038116620026d45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620006d1565b62000ec08162003044565b60ca546001600160a01b031633146200270b5760405163469666c560e01b815260040160405180910390fd5b60d555565b600054610100900460ff1615808015620027315750600054600160ff909116105b806200274d5750303b1580156200274d575060005460ff166001145b620027b25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620006d1565b6000805460ff191660011790558015620027d6576000805461ff0019166101001790555b60d5829055620027e562003096565b8015620010cb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6200283c60cf82620030ca565b600081815260d1602090815260408083208151610120810183528154815260018201548185015260028201548184015260038201546060820152600482018054845181870281018701909552808552919492936080860193909290879084015b82821015620029185760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311620028eb57505050505081525050815260200190600101906200289c565b505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200297b57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200295c575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b8282101562002af957838290600052602060002090600702016040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801562002a2857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162002a09575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b81548152602001906001019080831162002a6457505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801562002adc57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162002abd575b5050505050815250508152505081526020019060010190620029a9565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b81548152602001906001019080831162002b2c5750505050508152505090506000816060015160c96003015460405162002b669062003563565b9182526020820152604001604051809103906000f08015801562002b8e573d6000803e3d6000fd5b50600084815260ce602052604080822080546001600160a01b0319166001600160a01b0385161790558401519192509067ffffffffffffffff81111562002bd95762002bd96200373a565b60405190808252806020026020018201604052801562002c03578160200160208202803683370190505b5090506000836040015167ffffffffffffffff81111562002c285762002c286200373a565b60405190808252806020026020018201604052801562002c5d57816020015b606081526020019060019003908162002c475790505b50905060005b846040015181101562002da1578460800151818151811062002c895762002c8962003e98565b60200260200101516000015183828151811062002caa5762002caa62003e98565b6001600160a01b03928316602091820292909201015260c9546080870151805160009392909216916315dac9b291908590811062002cec5762002cec62003e98565b6020908102919091010151516040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381865afa15801562002d3d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262002d6791908101906200425c565b90508083838151811062002d7f5762002d7f62003e98565b602002602001018190525050808062002d989062003ec4565b91505062002c63565b506040516337f8d5ff60e01b81526001600160a01b038416906337f8d5ff9062002dd29085908590600401620042dc565b600060405180830381600087803b15801562002ded57600080fd5b505af115801562002e02573d6000803e3d6000fd5b505050508360200151846000015160cf600001547fbbd25d64683f157b2e3544d3d6430e14102db1e49592cf4dcaf827e2ded517ee8760400151886060015187438a60405162002e5795949392919062004354565b60405180910390a45050505050565b62000ec062002fe8565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562002ea65762000dd383620031ab565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801562002f03575060408051601f3d908101601f1916820190925262002f009181019062003d29565b60015b62002f685760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401620006d1565b60008051602062005a66833981519152811462002fda5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401620006d1565b5062000dd38383836200324a565b6097546001600160a01b031633146200119b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006d1565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620030c05760405162461bcd60e51b8152600401620006d19062004396565b6200119b62003275565b8154826000620030da8362003ec4565b9091555050600081815260028301602052604081206001810180549192620031028362003ec4565b909155505060078101805460ff191690556200312360058201600062003571565b6200313360068201600062003591565b60005b6004820154811015620031a5578160040181815481106200315b576200315b62003e98565b906000526020600020906005020160010160006200319091905060008155600101600081556001016000815560010160009055565b806200319c8162003ec4565b91505062003136565b50505050565b6001600160a01b0381163b6200321a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620006d1565b60008051602062005a6683398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6200325583620032aa565b600082511180620032635750805b1562000dd357620031a58383620032ec565b600054610100900460ff166200329f5760405162461bcd60e51b8152600401620006d19062004396565b6200119b3362003044565b620032b581620031ab565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062003314838360405180606001604052806027815260200162005a86602791396200331b565b9392505050565b6060600080856001600160a01b0316856040516200333a9190620043e1565b600060405180830381855af49150503d806000811462003377576040519150601f19603f3d011682016040523d82523d6000602084013e6200337c565b606091505b50915091506200338f8683838762003399565b9695505050505050565b606083156200340d57825160000362003405576001600160a01b0385163b620034055760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620006d1565b508162003419565b62003419838362003421565b949350505050565b815115620034325781518083602001fd5b8060405162461bcd60e51b8152600401620006d1919062004051565b604051806040016040528060006001600160a01b0316815260200162003473620035b4565b905290565b6040518061012001604052806000815260200160008152602001600081526020016000815260200160608152602001606081526020016060815260200160001515815260200162003473620035b4565b8260048101928215620034f9579160200282015b82811115620034f9578251825591602001919060010190620034dc565b5062003507929150620035d2565b5090565b828054828255906000526020600020908101928215620034f9579160200282015b82811115620034f957825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200352c565b611666806200440083390190565b508054600082559060005260206000209081019062000ec09190620035d2565b508054600082556007029060005260206000209081019062000ec09190620035e9565b60405180608001604052806004906020820280368337509192915050565b5b80821115620035075760008155600101620035d3565b808211156200350757600062003600828262003571565b60006001830181815560028401829055600384018290556004840182905560058401829055906200363660058301600062003571565b505050600701620035e9565b6001600160a01b038116811462000ec057600080fd5b600080604083850312156200366c57600080fd5b8235620036798162003642565b946020939093013593505050565b600080604083850312156200369b57600080fd5b50508035926020909101359150565b600060208284031215620036bd57600080fd5b8135620033148162003642565b600060208284031215620036dd57600080fd5b5035919050565b8060005b6004811015620031a5578151845260209384019390910190600101620036e8565b6001600160a01b038151168252602081015162000dd36020840182620036e4565b60a0810162000fed828462003709565b634e487b7160e01b600052604160045260246000fd5b60405160a0810167ffffffffffffffff811182821017156200377657620037766200373a565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715620037a857620037a86200373a565b604052919050565b600067ffffffffffffffff821115620037cd57620037cd6200373a565b50601f01601f191660200190565b600082601f830112620037ed57600080fd5b813562003804620037fe82620037b0565b6200377c565b8181528460208386010111156200381a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156200384b57600080fd5b8235620038588162003642565b9150602083013567ffffffffffffffff8111156200387557600080fd5b6200388385828601620037db565b9150509250929050565b600067ffffffffffffffff821115620038aa57620038aa6200373a565b5060051b60200190565b600082601f830112620038c657600080fd5b81356020620038d9620037fe836200388d565b82815260059290921b84018101918181019086841115620038f957600080fd5b8286015b8481101562003921578035620039138162003642565b8352918301918301620038fd565b509695505050505050565b6000806000606084860312156200394257600080fd5b833567ffffffffffffffff8111156200395a57600080fd5b6200396886828701620038b4565b9660208601359650604090950135949350505050565b6020808252825182820181905260009190848201906040850190845b81811015620039b8578351835292840192918401916001016200399a565b50909695505050505050565b60008060408385031215620039d857600080fd5b823591506020830135620039ec8162003642565b809150509250929050565b600081518084526020808501945080840160005b8381101562003a355762003a2187835162003709565b60a096909601959082019060010162003a0b565b509495945050505050565b600081518084526020808501945080840160005b8381101562003a355781516001600160a01b03168752958201959082019060010162003a54565b600081518084526020808501808196508360051b8101915082860160005b8581101562003b1757828403895281516040815181875262003abe8288018262003a40565b90508783015192508681038888015260c0835182528884015162003ae58a840182620036e4565b508284015193508060a083015262003b008183018562003a40565b9c89019c9750505092860192505060010162003a99565b5091979650505050505050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015161018060a084015262003b6c6101a0840182620039f7565b905060a0840151601f19808584030160c086015262003b8c838362003a40565b925060c08601519150808584030160e08601525062003bac828262003a7b565b91505060e084015161010062003bc58186018315159052565b850151905062003bda610120850182620036e4565b509392505050565b60006020828403121562003bf557600080fd5b813567ffffffffffffffff8082111562003c0e57600080fd5b9083019060a0828603121562003c2357600080fd5b62003c2d62003750565b823581526020830135602082015260408301358281111562003c4e57600080fd5b62003c5c87828601620037db565b60408301525060608301358281111562003c7557600080fd5b62003c8387828601620037db565b60608301525060808301358281111562003c9c57600080fd5b62003caa87828601620038b4565b60808301525095945050505050565b600080600080600080600080610100898b03121562003cd757600080fd5b883562003ce48162003642565b9750602089013562003cf68162003642565b979a9799505050506040860135956060810135956080820135955060a0820135945060c0820135935060e0909101359150565b60006020828403121562003d3c57600080fd5b5051919050565b60006020828403121562003d5657600080fd5b81518060000b81146200331457600080fd5b600082601f83011262003d7a57600080fd5b8151602062003d8d620037fe836200388d565b82815260059290921b8401810191818101908684111562003dad57600080fd5b8286015b848110156200392157805162003dc78162003642565b835291830191830162003db1565b600082601f83011262003de757600080fd5b8151602062003dfa620037fe836200388d565b82815260059290921b8401810191818101908684111562003e1a57600080fd5b8286015b8481101562003921578051835291830191830162003e1e565b6000806040838503121562003e4b57600080fd5b825167ffffffffffffffff8082111562003e6457600080fd5b62003e728683870162003d68565b9350602085015191508082111562003e8957600080fd5b50620038838582860162003dd5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162003ed95762003ed962003eae565b5060010190565b60608152600062003ef5606083018662003a40565b60208301949094525060400152919050565b6000806040838503121562003f1b57600080fd5b505080516020909101519092909150565b60006020828403121562003f3f57600080fd5b815167ffffffffffffffff81111562003f5757600080fd5b620034198482850162003dd5565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60005b838110156200401a57818101518382015260200162004000565b50506000910152565b600081518084526200403d81602086016020860162003ffd565b601f01601f19169290920160200192915050565b60208152600062003314602083018462004023565b6000608082840312156200407957600080fd5b82601f8301126200408957600080fd5b6040516080810181811067ffffffffffffffff82111715620040af57620040af6200373a565b604052806080840185811115620040c557600080fd5b845b81811015620040e1578051835260209283019201620040c7565b509195945050505050565b6080810162000fed8284620036e4565b805180151581146200410d57600080fd5b919050565b6000602082840312156200412557600080fd5b6200331482620040fc565b8082018082111562000fed5762000fed62003eae565b8381526000602084818401526060604084015261012083018451606085015281850151620041786080860182620036e4565b50604085015160c06101008601528051918290528201906000906101408601905b80831015620041c45783516001600160a01b0316825292840192600192909201919084019062004199565b5098975050505050505050565b60008060408385031215620041e557600080fd5b620041f083620040fc565b9150602083015167ffffffffffffffff8111156200420d57600080fd5b620038838582860162003d68565b600080604083850312156200422f57600080fd5b82519150602083015167ffffffffffffffff8111156200424e57600080fd5b620038838582860162003dd5565b6000602082840312156200426f57600080fd5b815167ffffffffffffffff8111156200428757600080fd5b8201601f810184136200429957600080fd5b8051620042aa620037fe82620037b0565b818152856020838501011115620042c057600080fd5b620042d382602083016020860162003ffd565b95945050505050565b604081526000620042f1604083018562003a40565b6020838203818501528185518084528284019150828160051b85010183880160005b838110156200434557601f198784030185526200433283835162004023565b9486019492509085019060010162004313565b50909998505050505050505050565b85815284602082015260a0604082015260006200437560a083018662003a40565b90508360608301526001600160a01b03831660808301529695505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008251620043f581846020870162003ffd565b919091019291505056fe60c0604052600060065534801561001557600080fd5b506040516116663803806116668339810160408190526100349161009b565b61003d3361004b565b60a0919091526080526100bf565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100ae57600080fd5b505080516020909101519092909150565b60805160a05161154a61011c6000396000818161027f0152610768015260008181610243015281816103aa015281816103dc015281816104150152818161044e0152818161089b0152818161093e01526109e5015261154a6000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063cc5ef00911610071578063cc5ef009146102a1578063cd5e3837146102a9578063ce7c2ac2146102bc578063d73fe0aa146102cf578063f2fde38b146102d757600080fd5b80638da5cb5b146102255780639cb8a26a14610236578063ac5553ce1461023e578063b0ef817914610265578063c27040241461027a57600080fd5b80634e3874a0116100f45780634e3874a0146101cc5780635aa68ac0146101e2578063670d14b2146101f7578063715018a61461020a5780637fd283461461021257600080fd5b80630ea6564814610131578063221f95111461015a57806335c1d3491461017557806337f8d5ff146101a057806348cd4cb1146101b5575b600080fd5b61014461013f36600461105a565b6102ea565b60405161015191906110d0565b60405180910390f35b610162610384565b60405160009190910b8152602001610151565b6101886101833660046110e3565b61048b565b6040516001600160a01b039091168152602001610151565b6101b36101ae366004611148565b6104b5565b005b6101be60065481565b604051908152602001610151565b6101d461060a565b60405161015192919061120c565b6101ea61078f565b604051610151919061122d565b61014461020536600461105a565b6107f1565b6101b361080a565b6101b361022036600461127a565b61081e565b6000546001600160a01b0316610188565b6101b3610ae1565b6101be7f000000000000000000000000000000000000000000000000000000000000000081565b61026d610af7565b60405161015191906112ec565b6101be7f000000000000000000000000000000000000000000000000000000000000000081565b61026d610c55565b6101446102b736600461105a565b610dad565b6101446102ca36600461105a565b610dc6565b61026d610ddf565b6101b36102e536600461105a565b610f37565b60036020526000908152604090208054610303906112ff565b80601f016020809104026020016040519081016040528092919081815260200182805461032f906112ff565b801561037c5780601f106103515761010080835404028352916020019161037c565b820191906000526020600020905b81548152906001019060200180831161035f57829003601f168201915b505050505081565b60006006546000036103965750600090565b6000600654436103a69190611349565b90507f000000000000000000000000000000000000000000000000000000000000000081116103d757600191505090565b6104027f00000000000000000000000000000000000000000000000000000000000000006002611362565b811161041057600291505090565b61043b7f00000000000000000000000000000000000000000000000000000000000000006003611362565b811161044957600391505090565b6104747f00000000000000000000000000000000000000000000000000000000000000006004611362565b811161048257600491505090565b60001991505090565b6005818154811061049b57600080fd5b6000918252602090912001546001600160a01b0316905081565b6006541561050a5760405162461bcd60e51b815260206004820152601760248201527f444b472068617320616c7265616479207374617274656400000000000000000060448201526064015b60405180910390fd5b610512610fb0565b60005b838110156105ff57600585858381811061053157610531611379565b9050602002016020810190610546919061105a565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b0390921691909117905582828281811061058a5761058a611379565b905060200281019061059c919061138f565b600160008888868181106105b2576105b2611379565b90506020020160208101906105c7919061105a565b6001600160a01b031681526020810191909152604001600020916105ec91908361143a565b50806105f7816114fb565b915050610515565b505043600655505050565b60006060600060058054905067ffffffffffffffff81111561062e5761062e6113d6565b60405190808252806020026020018201604052801561066157816020015b606081526020019060019003908161064c5790505b50905060005b60055481101561076557600160006005838154811061068857610688611379565b60009182526020808320909101546001600160a01b03168352820192909252604001902080546106b7906112ff565b80601f01602080910402602001604051908101604052809291908181526020018280546106e3906112ff565b80156107305780601f1061070557610100808354040283529160200191610730565b820191906000526020600020905b81548152906001019060200180831161071357829003601f168201915b505050505082828151811061074757610747611379565b6020026020010181905250808061075d906114fb565b915050610667565b507f0000000000000000000000000000000000000000000000000000000000000000939092509050565b606060058054806020026020016040519081016040528092919081815260200182805480156107e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116107c9575b5050505050905090565b60016020526000908152604090208054610303906112ff565b610812610fb0565b61081c600061100a565b565b3360009081526001602052604081208054610838906112ff565b9050116108875760405162461bcd60e51b815260206004820152601b60248201527f796f7520617265206e6f7420612067726f7570206d656d6265722100000000006044820152606401610501565b6000600654436108979190611349565b90507f000000000000000000000000000000000000000000000000000000000000000081116109395733600090815260026020526040902080546108da906112ff565b1590506109195760405162461bcd60e51b815260206004820152600d60248201526c1cda185c9948195e1a5cdd1959609a1b6044820152606401610501565b33600090815260026020526040902061093383858361143a565b50505050565b6109647f00000000000000000000000000000000000000000000000000000000000000006002611362565b81116109e0573360009081526003602052604090208054610984906112ff565b1590506109c65760405162461bcd60e51b815260206004820152601060248201526f1c995cdc1bdb9cd948195e1a5cdd195960821b6044820152606401610501565b33600090815260036020526040902061093383858361143a565b610a0b7f00000000000000000000000000000000000000000000000000000000000000006003611362565b8111610a94573360009081526004602052604090208054610a2b906112ff565b159050610a7a5760405162461bcd60e51b815260206004820152601560248201527f6a757374696669636174696f6e206578697374656400000000000000000000006044820152606401610501565b33600090815260046020526040902061093383858361143a565b60405162461bcd60e51b815260206004820152601560248201527f444b47205075626c6973682068617320656e64656400000000000000000000006044820152606401610501565b505050565b610ae9610fb0565b6000546001600160a01b0316ff5b60055460609060009067ffffffffffffffff811115610b1857610b186113d6565b604051908082528060200260200182016040528015610b4b57816020015b6060815260200190600190039081610b365790505b50905060005b600554811015610c4f576004600060058381548110610b7257610b72611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610ba1906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610bcd906112ff565b8015610c1a5780601f10610bef57610100808354040283529160200191610c1a565b820191906000526020600020905b815481529060010190602001808311610bfd57829003601f168201915b5050505050828281518110610c3157610c31611379565b60200260200101819052508080610c47906114fb565b915050610b51565b50919050565b60055460609060009067ffffffffffffffff811115610c7657610c766113d6565b604051908082528060200260200182016040528015610ca957816020015b6060815260200190600190039081610c945790505b50905060005b600554811015610c4f576003600060058381548110610cd057610cd0611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610cff906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2b906112ff565b8015610d785780601f10610d4d57610100808354040283529160200191610d78565b820191906000526020600020905b815481529060010190602001808311610d5b57829003601f168201915b5050505050828281518110610d8f57610d8f611379565b60200260200101819052508080610da5906114fb565b915050610caf565b60046020526000908152604090208054610303906112ff565b60026020526000908152604090208054610303906112ff565b60055460609060009067ffffffffffffffff811115610e0057610e006113d6565b604051908082528060200260200182016040528015610e3357816020015b6060815260200190600190039081610e1e5790505b50905060005b600554811015610c4f576002600060058381548110610e5a57610e5a611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610e89906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb5906112ff565b8015610f025780601f10610ed757610100808354040283529160200191610f02565b820191906000526020600020905b815481529060010190602001808311610ee557829003601f168201915b5050505050828281518110610f1957610f19611379565b60200260200101819052508080610f2f906114fb565b915050610e39565b610f3f610fb0565b6001600160a01b038116610fa45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b610fad8161100a565b50565b6000546001600160a01b0316331461081c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610501565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561106c57600080fd5b81356001600160a01b038116811461108357600080fd5b9392505050565b6000815180845260005b818110156110b057602081850181015186830182015201611094565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000611083602083018461108a565b6000602082840312156110f557600080fd5b5035919050565b60008083601f84011261110e57600080fd5b50813567ffffffffffffffff81111561112657600080fd5b6020830191508360208260051b850101111561114157600080fd5b9250929050565b6000806000806040858703121561115e57600080fd5b843567ffffffffffffffff8082111561117657600080fd5b611182888389016110fc565b9096509450602087013591508082111561119b57600080fd5b506111a8878288016110fc565b95989497509550505050565b600082825180855260208086019550808260051b84010181860160005b848110156111ff57601f198684030189526111ed83835161108a565b988401989250908301906001016111d1565b5090979650505050505050565b82815260406020820152600061122560408301846111b4565b949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561126e5783516001600160a01b031683529284019291840191600101611249565b50909695505050505050565b6000806020838503121561128d57600080fd5b823567ffffffffffffffff808211156112a557600080fd5b818501915085601f8301126112b957600080fd5b8135818111156112c857600080fd5b8660208285010111156112da57600080fd5b60209290920196919550909350505050565b60208152600061108360208301846111b4565b600181811c9082168061131357607f821691505b602082108103610c4f57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561135c5761135c611333565b92915050565b808202811582820484141761135c5761135c611333565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113a657600080fd5b83018035915067ffffffffffffffff8211156113c157600080fd5b60200191503681900382131561114157600080fd5b634e487b7160e01b600052604160045260246000fd5b601f821115610adc57600081815260208120601f850160051c810160208610156114135750805b601f850160051c820191505b818110156114325782815560010161141f565b505050505050565b67ffffffffffffffff831115611452576114526113d6565b6114668361146083546112ff565b836113ec565b6000601f84116001811461149a57600085156114825750838201355b600019600387901b1c1916600186901b1783556114f4565b600083815260209020601f19861690835b828110156114cb57868501358255602094850194600190920191016114ab565b50868210156114e85760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60006001820161150d5761150d611333565b506001019056fea2646970667358221220fa05377607ecc6548d8101a54019d147738c74cac6c9434b650cbf8f1260a61f64736f6c63430008120033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122044a029635051ab03c46b7869f8fa93d82f221e16634fc6955c11862d454338d164736f6c63430008120033","sourceMap":"719:16101:100:-:0;;;1198:4:57;1155:48;;2775:53:100;;;;;;;;;-1:-1:-1;2799:22:100;:20;:22::i;:::-;719:16101;;5939:280:56;6007:13;;;;;;;6006:14;5998:66;;;;-1:-1:-1;;;5998:66:56;;216:2:148;5998:66:56;;;198:21:148;255:2;235:18;;;228:30;294:34;274:18;;;267:62;-1:-1:-1;;;345:18:148;;;338:37;392:19;;5998:66:56;;;;;;;;6078:12;;6094:15;6078:12;;;:31;6074:139;;6125:12;:30;;-1:-1:-1;;6125:30:56;6140:15;6125:30;;;;;;6174:28;;564:36:148;;;6174:28:56;;552:2:148;537:18;6174:28:56;;;;;;;6074:139;5939:280::o;422:184:148:-;719:16101:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","linkReferences":{"src/libraries/BLS.sol":{"BLS":[{"start":7475,"length":20},{"start":7601,"length":20},{"start":7764,"length":20},{"start":7890,"length":20}]},"src/libraries/GroupLib.sol":{"GroupLib":[{"start":2076,"length":20},{"start":2793,"length":20},{"start":3446,"length":20},{"start":3661,"length":20},{"start":4108,"length":20},{"start":4976,"length":20},{"start":7253,"length":20},{"start":8077,"length":20},{"start":8261,"length":20},{"start":8779,"length":20},{"start":9169,"length":20},{"start":9586,"length":20},{"start":9913,"length":20}]}}},"deployedBytecode":{"object":"0x608060405260043610620001c35760003560e01c80638da5cb5b11620000f3578063e37eb96c1162000095578063f2fde38b116200006c578063f2fde38b146200056c578063f3df08021462000591578063f49e0ba914620005b6578063fe4b84df14620005f257600080fd5b8063e37eb96c14620004fd578063ed157c3f1462000522578063f1d49f6b146200054757600080fd5b8063c2db900b11620000ca578063c2db900b1462000426578063ceb60654146200045c578063d11b8e68146200049057600080fd5b80638da5cb5b14620003ba578063914eb34d14620003da578063b330a0fd14620003ff57600080fd5b806342424d6f116200016957806351a2b9a0116200014057806351a2b9a0146200035c57806352d1902d1462000373578063715018a6146200038b5780637ee49cfd14620003a357600080fd5b806342424d6f14620002be5780634d79a89314620003115780634f1ef286146200034557600080fd5b806335fe4a3f116200019e57806335fe4a3f14620002395780633659cfe6146200025e5780633b6c00b0146200028357600080fd5b806306545a9314620001c85780630ad98f6a14620001ed5780630bf9c5c61462000214575b600080fd5b348015620001d557600080fd5b5060d0545b6040519081526020015b60405180910390f35b348015620001fa57600080fd5b50620002126200020c36600462003658565b62000617565b005b3480156200022157600080fd5b50620002126200023336600462003687565b620006af565b3480156200024657600080fd5b506200021262000258366004620036aa565b62000c01565b3480156200026b57600080fd5b50620002126200027d366004620036aa565b62000dd8565b3480156200029057600080fd5b50620002a8620002a2366004620036aa565b62000ec3565b60408051928352602083019190915201620001e4565b348015620002cb57600080fd5b50620002f8620002dd366004620036ca565b600090815260ce60205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001620001e4565b3480156200031e57600080fd5b50620003366200033036600462003687565b62000f56565b604051620001e491906200372a565b620002126200035636600462003837565b62000ff3565b3480156200036957600080fd5b5060d554620001da565b3480156200038057600080fd5b50620001da620010cf565b3480156200039857600080fd5b506200021262001185565b348015620003b057600080fd5b5060cf54620001da565b348015620003c757600080fd5b506097546001600160a01b0316620002f8565b348015620003e757600080fd5b5062000212620003f93660046200392c565b6200119d565b3480156200040c57600080fd5b506200041762001238565b604051620001e491906200397e565b3480156200043357600080fd5b506200044b62000445366004620039c4565b620012bb565b6040519015158152602001620001e4565b3480156200046957600080fd5b50620004816200047b366004620036ca565b62001687565b604051620001e4919062003b24565b3480156200049d57600080fd5b5060c95460ca5460cb5460d45460cc5460d35460d25460cd54604080516001600160a01b03998a168152989097166020890152958701949094526060860192909252608085015260a084015260c083015260e082015261010001620001e4565b3480156200050a57600080fd5b50620002126200051c36600462003be2565b620019a5565b3480156200052f57600080fd5b50620001da62000541366004620036aa565b620023f0565b3480156200055457600080fd5b50620002126200056636600462003cb9565b62002500565b3480156200057957600080fd5b50620002126200058b366004620036aa565b62002663565b3480156200059e57600080fd5b5062000212620005b0366004620036ca565b620026df565b348015620005c357600080fd5b50620002a8620005d5366004620036ca565b600090815260d16020526040902060038101546002909101549091565b348015620005ff57600080fd5b506200021262000611366004620036ca565b62002710565b60c9546001600160a01b031633146200064357604051630e2c730d60e41b815260040160405180910390fd5b60ca5460405163056cc7b560e11b81526001600160a01b0384811660048301526024820184905290911690630ad98f6a90604401600060405180830381600087803b1580156200069257600080fd5b505af1158015620006a7573d6000803e3d6000fd5b505050505050565b60d0548210620006da57604051637f6efcb560e11b8152600481018390526024015b60405180910390fd5b6040516358914d0360e01b815260cf60048201526024810183905233604482015273__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562000738573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200075e919062003d29565b19620007875760405163eb51f5f960e01b815260048101839052336024820152604401620006d1565b600082815260d16020526040902060018101548214620007d257600181015460405163048b63c360e11b815260048101859052602481018490526044810191909152606401620006d1565b600083815260ce60205260409020546001600160a01b03166200080c57604051635291bbcf60e01b815260048101849052602401620006d1565b600083815260ce602090815260409182902054825163221f951160e01b815292516001600160a01b0390911692839263221f9511926004808401938290030181865afa15801562000861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000887919062003d43565b60000b600019146200091f5783816001600160a01b031663221f95116040518163ffffffff1660e01b8152600401602060405180830381865afa158015620008d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008f9919062003d43565b60405163f7c06f9160e01b8152600481019290925260000b6024820152604401620006d1565b806001600160a01b0316639cb8a26a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200095b57600080fd5b505af115801562000970573d6000803e3d6000fd5b505050600085815260ce6020526040902080546001600160a01b031916905550600782015460ff1662000b455760d554604051630295316d60e51b815260cf6004820152602481018690526044810191909152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__906352a62da090606401600060405180830381865af415801562000a05573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000a2f919081019062003e37565b9150915060005b825181101562000af75760c95483516001600160a01b0390911690638ed470089085908490811062000a6c5762000a6c62003e98565b602090810291909101015160cb546040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260006044820152606401600060405180830381600087803b15801562000ac857600080fd5b505af115801562000add573d6000803e3d6000fd5b50505050808062000aee9062003ec4565b91505062000a36565b5060005b815181101562000b415762000b2c82828151811062000b1e5762000b1e62003e98565b60200260200101516200282f565b8062000b388162003ec4565b91505062000afb565b5050505b60408051600180825281830190925260009160208083019080368337019050509050338160008151811062000b7e5762000b7e62003e98565b6001600160a01b03928316602091820292909201015260c95460cd5460405163914eb34d60e01b8152919092169163914eb34d9162000bc69185916000919060040162003ee0565b600060405180830381600087803b15801562000be157600080fd5b505af115801562000bf6573d6000803e3d6000fd5b505050505050505050565b60c9546001600160a01b0316331462000c2d57604051630e2c730d60e41b815260040160405180910390fd5b60405163787c576760e01b815260cf60048201526001600160a01b0382166024820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__9063787c5767906044016040805180830381865af415801562000c91573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000cb7919062003f07565b91509150816000191462000dd357600082815260ce60205260409020546001600160a01b03161562000cfc5760405163cccf9bf160e01b815260040160405180910390fd5b60d55460405163cd21da9960e01b815260cf60048201526024810184905260448101839052606481019190915260009073__$99f6e31d9157e72684c1fb13c20fb01510$__9063cd21da9990608401600060405180830381865af415801562000d69573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000d93919081019062003f2c565b905060005b815181101562000dd05762000dbb82828151811062000b1e5762000b1e62003e98565b8062000dc78162003ec4565b91505062000d98565b50505b505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300362000e235760405162461bcd60e51b8152600401620006d19062003f65565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031662000e6e60008051602062005a66833981519152546001600160a01b031690565b6001600160a01b03161462000e975760405162461bcd60e51b8152600401620006d19062003fb1565b62000ea28162002e66565b6040805160008082526020820190925262000ec09183919062002e70565b50565b60405163787c576760e01b815260cf60048201526001600160a01b0382166024820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__9063787c5767906044016040805180830381865af415801562000f27573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f4d919062003f07565b91509150915091565b62000f606200344e565b600083815260d16020526040902060040180548390811062000f865762000f8662003e98565b6000918252602091829020604080518082018252600590930290910180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b81548152602001906001019080831162000fcd5750505050508152505090505b92915050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036200103e5760405162461bcd60e51b8152600401620006d19062003f65565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200108960008051602062005a66833981519152546001600160a01b031690565b6001600160a01b031614620010b25760405162461bcd60e51b8152600401620006d19062003fb1565b620010bd8262002e66565b620010cb8282600162002e70565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620011715760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401620006d1565b5060008051602062005a6683398151915290565b6200118f62002fe8565b6200119b600062003044565b565b60ca546001600160a01b03163314620011c95760405163469666c560e01b815260040160405180910390fd5b60c95460405163914eb34d60e01b81526001600160a01b039091169063914eb34d90620011ff9086908690869060040162003ee0565b600060405180830381600087803b1580156200121a57600080fd5b505af11580156200122f573d6000803e3d6000fd5b50505050505050565b604051631c2da66560e31b815260cf600482015260609073__$99f6e31d9157e72684c1fb13c20fb01510$__9063e16d332890602401600060405180830381865af41580156200128c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620012b6919081019062003f2c565b905090565b600082815260d160209081526040808320815161012081018352815481526001820154818501526002820154818401526003820154606082015260048201805484518187028101870190955280855286959294608086019390929190879084015b82821015620013985760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b8154815260200190600101908083116200136b57505050505081525050815260200190600101906200131c565b50505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015620013fb57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620013dc575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b8282101562001579578382906000526020600020906007020160405180604001604052908160008201805480602002602001604051908101604052809291908181526020018280548015620014a857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162001489575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b815481526020019060010190808311620014e45750505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200155c57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200153d575b505050505081525050815250508152602001906001019062001429565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b815481526020019060010190808311620015ac57505050505081525050905060005b8160800151518110156200167c57836001600160a01b031682608001518281518110620015ff57620015ff62003e98565b6020026020010151600001516001600160a01b03160362001667578160800151818151811062001633576200163362003e98565b60200260200101516020015160006004811062001654576200165462003e98565b6020020151600014159250505062000fed565b80620016738162003ec4565b915050620015ce565b506000949350505050565b6200169162003478565b600082815260d1602090815260408083208151610120810183528154815260018201548185015260028201548184015260038201546060820152600482018054845181870281018701909552808552919592946080870194939192919084015b828210156200176d5760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311620017405750505050508152505081526020019060010190620016f1565b50505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015620017d057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620017b1575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156200194e5783829060005260206000209060070201604051806040016040529081600082018054806020026020016040519081016040528092919081815260200182805480156200187d57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200185e575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b815481526020019060010190808311620018b95750505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200193157602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162001912575b5050505050815250508152505081526020019060010190620017fe565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b81548152602001906001019080831162001981575050505050815250509050919050565b60d054815110620019d0578051604051637f6efcb560e11b81526004810191909152602401620006d1565b8051600090815260ce60205260409020546001600160a01b031662001a0f578051604051635291bbcf60e01b81526004810191909152602401620006d1565b8051600090815260ce602090815260409182902054825163221f951160e01b815292516001600160a01b0390911692839263221f9511926004808401938290030181865afa15801562001a66573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a8c919062003d43565b60000b1962001ab55781516040516343609fe160e01b81526004810191909152602401620006d1565b8151600090815260d16020908152604090912060018101549184015190911462001b105782516020840151600183015460405163048b63c360e11b8152600481019390935260248301919091526044820152606401620006d1565b82516040516358914d0360e01b815260cf6004820152602481019190915233604482015273__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562001b71573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001b97919062003d29565b1962001bc357825160405163eb51f5f960e01b81526004810191909152336024820152604401620006d1565b825162001bd19033620012bb565b1562001bfd57825160405163173ca10960e31b81526004810191909152336024820152604401620006d1565b60608301516040516316f6db8160e01b815260009173__$34d23ddaee48904c6c566425acbfa0fc0e$__916316f6db819162001c3c9160040162004051565b608060405180830381865af415801562001c5a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001c80919062004066565b604051636fda2c7960e01b815290915073__$34d23ddaee48904c6c566425acbfa0fc0e$__90636fda2c799062001cbc908490600401620040ec565b602060405180830381865af415801562001cda573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001d00919062004112565b62001d1e57604051631886185760e01b815260040160405180910390fd5b60408085015190516316f6db8160e01b815260009173__$34d23ddaee48904c6c566425acbfa0fc0e$__916316f6db819162001d5d9160040162004051565b608060405180830381865af415801562001d7b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001da1919062004066565b604051636fda2c7960e01b815290915073__$34d23ddaee48904c6c566425acbfa0fc0e$__90636fda2c799062001ddd908490600401620040ec565b602060405180830381865af415801562001dfb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001e21919062004112565b62001e3f5760405163145a1fdd60e31b815260040160405180910390fd5b84516040516358914d0360e01b815260cf6004808301919091526024820192909252336044820152839185019073__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562001ea9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ecf919062003d29565b8154811062001ee25762001ee262003e98565b906000526020600020906005020160010190600462001f03929190620034c8565b50600783015460ff1662000dd05760005b856080015151811015620020f95760cf73__$99f6e31d9157e72684c1fb13c20fb01510$__6358914d03909188600001518960800151858151811062001f5e5762001f5e62003e98565b60200260200101516040518463ffffffff1660e01b815260040162001f9f9392919092835260208301919091526001600160a01b0316604082015260600190565b602060405180830381865af415801562001fbd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001fe3919062003d29565b196200203b578551608087015180518390811062002005576200200562003e98565b602002602001015160405163eb51f5f960e01b8152600401620006d19291909182526001600160a01b0316602082015260400190565b60006200204a82600162004130565b90505b866080015151811015620020e3578660800151818151811062002074576200207462003e98565b60200260200101516001600160a01b0316876080015183815181106200209e576200209e62003e98565b60200260200101516001600160a01b031603620020ce576040516342381c9560e01b815260040160405180910390fd5b80620020da8162003ec4565b9150506200204d565b5080620020f08162003ec4565b91505062001f14565b50604080516060810182526020808801518252810183905260808701518183015286519151636aba6eeb60e11b8152909173__$99f6e31d9157e72684c1fb13c20fb01510$__9163d574ddd6916200215a9160cf9190869060040162004146565b602060405180830381865af415801562002178573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200219e919062004112565b6200228557604080516001818301818152608083019093526000928291606083016020803683375050508152602001839052805180519192503391600090620021eb57620021eb62003e98565b6001600160a01b0390921660209283029190910182015260068601805460018101825560009182529082902083518051859460079094029092019262002237928492909101906200350b565b5060208281015180516001840190815591810151909190620022609060028501906004620034c8565b50604082015180516200227e9160058401916020909101906200350b565b5050505050505b855160d55460405163449cf2fd60e11b815260cf600482015260248101929092526044820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__90638939e5fa90606401600060405180830381865af4158015620022ed573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620023179190810190620041d1565b915091508115620023e65760005b815181101562000bf65760c95482516001600160a01b0390911690638ed47008908490849081106200235b576200235b62003e98565b602090810291909101015160cb546040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260006044820152606401600060405180830381600087803b158015620023b757600080fd5b505af1158015620023cc573d6000803e3d6000fd5b505050508080620023dd9062003ec4565b91505062002325565b5050505050505050565b60c9546000906001600160a01b031633146200241f57604051630e2c730d60e41b815260040160405180910390fd5b60d554604051629bf68360e11b815260cf60048201526001600160a01b03841660248201526044810191909152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__90630137ed0690606401600060405180830381865af41580156200248e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620024b891908101906200421b565b9150915060005b8151811015620024f757620024e282828151811062000b1e5762000b1e62003e98565b80620024ee8162003ec4565b915050620024bf565b50909392505050565b6200250a62002fe8565b6040805160a0810182526001600160a01b038a8116808352908a16602083018190528284018a905260608301889052608090920184905260c980546001600160a01b0319908116909217905560ca8054909116909117905560cb87905560cc85905560cd829055516301a79f6360e71b815260cf600482015260248101839052604481018490526064810186905273__$99f6e31d9157e72684c1fb13c20fb01510$__9063d3cfb1809060840160006040518083038186803b158015620025d057600080fd5b505af4158015620025e5573d6000803e3d6000fd5b5050604080516001600160a01b03808d1682528b166020820152908101899052606081018890526080810187905260a0810186905260c0810185905260e081018490527ff95156a904d33c289d45bd80fdb27f108976d7a2de754073eb7506cf618779ad925061010001905060405180910390a15050505050505050565b6200266d62002fe8565b6001600160a01b038116620026d45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620006d1565b62000ec08162003044565b60ca546001600160a01b031633146200270b5760405163469666c560e01b815260040160405180910390fd5b60d555565b600054610100900460ff1615808015620027315750600054600160ff909116105b806200274d5750303b1580156200274d575060005460ff166001145b620027b25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620006d1565b6000805460ff191660011790558015620027d6576000805461ff0019166101001790555b60d5829055620027e562003096565b8015620010cb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6200283c60cf82620030ca565b600081815260d1602090815260408083208151610120810183528154815260018201548185015260028201548184015260038201546060820152600482018054845181870281018701909552808552919492936080860193909290879084015b82821015620029185760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311620028eb57505050505081525050815260200190600101906200289c565b505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200297b57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200295c575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b8282101562002af957838290600052602060002090600702016040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801562002a2857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162002a09575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b81548152602001906001019080831162002a6457505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801562002adc57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162002abd575b5050505050815250508152505081526020019060010190620029a9565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b81548152602001906001019080831162002b2c5750505050508152505090506000816060015160c96003015460405162002b669062003563565b9182526020820152604001604051809103906000f08015801562002b8e573d6000803e3d6000fd5b50600084815260ce602052604080822080546001600160a01b0319166001600160a01b0385161790558401519192509067ffffffffffffffff81111562002bd95762002bd96200373a565b60405190808252806020026020018201604052801562002c03578160200160208202803683370190505b5090506000836040015167ffffffffffffffff81111562002c285762002c286200373a565b60405190808252806020026020018201604052801562002c5d57816020015b606081526020019060019003908162002c475790505b50905060005b846040015181101562002da1578460800151818151811062002c895762002c8962003e98565b60200260200101516000015183828151811062002caa5762002caa62003e98565b6001600160a01b03928316602091820292909201015260c9546080870151805160009392909216916315dac9b291908590811062002cec5762002cec62003e98565b6020908102919091010151516040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381865afa15801562002d3d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262002d6791908101906200425c565b90508083838151811062002d7f5762002d7f62003e98565b602002602001018190525050808062002d989062003ec4565b91505062002c63565b506040516337f8d5ff60e01b81526001600160a01b038416906337f8d5ff9062002dd29085908590600401620042dc565b600060405180830381600087803b15801562002ded57600080fd5b505af115801562002e02573d6000803e3d6000fd5b505050508360200151846000015160cf600001547fbbd25d64683f157b2e3544d3d6430e14102db1e49592cf4dcaf827e2ded517ee8760400151886060015187438a60405162002e5795949392919062004354565b60405180910390a45050505050565b62000ec062002fe8565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562002ea65762000dd383620031ab565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801562002f03575060408051601f3d908101601f1916820190925262002f009181019062003d29565b60015b62002f685760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401620006d1565b60008051602062005a66833981519152811462002fda5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401620006d1565b5062000dd38383836200324a565b6097546001600160a01b031633146200119b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006d1565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620030c05760405162461bcd60e51b8152600401620006d19062004396565b6200119b62003275565b8154826000620030da8362003ec4565b9091555050600081815260028301602052604081206001810180549192620031028362003ec4565b909155505060078101805460ff191690556200312360058201600062003571565b6200313360068201600062003591565b60005b6004820154811015620031a5578160040181815481106200315b576200315b62003e98565b906000526020600020906005020160010160006200319091905060008155600101600081556001016000815560010160009055565b806200319c8162003ec4565b91505062003136565b50505050565b6001600160a01b0381163b6200321a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620006d1565b60008051602062005a6683398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6200325583620032aa565b600082511180620032635750805b1562000dd357620031a58383620032ec565b600054610100900460ff166200329f5760405162461bcd60e51b8152600401620006d19062004396565b6200119b3362003044565b620032b581620031ab565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062003314838360405180606001604052806027815260200162005a86602791396200331b565b9392505050565b6060600080856001600160a01b0316856040516200333a9190620043e1565b600060405180830381855af49150503d806000811462003377576040519150601f19603f3d011682016040523d82523d6000602084013e6200337c565b606091505b50915091506200338f8683838762003399565b9695505050505050565b606083156200340d57825160000362003405576001600160a01b0385163b620034055760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620006d1565b508162003419565b62003419838362003421565b949350505050565b815115620034325781518083602001fd5b8060405162461bcd60e51b8152600401620006d1919062004051565b604051806040016040528060006001600160a01b0316815260200162003473620035b4565b905290565b6040518061012001604052806000815260200160008152602001600081526020016000815260200160608152602001606081526020016060815260200160001515815260200162003473620035b4565b8260048101928215620034f9579160200282015b82811115620034f9578251825591602001919060010190620034dc565b5062003507929150620035d2565b5090565b828054828255906000526020600020908101928215620034f9579160200282015b82811115620034f957825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200352c565b611666806200440083390190565b508054600082559060005260206000209081019062000ec09190620035d2565b508054600082556007029060005260206000209081019062000ec09190620035e9565b60405180608001604052806004906020820280368337509192915050565b5b80821115620035075760008155600101620035d3565b808211156200350757600062003600828262003571565b60006001830181815560028401829055600384018290556004840182905560058401829055906200363660058301600062003571565b505050600701620035e9565b6001600160a01b038116811462000ec057600080fd5b600080604083850312156200366c57600080fd5b8235620036798162003642565b946020939093013593505050565b600080604083850312156200369b57600080fd5b50508035926020909101359150565b600060208284031215620036bd57600080fd5b8135620033148162003642565b600060208284031215620036dd57600080fd5b5035919050565b8060005b6004811015620031a5578151845260209384019390910190600101620036e8565b6001600160a01b038151168252602081015162000dd36020840182620036e4565b60a0810162000fed828462003709565b634e487b7160e01b600052604160045260246000fd5b60405160a0810167ffffffffffffffff811182821017156200377657620037766200373a565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715620037a857620037a86200373a565b604052919050565b600067ffffffffffffffff821115620037cd57620037cd6200373a565b50601f01601f191660200190565b600082601f830112620037ed57600080fd5b813562003804620037fe82620037b0565b6200377c565b8181528460208386010111156200381a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156200384b57600080fd5b8235620038588162003642565b9150602083013567ffffffffffffffff8111156200387557600080fd5b6200388385828601620037db565b9150509250929050565b600067ffffffffffffffff821115620038aa57620038aa6200373a565b5060051b60200190565b600082601f830112620038c657600080fd5b81356020620038d9620037fe836200388d565b82815260059290921b84018101918181019086841115620038f957600080fd5b8286015b8481101562003921578035620039138162003642565b8352918301918301620038fd565b509695505050505050565b6000806000606084860312156200394257600080fd5b833567ffffffffffffffff8111156200395a57600080fd5b6200396886828701620038b4565b9660208601359650604090950135949350505050565b6020808252825182820181905260009190848201906040850190845b81811015620039b8578351835292840192918401916001016200399a565b50909695505050505050565b60008060408385031215620039d857600080fd5b823591506020830135620039ec8162003642565b809150509250929050565b600081518084526020808501945080840160005b8381101562003a355762003a2187835162003709565b60a096909601959082019060010162003a0b565b509495945050505050565b600081518084526020808501945080840160005b8381101562003a355781516001600160a01b03168752958201959082019060010162003a54565b600081518084526020808501808196508360051b8101915082860160005b8581101562003b1757828403895281516040815181875262003abe8288018262003a40565b90508783015192508681038888015260c0835182528884015162003ae58a840182620036e4565b508284015193508060a083015262003b008183018562003a40565b9c89019c9750505092860192505060010162003a99565b5091979650505050505050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015161018060a084015262003b6c6101a0840182620039f7565b905060a0840151601f19808584030160c086015262003b8c838362003a40565b925060c08601519150808584030160e08601525062003bac828262003a7b565b91505060e084015161010062003bc58186018315159052565b850151905062003bda610120850182620036e4565b509392505050565b60006020828403121562003bf557600080fd5b813567ffffffffffffffff8082111562003c0e57600080fd5b9083019060a0828603121562003c2357600080fd5b62003c2d62003750565b823581526020830135602082015260408301358281111562003c4e57600080fd5b62003c5c87828601620037db565b60408301525060608301358281111562003c7557600080fd5b62003c8387828601620037db565b60608301525060808301358281111562003c9c57600080fd5b62003caa87828601620038b4565b60808301525095945050505050565b600080600080600080600080610100898b03121562003cd757600080fd5b883562003ce48162003642565b9750602089013562003cf68162003642565b979a9799505050506040860135956060810135956080820135955060a0820135945060c0820135935060e0909101359150565b60006020828403121562003d3c57600080fd5b5051919050565b60006020828403121562003d5657600080fd5b81518060000b81146200331457600080fd5b600082601f83011262003d7a57600080fd5b8151602062003d8d620037fe836200388d565b82815260059290921b8401810191818101908684111562003dad57600080fd5b8286015b848110156200392157805162003dc78162003642565b835291830191830162003db1565b600082601f83011262003de757600080fd5b8151602062003dfa620037fe836200388d565b82815260059290921b8401810191818101908684111562003e1a57600080fd5b8286015b8481101562003921578051835291830191830162003e1e565b6000806040838503121562003e4b57600080fd5b825167ffffffffffffffff8082111562003e6457600080fd5b62003e728683870162003d68565b9350602085015191508082111562003e8957600080fd5b50620038838582860162003dd5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162003ed95762003ed962003eae565b5060010190565b60608152600062003ef5606083018662003a40565b60208301949094525060400152919050565b6000806040838503121562003f1b57600080fd5b505080516020909101519092909150565b60006020828403121562003f3f57600080fd5b815167ffffffffffffffff81111562003f5757600080fd5b620034198482850162003dd5565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60005b838110156200401a57818101518382015260200162004000565b50506000910152565b600081518084526200403d81602086016020860162003ffd565b601f01601f19169290920160200192915050565b60208152600062003314602083018462004023565b6000608082840312156200407957600080fd5b82601f8301126200408957600080fd5b6040516080810181811067ffffffffffffffff82111715620040af57620040af6200373a565b604052806080840185811115620040c557600080fd5b845b81811015620040e1578051835260209283019201620040c7565b509195945050505050565b6080810162000fed8284620036e4565b805180151581146200410d57600080fd5b919050565b6000602082840312156200412557600080fd5b6200331482620040fc565b8082018082111562000fed5762000fed62003eae565b8381526000602084818401526060604084015261012083018451606085015281850151620041786080860182620036e4565b50604085015160c06101008601528051918290528201906000906101408601905b80831015620041c45783516001600160a01b0316825292840192600192909201919084019062004199565b5098975050505050505050565b60008060408385031215620041e557600080fd5b620041f083620040fc565b9150602083015167ffffffffffffffff8111156200420d57600080fd5b620038838582860162003d68565b600080604083850312156200422f57600080fd5b82519150602083015167ffffffffffffffff8111156200424e57600080fd5b620038838582860162003dd5565b6000602082840312156200426f57600080fd5b815167ffffffffffffffff8111156200428757600080fd5b8201601f810184136200429957600080fd5b8051620042aa620037fe82620037b0565b818152856020838501011115620042c057600080fd5b620042d382602083016020860162003ffd565b95945050505050565b604081526000620042f1604083018562003a40565b6020838203818501528185518084528284019150828160051b85010183880160005b838110156200434557601f198784030185526200433283835162004023565b9486019492509085019060010162004313565b50909998505050505050505050565b85815284602082015260a0604082015260006200437560a083018662003a40565b90508360608301526001600160a01b03831660808301529695505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008251620043f581846020870162003ffd565b919091019291505056fe60c0604052600060065534801561001557600080fd5b506040516116663803806116668339810160408190526100349161009b565b61003d3361004b565b60a0919091526080526100bf565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100ae57600080fd5b505080516020909101519092909150565b60805160a05161154a61011c6000396000818161027f0152610768015260008181610243015281816103aa015281816103dc015281816104150152818161044e0152818161089b0152818161093e01526109e5015261154a6000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063cc5ef00911610071578063cc5ef009146102a1578063cd5e3837146102a9578063ce7c2ac2146102bc578063d73fe0aa146102cf578063f2fde38b146102d757600080fd5b80638da5cb5b146102255780639cb8a26a14610236578063ac5553ce1461023e578063b0ef817914610265578063c27040241461027a57600080fd5b80634e3874a0116100f45780634e3874a0146101cc5780635aa68ac0146101e2578063670d14b2146101f7578063715018a61461020a5780637fd283461461021257600080fd5b80630ea6564814610131578063221f95111461015a57806335c1d3491461017557806337f8d5ff146101a057806348cd4cb1146101b5575b600080fd5b61014461013f36600461105a565b6102ea565b60405161015191906110d0565b60405180910390f35b610162610384565b60405160009190910b8152602001610151565b6101886101833660046110e3565b61048b565b6040516001600160a01b039091168152602001610151565b6101b36101ae366004611148565b6104b5565b005b6101be60065481565b604051908152602001610151565b6101d461060a565b60405161015192919061120c565b6101ea61078f565b604051610151919061122d565b61014461020536600461105a565b6107f1565b6101b361080a565b6101b361022036600461127a565b61081e565b6000546001600160a01b0316610188565b6101b3610ae1565b6101be7f000000000000000000000000000000000000000000000000000000000000000081565b61026d610af7565b60405161015191906112ec565b6101be7f000000000000000000000000000000000000000000000000000000000000000081565b61026d610c55565b6101446102b736600461105a565b610dad565b6101446102ca36600461105a565b610dc6565b61026d610ddf565b6101b36102e536600461105a565b610f37565b60036020526000908152604090208054610303906112ff565b80601f016020809104026020016040519081016040528092919081815260200182805461032f906112ff565b801561037c5780601f106103515761010080835404028352916020019161037c565b820191906000526020600020905b81548152906001019060200180831161035f57829003601f168201915b505050505081565b60006006546000036103965750600090565b6000600654436103a69190611349565b90507f000000000000000000000000000000000000000000000000000000000000000081116103d757600191505090565b6104027f00000000000000000000000000000000000000000000000000000000000000006002611362565b811161041057600291505090565b61043b7f00000000000000000000000000000000000000000000000000000000000000006003611362565b811161044957600391505090565b6104747f00000000000000000000000000000000000000000000000000000000000000006004611362565b811161048257600491505090565b60001991505090565b6005818154811061049b57600080fd5b6000918252602090912001546001600160a01b0316905081565b6006541561050a5760405162461bcd60e51b815260206004820152601760248201527f444b472068617320616c7265616479207374617274656400000000000000000060448201526064015b60405180910390fd5b610512610fb0565b60005b838110156105ff57600585858381811061053157610531611379565b9050602002016020810190610546919061105a565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b0390921691909117905582828281811061058a5761058a611379565b905060200281019061059c919061138f565b600160008888868181106105b2576105b2611379565b90506020020160208101906105c7919061105a565b6001600160a01b031681526020810191909152604001600020916105ec91908361143a565b50806105f7816114fb565b915050610515565b505043600655505050565b60006060600060058054905067ffffffffffffffff81111561062e5761062e6113d6565b60405190808252806020026020018201604052801561066157816020015b606081526020019060019003908161064c5790505b50905060005b60055481101561076557600160006005838154811061068857610688611379565b60009182526020808320909101546001600160a01b03168352820192909252604001902080546106b7906112ff565b80601f01602080910402602001604051908101604052809291908181526020018280546106e3906112ff565b80156107305780601f1061070557610100808354040283529160200191610730565b820191906000526020600020905b81548152906001019060200180831161071357829003601f168201915b505050505082828151811061074757610747611379565b6020026020010181905250808061075d906114fb565b915050610667565b507f0000000000000000000000000000000000000000000000000000000000000000939092509050565b606060058054806020026020016040519081016040528092919081815260200182805480156107e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116107c9575b5050505050905090565b60016020526000908152604090208054610303906112ff565b610812610fb0565b61081c600061100a565b565b3360009081526001602052604081208054610838906112ff565b9050116108875760405162461bcd60e51b815260206004820152601b60248201527f796f7520617265206e6f7420612067726f7570206d656d6265722100000000006044820152606401610501565b6000600654436108979190611349565b90507f000000000000000000000000000000000000000000000000000000000000000081116109395733600090815260026020526040902080546108da906112ff565b1590506109195760405162461bcd60e51b815260206004820152600d60248201526c1cda185c9948195e1a5cdd1959609a1b6044820152606401610501565b33600090815260026020526040902061093383858361143a565b50505050565b6109647f00000000000000000000000000000000000000000000000000000000000000006002611362565b81116109e0573360009081526003602052604090208054610984906112ff565b1590506109c65760405162461bcd60e51b815260206004820152601060248201526f1c995cdc1bdb9cd948195e1a5cdd195960821b6044820152606401610501565b33600090815260036020526040902061093383858361143a565b610a0b7f00000000000000000000000000000000000000000000000000000000000000006003611362565b8111610a94573360009081526004602052604090208054610a2b906112ff565b159050610a7a5760405162461bcd60e51b815260206004820152601560248201527f6a757374696669636174696f6e206578697374656400000000000000000000006044820152606401610501565b33600090815260046020526040902061093383858361143a565b60405162461bcd60e51b815260206004820152601560248201527f444b47205075626c6973682068617320656e64656400000000000000000000006044820152606401610501565b505050565b610ae9610fb0565b6000546001600160a01b0316ff5b60055460609060009067ffffffffffffffff811115610b1857610b186113d6565b604051908082528060200260200182016040528015610b4b57816020015b6060815260200190600190039081610b365790505b50905060005b600554811015610c4f576004600060058381548110610b7257610b72611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610ba1906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610bcd906112ff565b8015610c1a5780601f10610bef57610100808354040283529160200191610c1a565b820191906000526020600020905b815481529060010190602001808311610bfd57829003601f168201915b5050505050828281518110610c3157610c31611379565b60200260200101819052508080610c47906114fb565b915050610b51565b50919050565b60055460609060009067ffffffffffffffff811115610c7657610c766113d6565b604051908082528060200260200182016040528015610ca957816020015b6060815260200190600190039081610c945790505b50905060005b600554811015610c4f576003600060058381548110610cd057610cd0611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610cff906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2b906112ff565b8015610d785780601f10610d4d57610100808354040283529160200191610d78565b820191906000526020600020905b815481529060010190602001808311610d5b57829003601f168201915b5050505050828281518110610d8f57610d8f611379565b60200260200101819052508080610da5906114fb565b915050610caf565b60046020526000908152604090208054610303906112ff565b60026020526000908152604090208054610303906112ff565b60055460609060009067ffffffffffffffff811115610e0057610e006113d6565b604051908082528060200260200182016040528015610e3357816020015b6060815260200190600190039081610e1e5790505b50905060005b600554811015610c4f576002600060058381548110610e5a57610e5a611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610e89906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb5906112ff565b8015610f025780601f10610ed757610100808354040283529160200191610f02565b820191906000526020600020905b815481529060010190602001808311610ee557829003601f168201915b5050505050828281518110610f1957610f19611379565b60200260200101819052508080610f2f906114fb565b915050610e39565b610f3f610fb0565b6001600160a01b038116610fa45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b610fad8161100a565b50565b6000546001600160a01b0316331461081c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610501565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561106c57600080fd5b81356001600160a01b038116811461108357600080fd5b9392505050565b6000815180845260005b818110156110b057602081850181015186830182015201611094565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000611083602083018461108a565b6000602082840312156110f557600080fd5b5035919050565b60008083601f84011261110e57600080fd5b50813567ffffffffffffffff81111561112657600080fd5b6020830191508360208260051b850101111561114157600080fd5b9250929050565b6000806000806040858703121561115e57600080fd5b843567ffffffffffffffff8082111561117657600080fd5b611182888389016110fc565b9096509450602087013591508082111561119b57600080fd5b506111a8878288016110fc565b95989497509550505050565b600082825180855260208086019550808260051b84010181860160005b848110156111ff57601f198684030189526111ed83835161108a565b988401989250908301906001016111d1565b5090979650505050505050565b82815260406020820152600061122560408301846111b4565b949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561126e5783516001600160a01b031683529284019291840191600101611249565b50909695505050505050565b6000806020838503121561128d57600080fd5b823567ffffffffffffffff808211156112a557600080fd5b818501915085601f8301126112b957600080fd5b8135818111156112c857600080fd5b8660208285010111156112da57600080fd5b60209290920196919550909350505050565b60208152600061108360208301846111b4565b600181811c9082168061131357607f821691505b602082108103610c4f57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561135c5761135c611333565b92915050565b808202811582820484141761135c5761135c611333565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113a657600080fd5b83018035915067ffffffffffffffff8211156113c157600080fd5b60200191503681900382131561114157600080fd5b634e487b7160e01b600052604160045260246000fd5b601f821115610adc57600081815260208120601f850160051c810160208610156114135750805b601f850160051c820191505b818110156114325782815560010161141f565b505050505050565b67ffffffffffffffff831115611452576114526113d6565b6114668361146083546112ff565b836113ec565b6000601f84116001811461149a57600085156114825750838201355b600019600387901b1c1916600186901b1783556114f4565b600083815260209020601f19861690835b828110156114cb57868501358255602094850194600190920191016114ab565b50868210156114e85760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60006001820161150d5761150d611333565b506001019056fea2646970667358221220fa05377607ecc6548d8101a54019d147738c74cac6c9434b650cbf8f1260a61f64736f6c63430008120033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122044a029635051ab03c46b7869f8fa93d82f221e16634fc6955c11862d454338d164736f6c63430008120033","sourceMap":"719:16101:100:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13929:124;;;;;;;;;;-1:-1:-1;14025:21:100;;13929:124;;;160:25:148;;;148:2;133:18;13929:124:100;;;;;;;;12501:308;;;;;;;;;;-1:-1:-1;12501:308:100;;;;;:::i;:::-;;:::i;:::-;;9832:2097;;;;;;;;;;-1:-1:-1;9832:2097:100;;;;;:::i;:::-;;:::i;4951:788::-;;;;;;;;;;-1:-1:-1;4951:788:100;;;;;:::i;:::-;;:::i;3408:195:57:-;;;;;;;;;;-1:-1:-1;3408:195:57;;;;;:::i;:::-;;:::i;14662:189:100:-;;;;;;;;;;-1:-1:-1;14662:189:100;;;;;:::i;:::-;;:::i;:::-;;;;1350:25:148;;;1406:2;1391:18;;1384:34;;;;1323:18;14662:189:100;1180:244:148;14857:145:100;;;;;;;;;;-1:-1:-1;14857:145:100;;;;;:::i;:::-;14944:7;14970:25;;;:13;:25;;;;;;-1:-1:-1;;;;;14970:25:100;;14857:145;;;;-1:-1:-1;;;;;1778:55:148;;;1760:74;;1748:2;1733:18;14857:145:100;1614:226:148;14428:228:100;;;;;;;;;;-1:-1:-1;14428:228:100;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3922:220:57:-;;;;;;:::i;:::-;;:::i;15008:92:100:-;;;;;;;;;;-1:-1:-1;15082:11:100;;15008:92;;3027:131:57;;;;;;;;;;;;;:::i;2085:101:51:-;;;;;;;;;;;;;:::i;13826:97:100:-;;;;;;;;;;-1:-1:-1;13900:10:100;:16;13826:97;;1462:85:51;;;;;;;;;;-1:-1:-1;1534:6:51;;-1:-1:-1;;;;;1534:6:51;1462:85;;12165:330:100;;;;;;;;;;-1:-1:-1;12165:330:100;;;;;:::i;:::-;;:::i;13670:150::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;15192:451::-;;;;;;;;;;-1:-1:-1;15192:451:100;;;;;:::i;:::-;;:::i;:::-;;;7294:14:148;;7287:22;7269:41;;7257:2;7242:18;15192:451:100;7129:187:148;14059:148:100;;;;;;;;;;-1:-1:-1;14059:148:100;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;12815:849::-;;;;;;;;;;-1:-1:-1;13295:7:100;:35;13344:30;;13388:37;;13439:36;;13489:31;;13534:27;;13575:30;;13619:28;;12815:849;;;-1:-1:-1;;;;;13295:35:100;;;11301:34:148;;13344:30:100;;;;11366:2:148;11351:18;;11344:43;11403:18;;;11396:34;;;;11461:2;11446:18;;11439:34;;;;11504:3;11489:19;;11482:35;11548:3;11533:19;;11526:35;11592:3;11577:19;;11570:35;11636:3;11621:19;;11614:35;11227:3;11212:19;12815:849:100;10897:758:148;5745:4081:100;;;;;;;;;;-1:-1:-1;5745:4081:100;;;;;:::i;:::-;;:::i;4439:506::-;;;;;;;;;;-1:-1:-1;4439:506:100;;;;;:::i;:::-;;:::i;3154:1218::-;;;;;;;;;;-1:-1:-1;3154:1218:100;;;;;:::i;:::-;;:::i;2335:198:51:-;;;;;;;;;;-1:-1:-1;2335:198:51;;;;;:::i;:::-;;:::i;11935:224:100:-;;;;;;;;;;-1:-1:-1;11935:224:100;;;;;:::i;:::-;;:::i;14213:209::-;;;;;;;;;;-1:-1:-1;14213:209:100;;;;;:::i;:::-;14303:7;14339:29;;;:17;:29;;;;;:39;;;;:17;14380:34;;;;14339:39;;14213:209;2834:127;;;;;;;;;;-1:-1:-1;2834:127:100;;;;;:::i;:::-;;:::i;12501:308::-;12623:7;:35;-1:-1:-1;;;;;12623:35:100;12609:10;:49;12605:110;;12681:23;;-1:-1:-1;;;12681:23:100;;;;;;;;;;;12605:110;12733:30;;12724:78;;-1:-1:-1;;;12724:78:100;;-1:-1:-1;;;;;14007:55:148;;;12724:78:100;;;13989:74:148;14079:18;;;14072:34;;;12733:30:100;;;;12724:56;;13962:18:148;;12724:78:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12501:308;;:::o;9832:2097::-;9955:21;;9941:35;;9937:98;;9999:25;;-1:-1:-1;;;9999:25:100;;;;;160::148;;;133:18;;9999:25:100;;;;;;;;9937:98;10093:58;;-1:-1:-1;;;10093:58:100;;:10;:58;;;14356:25:148;14397:18;;;14390:34;;;10140:10:100;14440:18:148;;;14433:83;10093:34:100;;;;14329:18:148;;10093:58:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:64;10089:140;;10180:38;;-1:-1:-1;;;10180:38:100;;;;;14889:25:148;;;10207:10:100;14930:18:148;;;14923:83;14862:18;;10180:38:100;14715:297:148;10089:140:100;10272:15;10290:29;;;:17;:29;;;;;10347:7;;;;10333:21;;10329:105;;10415:7;;;;10377:46;;-1:-1:-1;;;10377:46:100;;;;;15219:25:148;;;15260:18;;;15253:34;;;15303:18;;;15296:34;;;;15192:18;;10377:46:100;15017:319:148;10329:105:100;10523:1;10486:25;;;:13;:25;;;;;;-1:-1:-1;;;;;10486:25:100;10482:108;;10548:31;;-1:-1:-1;;;10548:31:100;;;;;160:25:148;;;133:18;;10548:31:100;14:177:148;10482:108:100;10647:24;10687:25;;;:13;:25;;;;;;;;;;10727:21;;-1:-1:-1;;;10727:21:100;;;;-1:-1:-1;;;;;10687:25:100;;;;;;10727:19;;:21;;;;;;;;;;10687:25;10727:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:27;;-1:-1:-1;;10727:27:100;10723:118;;10796:10;10808:11;-1:-1:-1;;;;;10808:19:100;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10777:53;;-1:-1:-1;;;10777:53:100;;;;;15790:25:148;;;;-1:-1:-1;15851:21:148;15831:18;;;15824:49;15763:18;;10777:53:100;15622:257:148;10723:118:100;10881:11;-1:-1:-1;;;;;10881:24:100;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10983:1:100;10947:25;;;:13;:25;;;;;:38;;-1:-1:-1;;;;;;10947:38:100;;;-1:-1:-1;11036:36:100;;;;;;11031:638;;11234:11;;11184:62;;-1:-1:-1;;;11184:62:100;;:10;:62;;;15219:25:148;15260:18;;;15253:34;;;15303:18;;;15296:34;;;;11089:33:100;;;;11184:37;;;;15192:18:148;;11184:62:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11184:62:100;;;;;;;;;;;;:::i;:::-;11088:158;;;;11266:9;11261:248;11285:16;:23;11281:1;:27;11261:248;;;11347:7;:35;11415:19;;-1:-1:-1;;;;;11347:35:100;;;;11333:60;;11415:16;;11432:1;;11415:19;;;;;;:::i;:::-;;;;;;;;;;;11436:37;;11333:161;;-1:-1:-1;;;;;;11333:161:100;;;;;;;-1:-1:-1;;;;;18627:55:148;;;11333:161:100;;;18609:74:148;18699:18;;;18692:34;11475:1:100;18742:18:148;;;18735:34;18582:18;;11333:161:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11310:3;;;;;:::i;:::-;;;;11261:248;;;;11527:9;11522:137;11546:23;:30;11542:1;:34;11522:137;;;11601:43;11617:23;11641:1;11617:26;;;;;;;;:::i;:::-;;;;;;;11601:15;:43::i;:::-;11578:3;;;;:::i;:::-;;;;11522:137;;;;11074:595;;11031:638;11753:16;;;11767:1;11753:16;;;;;;;;;11722:28;;11753:16;;;;;;;;;;;-1:-1:-1;11753:16:100;11722:47;;11796:10;11779:11;11791:1;11779:14;;;;;;;;:::i;:::-;-1:-1:-1;;;;;11779:27:100;;;:14;;;;;;;;;:27;11830:7;:35;11893:28;;11816:106;;-1:-1:-1;;;11816:106:100;;11830:35;;;;;11816:60;;:106;;11877:11;;11830:35;;11893:28;;11816:106;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9927:2002;;;9832:2097;;:::o;4951:788::-;5052:7;:35;-1:-1:-1;;;;;5052:35:100;5038:10;:49;5034:110;;5110:23;;-1:-1:-1;;;5110:23:100;;;;;;;;;;;5034:110;5196:58;;-1:-1:-1;;;5196:58:100;;:10;:58;;;14889:25:148;-1:-1:-1;;;;;14950:55:148;;14930:18;;;14923:83;5155:17:100;;;;5196:43;;;;14862:18:148;;5196:58:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5154:100;;;;5269:10;-1:-1:-1;;5269:16:100;5265:468;;5351:1;5305:34;;;:13;:34;;;;;;-1:-1:-1;;;;;5305:34:100;:48;5301:121;;5380:27;;-1:-1:-1;;;5380:27:100;;;;;;;;;;;5301:121;5559:11;;5495:76;;-1:-1:-1;;;5495:76:100;;:10;:76;;;20323:25:148;20364:18;;;20357:34;;;20407:18;;;20400:34;;;20450:18;;;20443:34;;;;5436:40:100;;5495:20;;;;20295:19:148;;5495:76:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5495:76:100;;;;;;;;;;;;:::i;:::-;5436:135;;5591:9;5586:137;5610:23;:30;5606:1;:34;5586:137;;;5665:43;5681:23;5705:1;5681:26;;;;;;;;:::i;5665:43::-;5642:3;;;;:::i;:::-;;;;5586:137;;;;5287:446;5265:468;5024:715;;4951:788;:::o;3408:195:57:-;-1:-1:-1;;;;;1764:6:57;1747:23;1755:4;1747:23;1739:80;;;;-1:-1:-1;;;1739:80:57;;;;;;;:::i;:::-;1861:6;-1:-1:-1;;;;;1837:30:57;:20;-1:-1:-1;;;;;;;;;;;1557:65:54;-1:-1:-1;;;;;1557:65:54;;1478:151;1837:20:57;-1:-1:-1;;;;;1837:30:57;;1829:87;;;;-1:-1:-1;;;1829:87:57;;;;;;;:::i;:::-;3489:36:::1;3507:17;3489;:36::i;:::-;3576:12;::::0;;3586:1:::1;3576:12:::0;;;::::1;::::0;::::1;::::0;;;3535:61:::1;::::0;3557:17;;3576:12;3535:21:::1;:61::i;:::-;3408:195:::0;:::o;14662:189:100:-;14788:56;;-1:-1:-1;;;14788:56:100;;:10;:56;;;14889:25:148;-1:-1:-1;;;;;14950:55:148;;14930:18;;;14923:83;14755:6:100;;;;14788:43;;;;14862:18:148;;14788:56:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;14781:63;;;;14662:189;;;:::o;14428:228::-;14563:13;;:::i;:::-;14599:29;;;;:17;:29;;;;;:37;;:50;;14637:11;;14599:50;;;;;;:::i;:::-;;;;;;;;;;14592:57;;;;;;;;14599:50;;;;;;;14592:57;;-1:-1:-1;;;;;14592:57:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14428:228;;;;;:::o;3922:220:57:-;-1:-1:-1;;;;;1764:6:57;1747:23;1755:4;1747:23;1739:80;;;;-1:-1:-1;;;1739:80:57;;;;;;;:::i;:::-;1861:6;-1:-1:-1;;;;;1837:30:57;:20;-1:-1:-1;;;;;;;;;;;1557:65:54;-1:-1:-1;;;;;1557:65:54;;1478:151;1837:20:57;-1:-1:-1;;;;;1837:30:57;;1829:87;;;;-1:-1:-1;;;1829:87:57;;;;;;;:::i;:::-;4037:36:::1;4055:17;4037;:36::i;:::-;4083:52;4105:17;4124:4;4130;4083:21;:52::i;:::-;3922:220:::0;;:::o;3027:131::-;3105:7;2190:4;-1:-1:-1;;;;;2199:6:57;2182:23;;2174:92;;;;-1:-1:-1;;;2174:92:57;;21884:2:148;2174:92:57;;;21866:21:148;21923:2;21903:18;;;21896:30;21962:34;21942:18;;;21935:62;22033:26;22013:18;;;22006:54;22077:19;;2174:92:57;21682:420:148;2174:92:57;-1:-1:-1;;;;;;;;;;;;3027:131:57;:::o;2085:101:51:-;1355:13;:11;:13::i;:::-;2149:30:::1;2176:1;2149:18;:30::i;:::-;2085:101::o:0;12165:330:100:-;12306:30;;-1:-1:-1;;;;;12306:30:100;12292:10;:44;12288:100;;12359:18;;-1:-1:-1;;;12359:18:100;;;;;;;;;;;12288:100;12412:7;:35;12398:90;;-1:-1:-1;;;12398:90:100;;-1:-1:-1;;;;;12412:35:100;;;;12398:60;;:90;;12459:5;;12466:9;;12477:10;;12398:90;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12165:330;;;:::o;13670:150::-;13780:33;;-1:-1:-1;;;13780:33:100;;:10;:33;;;160:25:148;13745:16:100;;13780:31;;;;133:18:148;;13780:33:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;13780:33:100;;;;;;;;;;;;:::i;:::-;13773:40;;13670:150;:::o;15192:451::-;15342:4;15379:29;;;:17;:29;;;;;;;;15362:46;;;;;;;;;;;;;;;;;;;15379:17;15362:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15342:4;;15362:46;;;;;;;;;;15342:4;;15362:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15362:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15362:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15362:46:100;;;;;;;;;;;;;;;;-1:-1:-1;;;15362:46:100;;;-1:-1:-1;;15362:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15362:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15362:46:100;;;-1:-1:-1;15362:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15423:9;15418:197;15442:1;:9;;;:16;15438:1;:20;15418:197;;;15513:13;-1:-1:-1;;;;;15483:43:100;:1;:9;;;15493:1;15483:12;;;;;;;;:::i;:::-;;;;;;;:26;;;-1:-1:-1;;;;;15483:43:100;;15479:126;;15553:1;:9;;;15563:1;15553:12;;;;;;;;:::i;:::-;;;;;;;:29;;;15583:1;15553:32;;;;;;;:::i;:::-;;;;;15589:1;15553:37;;15546:44;;;;;;15479:126;15460:3;;;;:::i;:::-;;;;15418:197;;;-1:-1:-1;15631:5:100;;15192:451;-1:-1:-1;;;;15192:451:100:o;14059:148::-;14140:12;;:::i;:::-;14171:29;;;;:17;:29;;;;;;;;14164:36;;;;;;;;;;;;;;;;;;;14171:17;14164:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14171:29;;14164:36;;;;;;;;14171:29;14164:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14164:36:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14164:36:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14164:36:100;;;;;;;;;;;;;;;;-1:-1:-1;;;14164:36:100;;;-1:-1:-1;;14164:36:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14164:36:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;14164:36:100;;;-1:-1:-1;14164:36:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14059:148;;;:::o;5745:4081::-;5861:21;;5840:17;;:42;5836:112;;5919:17;;5905:32;;-1:-1:-1;;;5905:32:100;;;;;160:25:148;;;;133:18;;5905:32:100;14:177:148;5836:112:100;6014:17;;6044:1;6000:32;;;:13;:32;;;;;;-1:-1:-1;;;;;6000:32:100;5996:122;;6089:17;;6069:38;;-1:-1:-1;;;6069:38:100;;;;;160:25:148;;;;133:18;;6069:38:100;14:177:148;5996:122:100;6225:17;;6171:24;6211:32;;;:13;:32;;;;;;;;;;6258:21;;-1:-1:-1;;;6258:21:100;;;;-1:-1:-1;;;;;6211:32:100;;;;;;6258:19;;:21;;;;;;;;;;6211:32;6258:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:27;;;6254:100;;6325:17;;6308:35;;-1:-1:-1;;;6308:35:100;;;;;160:25:148;;;;133:18;;6308:35:100;14:177:148;6254:100:100;6498:17;;6462:15;6480:36;;;:17;:36;;;;;;;;6551:7;;;;6530:17;;;;6480:36;;6530:28;6526:126;;6595:17;;6614;;;;6633:7;;;;6581:60;;-1:-1:-1;;;6581:60:100;;;;;15219:25:148;;;;15260:18;;;15253:34;;;;15303:18;;;15296:34;15192:18;;6581:60:100;15017:319:148;6526:126:100;6701:17;;6666:65;;-1:-1:-1;;;6666:65:100;;:10;:65;;;14356:25:148;14397:18;;;14390:34;;;;6720:10:100;14440:18:148;;;14433:83;6666:34:100;;;;14329:18:148;;6666:65:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;6662:154;;6775:17;;6760:45;;-1:-1:-1;;;6760:45:100;;;;;14889:25:148;;;;6794:10:100;14930:18:148;;;14923:83;14862:18;;6760:45:100;14715:297:148;6662:154:100;6921:17;;6898:53;;6940:10;6898:22;:53::i;:::-;6894:149;;;7002:17;;6974:58;;-1:-1:-1;;;6974:58:100;;;;;14889:25:148;;;;7021:10:100;14930:18:148;;;14923:83;14862:18;;6974:58:100;14715:297:148;6894:149:100;7203:23;;;;7180:47;;-1:-1:-1;;;7180:47:100;;7143:34;;7180:3;;:22;;:47;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7242:38;;-1:-1:-1;;;7242:38:100;;7143:84;;-1:-1:-1;7242:3:100;;:20;;:38;;7143:84;;7242:38;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7237:106;;7303:29;;-1:-1:-1;;;7303:29:100;;;;;;;;;;;7237:106;7406:16;;;;;7383:40;;-1:-1:-1;;;7383:40:100;;7353:27;;7383:3;;:22;;:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7438:31;;-1:-1:-1;;;7438:31:100;;7353:70;;-1:-1:-1;7438:3:100;;:20;;:31;;7353:70;;7438:31;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7433:92;;7492:22;;-1:-1:-1;;;7492:22:100;;;;;;;;;;;7433:92;7715:17;;7680:65;;-1:-1:-1;;;7680:65:100;;:10;7662:9;7680:65;;;14356:25:148;;;;14397:18;;;14390:34;;;;7734:10:100;14440:18:148;;;14433:83;7779:16:100;;7662:9;;;7680:34;;;;14329:18:148;;7680:65:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7662:85;;;;;;;;:::i;:::-;;;;;;;;;;;:102;;:133;;;;;;;:::i;:::-;-1:-1:-1;7953:36:100;;;;;;7948:1872;;8061:9;8056:569;8080:6;:24;;;:31;8076:1;:35;8056:569;;;8140:10;:34;;;;8175:6;:17;;;8194:6;:24;;;8219:1;8194:27;;;;;;;;:::i;:::-;;;;;;;8140:82;;;;;;;;;;;;;;;;14356:25:148;;;14412:2;14397:18;;14390:34;;;;-1:-1:-1;;;;;14460:55:148;14455:2;14440:18;;14433:83;14344:2;14329:18;;14117:405;8140:82:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:88;8136:204;;8274:17;;8293:24;;;;:27;;8318:1;;8293:27;;;;;;:::i;:::-;;;;;;;8259:62;;-1:-1:-1;;;8259:62:100;;;;;;;;14889:25:148;;;-1:-1:-1;;;;;14950:55:148;14945:2;14930:18;;14923:83;14877:2;14862:18;;14715:297;8136:204:100;8362:9;8374:5;:1;8378;8374:5;:::i;:::-;8362:17;;8357:254;8385:6;:24;;;:31;8381:1;:35;8357:254;;;8480:6;:24;;;8505:1;8480:27;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;8449:58:100;:6;:24;;;8474:1;8449:27;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;8449:58:100;;8445:148;;8542:28;;-1:-1:-1;;;8542:28:100;;;;;;;;;;;8445:148;8418:3;;;;:::i;:::-;;;;8357:254;;;-1:-1:-1;8113:3:100;;;;:::i;:::-;;;;8056:569;;;-1:-1:-1;8725:174:100;;;;;;;;8768:17;;;;;8725:174;;;;;;;8860:24;;;;8725:174;;;;8958:17;;8919:71;;-1:-1:-1;;;8919:71:100;;8725:174;;8919:38;;;;:71;;:10;;8958:17;8725:174;;8919:71;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8914:351;;9063:74;;;9133:1;9063:74;;;9119:16;;;;;;;;;-1:-1:-1;;9063:74:100;;9119:16;;;;;;;;-1:-1:-1;;;9063:74:100;;;;;;;9156:25;;:28;;9010:127;;-1:-1:-1;9187:10:100;;-1:-1:-1;;9156:28:100;;;;:::i;:::-;-1:-1:-1;;;;;9156:41:100;;;:28;;;;;;;;;;:41;9215:17;;;:35;;;;;;;-1:-1:-1;9215:35:100;;;;;;;;;;;9238:11;;9215:35;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;9215:35:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;9215:35:100;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;8992:273;8914:351;9374:17;;9393:11;;9348:57;;-1:-1:-1;;;9348:57:100;;:10;:57;;;15219:25:148;15260:18;;;15253:34;;;;15303:18;;;15296:34;9280:12:100;;;;9348:25;;;;15192:18:148;;9348:57:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9348:57:100;;;;;;;;;;;;:::i;:::-;9279:126;;;;9424:7;9420:390;;;9535:9;9530:266;9554:17;:24;9550:1;:28;9530:266;;;9621:7;:35;9693:20;;-1:-1:-1;;;;;9621:35:100;;;;9607:60;;9693:17;;9711:1;;9693:20;;;;;;:::i;:::-;;;;;;;;;;;9715:37;;9607:170;;-1:-1:-1;;;;;;9607:170:100;;;;;;;-1:-1:-1;;;;;18627:55:148;;;9607:170:100;;;18609:74:148;18699:18;;;18692:34;9754:1:100;18742:18:148;;;18735:34;18582:18;;9607:170:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9580:3;;;;;:::i;:::-;;;;9530:266;;9420:390;7991:1829;;;5826:4000;;;;5745:4081;:::o;4439:506::-;4557:7;:35;4520:7;;-1:-1:-1;;;;;4557:35:100;4543:10;:49;4539:110;;4615:23;;-1:-1:-1;;;4615:23:100;;;;;;;;;;;4539:110;4759:11;;4724:47;;-1:-1:-1;;;4724:47:100;;:10;:47;;;27234:25:148;-1:-1:-1;;;;;27295:55:148;;27275:18;;;27268:83;27367:18;;;27360:34;;;;4660:18:100;;;;4724:19;;;;27207:18:148;;4724:47:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4724:47:100;;;;;;;;;;;;:::i;:::-;4659:112;;;;4787:9;4782:129;4806:23;:30;4802:1;:34;4782:129;;;4857:43;4873:23;4897:1;4873:26;;;;;;;;:::i;4857:43::-;4838:3;;;;:::i;:::-;;;;4782:129;;;-1:-1:-1;4928:10:100;;4439:506;-1:-1:-1;;;4439:506:100:o;3154:1218::-;1355:13:51;:11;:13::i;:::-;3580:350:100::1;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;3580:350:100;;::::1;::::0;;;;;::::1;;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;3570:7:::1;:360:::0;;-1:-1:-1;;;;;;3570:360:100;;::::1;::::0;;::::1;::::0;;;;;;;::::1;::::0;;::::1;::::0;;;;;;;;;;;;;;3941:86;-1:-1:-1;;;3941:86:100;;:10:::1;3570:360;3941:86:::0;::::1;20323:25:148::0;20364:18;;;20357:34;;;20407:18;;;20400:34;;;20450:18;;;20443:34;;;3941:20:100::1;::::0;::::1;::::0;20295:19:148;;3941:86:100::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;4043:322:100::1;::::0;;-1:-1:-1;;;;;11319:15:148;;;11301:34;;11371:15;;11366:2;11351:18;;11344:43;11403:18;;;11396:34;;;11461:2;11446:18;;11439:34;;;11504:3;11489:19;;11482:35;;;11548:3;11533:19;;11526:35;;;11592:3;11577:19;;11570:35;;;11636:3;11621:19;;11614:35;;;4043:322:100::1;::::0;-1:-1:-1;11227:3:148;11212:19;;-1:-1:-1;4043:322:100::1;;;;;;;3154:1218:::0;;;;;;;;:::o;2335:198:51:-;1355:13;:11;:13::i;:::-;-1:-1:-1;;;;;2423:22:51;::::1;2415:73;;;::::0;-1:-1:-1;;;2415:73:51;;28036:2:148;2415:73:51::1;::::0;::::1;28018:21:148::0;28075:2;28055:18;;;28048:30;28114:34;28094:18;;;28087:62;-1:-1:-1;;;28165:18:148;;;28158:36;28211:19;;2415:73:51::1;27834:402:148::0;2415:73:51::1;2498:28;2517:8;2498:18;:28::i;11935:224:100:-:0;12037:30;;-1:-1:-1;;;;;12037:30:100;12023:10;:44;12019:100;;12090:18;;-1:-1:-1;;;12090:18:100;;;;;;;;;;;12019:100;12128:11;:24;11935:224::o;2834:127::-;3279:19:56;3302:13;;;;;;3301:14;;3347:34;;;;-1:-1:-1;3365:12:56;;3380:1;3365:12;;;;:16;3347:34;3346:108;;;-1:-1:-1;3426:4:56;1713:19:58;:23;;;3387:66:56;;-1:-1:-1;3436:12:56;;;;;:17;3387:66;3325:201;;;;-1:-1:-1;;;3325:201:56;;28443:2:148;3325:201:56;;;28425:21:148;28482:2;28462:18;;;28455:30;28521:34;28501:18;;;28494:62;-1:-1:-1;;;28572:18:148;;;28565:44;28626:19;;3325:201:56;28241:410:148;3325:201:56;3536:12;:16;;-1:-1:-1;;3536:16:56;3551:1;3536:16;;;3562:65;;;;3596:13;:20;;-1:-1:-1;;3596:20:56;;;;;3562:65;2903:11:100::1;:24:::0;;;2938:16:::1;:14;:16::i;:::-;3651:14:56::0;3647:99;;;3697:5;3681:21;;-1:-1:-1;;3681:21:56;;;3721:14;;-1:-1:-1;28808:36:148;;3721:14:56;;28796:2:148;28781:18;3721:14:56;;;;;;;3269:483;2834:127:100;:::o;15708:1110::-;15772:40;:10;15801;15772:28;:40::i;:::-;15823:14;15840:29;;;:17;:29;;;;;;;;15823:46;;;;;;;;;;;;;;;;;;;15840:17;15823:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15840:29;;15823:46;;;;;;;:14;;:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15823:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15823:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15823:46:100;;;;;;;;;;;;;;;;-1:-1:-1;;;15823:46:100;;;-1:-1:-1;;15823:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15823:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15823:46:100;;;-1:-1:-1;15823:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15939:23;16002:1;:11;;;16015:7;:31;;;15986:61;;;;;:::i;:::-;1350:25:148;;;1406:2;1391:18;;1384:34;1338:2;1323:18;15986:61:100;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16057:25:100;;;;:13;:25;;;;;;:48;;-1:-1:-1;;;;;;16057:48:100;-1:-1:-1;;;;;16057:48:100;;;;;16194:6;;;16057:48;;-1:-1:-1;16057:25:100;16180:21;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16180:21:100;;16150:51;;16211:24;16250:1;:6;;;16238:19;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16211:46;;16273:9;16268:338;16292:1;:6;;;16288:1;:10;16268:338;;;16335:1;:9;;;16345:1;16335:12;;;;;;;;:::i;:::-;;;;;;;:26;;;16319:10;16330:1;16319:13;;;;;;;;:::i;:::-;-1:-1:-1;;;;;16319:42:100;;;:13;;;;;;;;;:42;16474:7;:35;16527:9;;;;:12;;16416:25;;16474:35;;;;;16460:66;;16527:9;16537:1;;16527:12;;;;;;:::i;:::-;;;;;;;;;;;:26;16460:94;;-1:-1:-1;;;;;;16460:94:100;;;;;;;-1:-1:-1;;;;;1778:55:148;;;16460:94:100;;;1760:74:148;1733:18;;16460:94:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16460:94:100;;;;;;;;;;;;:::i;:::-;16416:138;;16583:12;16568:9;16578:1;16568:12;;;;;;;;:::i;:::-;;;;;;:27;;;;16305:301;16300:3;;;;;:::i;:::-;;;;16268:338;;;-1:-1:-1;16616:45:100;;-1:-1:-1;;;16616:45:100;;-1:-1:-1;;;;;16616:22:100;;;;;:45;;16639:10;;16651:9;;16616:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16725:1;:7;;;16716:1;:7;;;16698:10;:16;;;16677:134;16734:1;:6;;;16742:1;:11;;;16755:10;16767:12;16789:11;16677:134;;;;;;;;;;:::i;:::-;;;;;;;;15762:1056;;;;15708:1110;:::o;3016:66::-;1355:13:51;:11;:13::i;2841:944:54:-;839:66;3257:59;;;3253:526;;;3332:37;3351:17;3332:18;:37::i;3253:526::-;3433:17;-1:-1:-1;;;;;3404:61:54;;:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3404:63:54;;;;;;;;-1:-1:-1;;3404:63:54;;;;;;;;;;;;:::i;:::-;;;3400:302;;3631:56;;-1:-1:-1;;;3631:56:54;;31471:2:148;3631:56:54;;;31453:21:148;31510:2;31490:18;;;31483:30;31549:34;31529:18;;;31522:62;-1:-1:-1;;;31600:18:148;;;31593:44;31654:19;;3631:56:54;31269:410:148;3400:302:54;-1:-1:-1;;;;;;;;;;;3517:28:54;;3509:82;;;;-1:-1:-1;;;3509:82:54;;31886:2:148;3509:82:54;;;31868:21:148;31925:2;31905:18;;;31898:30;31964:34;31944:18;;;31937:62;-1:-1:-1;;;32015:18:148;;;32008:39;32064:19;;3509:82:54;31684:405:148;3509:82:54;3468:138;3715:53;3733:17;3752:4;3758:9;3715:17;:53::i;1620:130:51:-;1534:6;;-1:-1:-1;;;;;1534:6:51;965:10:59;1683:23:51;1675:68;;;;-1:-1:-1;;;1675:68:51;;32296:2:148;1675:68:51;;;32278:21:148;;;32315:18;;;32308:30;32374:34;32354:18;;;32347:62;32426:18;;1675:68:51;32094:356:148;2687:187:51;2779:6;;;-1:-1:-1;;;;;2795:17:51;;;-1:-1:-1;;;;;;2795:17:51;;;;;;;2827:40;;2779:6;;;2795:17;2779:6;;2827:40;;2760:16;;2827:40;2750:124;2687:187;:::o;1024:95::-;5374:13:56;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:56;;;;;;;:::i;:::-;1086:26:51::1;:24;:26::i;8453:442:130:-:0;8548:17;;:9;:15;:17;;;:::i;:::-;;;;-1:-1:-1;;8575:27:130;8605:28;;;:16;;;:28;;;;;8643:7;;;:9;;8605:28;;8643:9;;;:::i;:::-;;;;-1:-1:-1;;8662:36:130;;;:44;;-1:-1:-1;;8662:44:130;;;8717:19;8724:12;;;8701:5;8717:19;:::i;:::-;8746:24;8753:17;;;;8746:24;:::i;:::-;8786:9;8781:108;8805:9;;;:16;8801:20;;8781:108;;;8849:1;:9;;8859:1;8849:12;;;;;;;;:::i;:::-;;;;;;;;;;;:29;;;8842:36;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;8842:36:130;8823:3;;;;:::i;:::-;;;;8781:108;;;;8538:357;8453:442;;:::o;1720:281:54:-;-1:-1:-1;;;;;1713:19:58;;;1793:106:54;;;;-1:-1:-1;;;1793:106:54;;33069:2:148;1793:106:54;;;33051:21:148;33108:2;33088:18;;;33081:30;33147:34;33127:18;;;33120:62;-1:-1:-1;;;33198:18:148;;;33191:43;33251:19;;1793:106:54;32867:409:148;1793:106:54;-1:-1:-1;;;;;;;;;;;1909:85:54;;-1:-1:-1;;;;;;1909:85:54;-1:-1:-1;;;;;1909:85:54;;;;;;;;;;1720:281::o;2393:276::-;2501:29;2512:17;2501:10;:29::i;:::-;2558:1;2544:4;:11;:15;:28;;;;2563:9;2544:28;2540:123;;;2588:64;2628:17;2647:4;2588:39;:64::i;1125:111:51:-;5374:13:56;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:56;;;;;;;:::i;:::-;1197:32:51::1;965:10:59::0;1197:18:51::1;:32::i;2107:152:54:-:0;2173:37;2192:17;2173:18;:37::i;:::-;2225:27;;-1:-1:-1;;;;;2225:27:54;;;;;;;;2107:152;:::o;6685:198:58:-;6768:12;6799:77;6820:6;6828:4;6799:77;;;;;;;;;;;;;;;;;:20;:77::i;:::-;6792:84;6685:198;-1:-1:-1;;;6685:198:58:o;7069:325::-;7210:12;7235;7249:23;7276:6;-1:-1:-1;;;;;7276:19:58;7296:4;7276:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7234:67;;;;7318:69;7345:6;7353:7;7362:10;7374:12;7318:26;:69::i;:::-;7311:76;7069:325;-1:-1:-1;;;;;;7069:325:58:o;7682:628::-;7862:12;7890:7;7886:418;;;7917:10;:17;7938:1;7917:22;7913:286;;-1:-1:-1;;;;;1713:19:58;;;8124:60;;;;-1:-1:-1;;;8124:60:58;;33775:2:148;8124:60:58;;;33757:21:148;33814:2;33794:18;;;33787:30;33853:31;33833:18;;;33826:59;33902:18;;8124:60:58;33573:353:148;8124:60:58;-1:-1:-1;8219:10:58;8212:17;;7886:418;8260:33;8268:10;8280:12;8260:7;:33::i;:::-;7682:628;;;;;;:::o;8832:540::-;8991:17;;:21;8987:379;;9219:10;9213:17;9275:15;9262:10;9258:2;9254:19;9247:44;8987:379;9342:12;9335:20;;-1:-1:-1;;;9335:20:58;;;;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;196:154:148;-1:-1:-1;;;;;275:5:148;271:54;264:5;261:65;251:93;;340:1;337;330:12;355:315;423:6;431;484:2;472:9;463:7;459:23;455:32;452:52;;;500:1;497;490:12;452:52;539:9;526:23;558:31;583:5;558:31;:::i;:::-;608:5;660:2;645:18;;;;632:32;;-1:-1:-1;;;355:315:148:o;675:248::-;743:6;751;804:2;792:9;783:7;779:23;775:32;772:52;;;820:1;817;810:12;772:52;-1:-1:-1;;843:23:148;;;913:2;898:18;;;885:32;;-1:-1:-1;675:248:148:o;928:247::-;987:6;1040:2;1028:9;1019:7;1015:23;1011:32;1008:52;;;1056:1;1053;1046:12;1008:52;1095:9;1082:23;1114:31;1139:5;1114:31;:::i;1429:180::-;1488:6;1541:2;1529:9;1520:7;1516:23;1512:32;1509:52;;;1557:1;1554;1547:12;1509:52;-1:-1:-1;1580:23:148;;1429:180;-1:-1:-1;1429:180:148:o;1845:326::-;1938:5;1961:1;1971:194;1985:4;1982:1;1979:11;1971:194;;;2044:13;;2032:26;;2081:4;2105:12;;;;2140:15;;;;2005:1;1998:9;1971:194;;2176:255;-1:-1:-1;;;;;2258:5:148;2252:12;2248:61;2243:3;2236:74;2356:4;2349:5;2345:16;2339:23;2371:54;2419:4;2414:3;2410:14;2396:12;2371:54;:::i;2436:246::-;2620:3;2605:19;;2633:43;2609:9;2658:6;2633:43;:::i;2687:127::-;2748:10;2743:3;2739:20;2736:1;2729:31;2779:4;2776:1;2769:15;2803:4;2800:1;2793:15;2819:253;2891:2;2885:9;2933:4;2921:17;;2968:18;2953:34;;2989:22;;;2950:62;2947:88;;;3015:18;;:::i;:::-;3051:2;3044:22;2819:253;:::o;3077:275::-;3148:2;3142:9;3213:2;3194:13;;-1:-1:-1;;3190:27:148;3178:40;;3248:18;3233:34;;3269:22;;;3230:62;3227:88;;;3295:18;;:::i;:::-;3331:2;3324:22;3077:275;;-1:-1:-1;3077:275:148:o;3357:186::-;3405:4;3438:18;3430:6;3427:30;3424:56;;;3460:18;;:::i;:::-;-1:-1:-1;3526:2:148;3505:15;-1:-1:-1;;3501:29:148;3532:4;3497:40;;3357:186::o;3548:462::-;3590:5;3643:3;3636:4;3628:6;3624:17;3620:27;3610:55;;3661:1;3658;3651:12;3610:55;3697:6;3684:20;3728:48;3744:31;3772:2;3744:31;:::i;:::-;3728:48;:::i;:::-;3801:2;3792:7;3785:19;3847:3;3840:4;3835:2;3827:6;3823:15;3819:26;3816:35;3813:55;;;3864:1;3861;3854:12;3813:55;3929:2;3922:4;3914:6;3910:17;3903:4;3894:7;3890:18;3877:55;3977:1;3952:16;;;3970:4;3948:27;3941:38;;;;3956:7;3548:462;-1:-1:-1;;;3548:462:148:o;4015:455::-;4092:6;4100;4153:2;4141:9;4132:7;4128:23;4124:32;4121:52;;;4169:1;4166;4159:12;4121:52;4208:9;4195:23;4227:31;4252:5;4227:31;:::i;:::-;4277:5;-1:-1:-1;4333:2:148;4318:18;;4305:32;4360:18;4349:30;;4346:50;;;4392:1;4389;4382:12;4346:50;4415:49;4456:7;4447:6;4436:9;4432:22;4415:49;:::i;:::-;4405:59;;;4015:455;;;;;:::o;4657:183::-;4717:4;4750:18;4742:6;4739:30;4736:56;;;4772:18;;:::i;:::-;-1:-1:-1;4817:1:148;4813:14;4829:4;4809:25;;4657:183::o;4845:737::-;4899:5;4952:3;4945:4;4937:6;4933:17;4929:27;4919:55;;4970:1;4967;4960:12;4919:55;5006:6;4993:20;5032:4;5056:60;5072:43;5112:2;5072:43;:::i;5056:60::-;5150:15;;;5236:1;5232:10;;;;5220:23;;5216:32;;;5181:12;;;;5260:15;;;5257:35;;;5288:1;5285;5278:12;5257:35;5324:2;5316:6;5312:15;5336:217;5352:6;5347:3;5344:15;5336:217;;;5432:3;5419:17;5449:31;5474:5;5449:31;:::i;:::-;5493:18;;5531:12;;;;5369;;5336:217;;;-1:-1:-1;5571:5:148;4845:737;-1:-1:-1;;;;;;4845:737:148:o;5587:484::-;5689:6;5697;5705;5758:2;5746:9;5737:7;5733:23;5729:32;5726:52;;;5774:1;5771;5764:12;5726:52;5814:9;5801:23;5847:18;5839:6;5836:30;5833:50;;;5879:1;5876;5869:12;5833:50;5902:61;5955:7;5946:6;5935:9;5931:22;5902:61;:::i;:::-;5892:71;6010:2;5995:18;;5982:32;;-1:-1:-1;6061:2:148;6046:18;;;6033:32;;5587:484;-1:-1:-1;;;;5587:484:148:o;6076:632::-;6247:2;6299:21;;;6369:13;;6272:18;;;6391:22;;;6218:4;;6247:2;6470:15;;;;6444:2;6429:18;;;6218:4;6513:169;6527:6;6524:1;6521:13;6513:169;;;6588:13;;6576:26;;6657:15;;;;6622:12;;;;6549:1;6542:9;6513:169;;;-1:-1:-1;6699:3:148;;6076:632;-1:-1:-1;;;;;;6076:632:148:o;6713:315::-;6781:6;6789;6842:2;6830:9;6821:7;6817:23;6813:32;6810:52;;;6858:1;6855;6848:12;6810:52;6894:9;6881:23;6871:33;;6954:2;6943:9;6939:18;6926:32;6967:31;6992:5;6967:31;:::i;:::-;7017:5;7007:15;;;6713:315;;;;;:::o;7321:461::-;7380:3;7418:5;7412:12;7445:6;7440:3;7433:19;7471:4;7500:2;7495:3;7491:12;7484:19;;7537:2;7530:5;7526:14;7558:1;7568:189;7582:6;7579:1;7576:13;7568:189;;;7631:44;7671:3;7662:6;7656:13;7631:44;:::i;:::-;7704:4;7695:14;;;;;7732:15;;;;7604:1;7597:9;7568:189;;;-1:-1:-1;7773:3:148;;7321:461;-1:-1:-1;;;;;7321:461:148:o;7787:484::-;7840:3;7878:5;7872:12;7905:6;7900:3;7893:19;7931:4;7960:2;7955:3;7951:12;7944:19;;7997:2;7990:5;7986:14;8018:1;8028:218;8042:6;8039:1;8036:13;8028:218;;;8107:13;;-1:-1:-1;;;;;8103:62:148;8091:75;;8186:12;;;;8221:15;;;;8064:1;8057:9;8028:218;;8276:1294;8340:3;8378:5;8372:12;8405:6;8400:3;8393:19;8431:4;8472:2;8467:3;8463:12;8497:11;8524;8517:18;;8574:6;8571:1;8567:14;8560:5;8556:26;8544:38;;8616:2;8609:5;8605:14;8637:1;8647:897;8661:6;8658:1;8655:13;8647:897;;;8732:5;8726:4;8722:16;8717:3;8710:29;8768:6;8762:13;8798:4;8841:2;8835:9;8870:2;8864:4;8857:16;8900:57;8953:2;8947:4;8943:13;8929:12;8900:57;:::i;:::-;8886:71;;9006:2;9002;8998:11;8992:18;8970:40;;9057:4;9049:6;9045:17;9040:2;9034:4;9030:13;9023:40;9086:4;9124:14;9118:21;9110:6;9103:37;9201:2;9185:14;9181:23;9175:30;9218:57;9271:2;9263:6;9259:15;9243:14;9218:57;:::i;:::-;;9336:2;9320:14;9316:23;9310:30;9288:52;;9379:2;9372:4;9364:6;9360:17;9353:29;9403:61;9460:2;9452:6;9448:15;9432:14;9403:61;:::i;:::-;9522:12;;;;9395:69;-1:-1:-1;;;9487:15:148;;;;-1:-1:-1;;8683:1:148;8676:9;8647:897;;;-1:-1:-1;9560:4:148;;8276:1294;-1:-1:-1;;;;;;;8276:1294:148:o;9575:1317::-;9752:2;9741:9;9734:21;9797:6;9791:13;9786:2;9775:9;9771:18;9764:41;9859:2;9851:6;9847:15;9841:22;9836:2;9825:9;9821:18;9814:50;9918:2;9910:6;9906:15;9900:22;9895:2;9884:9;9880:18;9873:50;9978:2;9970:6;9966:15;9960:22;9954:3;9943:9;9939:19;9932:51;9715:4;10030:3;10022:6;10018:16;10012:23;10072:6;10066:3;10055:9;10051:19;10044:35;10102:69;10166:3;10155:9;10151:19;10137:12;10102:69;:::i;:::-;10088:83;;10220:3;10212:6;10208:16;10202:23;10248:2;10244:7;10316:2;10304:9;10296:6;10292:22;10288:31;10282:3;10271:9;10267:19;10260:60;10343:52;10388:6;10372:14;10343:52;:::i;:::-;10329:66;;10444:3;10436:6;10432:16;10426:23;10404:45;;10514:2;10502:9;10494:6;10490:22;10486:31;10480:3;10469:9;10465:19;10458:60;;10541:63;10597:6;10581:14;10541:63;:::i;:::-;10527:77;;;10653:3;10645:6;10641:16;10635:23;10677:3;10689:51;10736:2;10725:9;10721:18;10705:14;7103:13;7096:21;7084:34;;7033:91;10689:51;10777:15;;10771:22;;-1:-1:-1;10802:61:148;10858:3;10843:19;;10771:22;10802:61;:::i;:::-;-1:-1:-1;10880:6:148;9575:1317;-1:-1:-1;;;9575:1317:148:o;11660:1091::-;11753:6;11806:2;11794:9;11785:7;11781:23;11777:32;11774:52;;;11822:1;11819;11812:12;11774:52;11862:9;11849:23;11891:18;11932:2;11924:6;11921:14;11918:34;;;11948:1;11945;11938:12;11918:34;11971:22;;;;12027:4;12009:16;;;12005:27;12002:47;;;12045:1;12042;12035:12;12002:47;12071:22;;:::i;:::-;12129:2;12116:16;12109:5;12102:31;12186:2;12182;12178:11;12165:25;12160:2;12153:5;12149:14;12142:49;12237:2;12233;12229:11;12216:25;12266:2;12256:8;12253:16;12250:36;;;12282:1;12279;12272:12;12250:36;12318:44;12354:7;12343:8;12339:2;12335:17;12318:44;:::i;:::-;12313:2;12306:5;12302:14;12295:68;;12409:2;12405;12401:11;12388:25;12438:2;12428:8;12425:16;12422:36;;;12454:1;12451;12444:12;12422:36;12490:44;12526:7;12515:8;12511:2;12507:17;12490:44;:::i;:::-;12485:2;12478:5;12474:14;12467:68;;12581:3;12577:2;12573:12;12560:26;12611:2;12601:8;12598:16;12595:36;;;12627:1;12624;12617:12;12595:36;12664:56;12712:7;12701:8;12697:2;12693:17;12664:56;:::i;:::-;12658:3;12647:15;;12640:81;-1:-1:-1;12651:5:148;11660:1091;-1:-1:-1;;;;;11660:1091:148:o;12756:801::-;12878:6;12886;12894;12902;12910;12918;12926;12934;12987:3;12975:9;12966:7;12962:23;12958:33;12955:53;;;13004:1;13001;12994:12;12955:53;13043:9;13030:23;13062:31;13087:5;13062:31;:::i;:::-;13112:5;-1:-1:-1;13169:2:148;13154:18;;13141:32;13182:33;13141:32;13182:33;:::i;:::-;12756:801;;13234:7;;-1:-1:-1;;;;13288:2:148;13273:18;;13260:32;;13339:2;13324:18;;13311:32;;13390:3;13375:19;;13362:33;;-1:-1:-1;13442:3:148;13427:19;;13414:33;;-1:-1:-1;13494:3:148;13479:19;;13466:33;;-1:-1:-1;13546:3:148;13531:19;;;13518:33;;-1:-1:-1;12756:801:148:o;14527:183::-;14596:6;14649:2;14637:9;14628:7;14624:23;14620:32;14617:52;;;14665:1;14662;14655:12;14617:52;-1:-1:-1;14688:16:148;;14527:183;-1:-1:-1;14527:183:148:o;15341:276::-;15408:6;15461:2;15449:9;15440:7;15436:23;15432:32;15429:52;;;15477:1;15474;15467:12;15429:52;15509:9;15503:16;15562:5;15559:1;15548:20;15541:5;15538:31;15528:59;;15583:1;15580;15573:12;16245:734;16310:5;16363:3;16356:4;16348:6;16344:17;16340:27;16330:55;;16381:1;16378;16371:12;16330:55;16410:6;16404:13;16436:4;16460:60;16476:43;16516:2;16476:43;:::i;16460:60::-;16554:15;;;16640:1;16636:10;;;;16624:23;;16620:32;;;16585:12;;;;16664:15;;;16661:35;;;16692:1;16689;16682:12;16661:35;16728:2;16720:6;16716:15;16740:210;16756:6;16751:3;16748:15;16740:210;;;16829:3;16823:10;16846:31;16871:5;16846:31;:::i;:::-;16890:18;;16928:12;;;;16773;;16740:210;;16984:659;17049:5;17102:3;17095:4;17087:6;17083:17;17079:27;17069:55;;17120:1;17117;17110:12;17069:55;17149:6;17143:13;17175:4;17199:60;17215:43;17255:2;17215:43;:::i;17199:60::-;17293:15;;;17379:1;17375:10;;;;17363:23;;17359:32;;;17324:12;;;;17403:15;;;17400:35;;;17431:1;17428;17421:12;17400:35;17467:2;17459:6;17455:15;17479:135;17495:6;17490:3;17487:15;17479:135;;;17561:10;;17549:23;;17592:12;;;;17512;;17479:135;;17648:614;17777:6;17785;17838:2;17826:9;17817:7;17813:23;17809:32;17806:52;;;17854:1;17851;17844:12;17806:52;17887:9;17881:16;17916:18;17957:2;17949:6;17946:14;17943:34;;;17973:1;17970;17963:12;17943:34;17996:72;18060:7;18051:6;18040:9;18036:22;17996:72;:::i;:::-;17986:82;;18114:2;18103:9;18099:18;18093:25;18077:41;;18143:2;18133:8;18130:16;18127:36;;;18159:1;18156;18149:12;18127:36;;18182:74;18248:7;18237:8;18226:9;18222:24;18182:74;:::i;18267:127::-;18328:10;18323:3;18319:20;18316:1;18309:31;18359:4;18356:1;18349:15;18383:4;18380:1;18373:15;18780:127;18841:10;18836:3;18832:20;18829:1;18822:31;18872:4;18869:1;18862:15;18896:4;18893:1;18886:15;18912:135;18951:3;18972:17;;;18969:43;;18992:18;;:::i;:::-;-1:-1:-1;19039:1:148;19028:13;;18912:135::o;19052:411::-;19295:2;19284:9;19277:21;19258:4;19315:56;19367:2;19356:9;19352:18;19344:6;19315:56;:::i;:::-;19402:2;19387:18;;19380:34;;;;-1:-1:-1;19445:2:148;19430:18;19423:34;19307:64;19052:411;-1:-1:-1;19052:411:148:o;19807:243::-;19884:6;19892;19945:2;19933:9;19924:7;19920:23;19916:32;19913:52;;;19961:1;19958;19951:12;19913:52;-1:-1:-1;;19984:16:148;;20040:2;20025:18;;;20019:25;19984:16;;20019:25;;-1:-1:-1;19807:243:148:o;20488:363::-;20583:6;20636:2;20624:9;20615:7;20611:23;20607:32;20604:52;;;20652:1;20649;20642:12;20604:52;20685:9;20679:16;20718:18;20710:6;20707:30;20704:50;;;20750:1;20747;20740:12;20704:50;20773:72;20837:7;20828:6;20817:9;20813:22;20773:72;:::i;20856:408::-;21058:2;21040:21;;;21097:2;21077:18;;;21070:30;21136:34;21131:2;21116:18;;21109:62;-1:-1:-1;;;21202:2:148;21187:18;;21180:42;21254:3;21239:19;;20856:408::o;21269:::-;21471:2;21453:21;;;21510:2;21490:18;;;21483:30;21549:34;21544:2;21529:18;;21522:62;-1:-1:-1;;;21615:2:148;21600:18;;21593:42;21667:3;21652:19;;21269:408::o;22734:250::-;22819:1;22829:113;22843:6;22840:1;22837:13;22829:113;;;22919:11;;;22913:18;22900:11;;;22893:39;22865:2;22858:10;22829:113;;;-1:-1:-1;;22976:1:148;22958:16;;22951:27;22734:250::o;22989:270::-;23030:3;23068:5;23062:12;23095:6;23090:3;23083:19;23111:76;23180:6;23173:4;23168:3;23164:14;23157:4;23150:5;23146:16;23111:76;:::i;:::-;23241:2;23220:15;-1:-1:-1;;23216:29:148;23207:39;;;;23248:4;23203:50;;22989:270;-1:-1:-1;;22989:270:148:o;23264:225::-;23419:2;23408:9;23401:21;23382:4;23439:44;23479:2;23468:9;23464:18;23456:6;23439:44;:::i;23494:765::-;23587:6;23640:3;23628:9;23619:7;23615:23;23611:33;23608:53;;;23657:1;23654;23647:12;23608:53;23706:7;23699:4;23688:9;23684:20;23680:34;23670:62;;23728:1;23725;23718:12;23670:62;23761:2;23755:9;23803:3;23795:6;23791:16;23873:6;23861:10;23858:22;23837:18;23825:10;23822:34;23819:62;23816:88;;;23884:18;;:::i;:::-;23920:2;23913:22;23955:6;23999:3;23984:19;;24015;;;24012:39;;;24047:1;24044;24037:12;24012:39;24071:9;24089:139;24105:6;24100:3;24097:15;24089:139;;;24173:10;;24161:23;;24213:4;24204:14;;;;24122;24089:139;;;-1:-1:-1;24247:6:148;;23494:765;-1:-1:-1;;;;;23494:765:148:o;24606:261::-;24794:3;24779:19;;24807:54;24783:9;24843:6;24807:54;:::i;24872:164::-;24948:13;;24997;;24990:21;24980:32;;24970:60;;25026:1;25023;25016:12;24970:60;24872:164;;;:::o;25041:202::-;25108:6;25161:2;25149:9;25140:7;25136:23;25132:32;25129:52;;;25177:1;25174;25167:12;25129:52;25200:37;25227:9;25200:37;:::i;25248:125::-;25313:9;;;25334:10;;;25331:36;;;25347:18;;:::i;25378:1165::-;25662:6;25651:9;25644:25;25625:4;25688:2;25726:6;25721:2;25710:9;25706:18;25699:34;25769:2;25764;25753:9;25749:18;25742:30;25810:3;25799:9;25795:19;25856:6;25850:13;25845:2;25834:9;25830:18;25823:41;25911:2;25903:6;25899:15;25893:22;25924:70;25989:3;25978:9;25974:19;25960:12;25924:70;:::i;:::-;-1:-1:-1;26043:2:148;26031:15;;26025:22;26084:4;26078:3;26063:19;;26056:33;26138:21;;26168:22;;;;26248:23;;;26289:1;;26221:3;26206:19;;;26299:218;26313:6;26310:1;26307:13;26299:218;;;26378:13;;-1:-1:-1;;;;;26374:62:148;26362:75;;26492:15;;;;26335:1;26328:9;;;;;26457:12;;;;26299:218;;;-1:-1:-1;26534:3:148;25378:1165;-1:-1:-1;;;;;;;;25378:1165:148:o;26548:442::-;26649:6;26657;26710:2;26698:9;26689:7;26685:23;26681:32;26678:52;;;26726:1;26723;26716:12;26678:52;26749:37;26776:9;26749:37;:::i;:::-;26739:47;;26830:2;26819:9;26815:18;26809:25;26857:18;26849:6;26846:30;26843:50;;;26889:1;26886;26879:12;26843:50;26912:72;26976:7;26967:6;26956:9;26952:22;26912:72;:::i;27405:424::-;27509:6;27517;27570:2;27558:9;27549:7;27545:23;27541:32;27538:52;;;27586:1;27583;27576:12;27538:52;27615:9;27609:16;27599:26;;27669:2;27658:9;27654:18;27648:25;27696:18;27688:6;27685:30;27682:50;;;27728:1;27725;27718:12;27682:50;27751:72;27815:7;27806:6;27795:9;27791:22;27751:72;:::i;28855:647::-;28934:6;28987:2;28975:9;28966:7;28962:23;28958:32;28955:52;;;29003:1;29000;28993:12;28955:52;29036:9;29030:16;29069:18;29061:6;29058:30;29055:50;;;29101:1;29098;29091:12;29055:50;29124:22;;29177:4;29169:13;;29165:27;-1:-1:-1;29155:55:148;;29206:1;29203;29196:12;29155:55;29235:2;29229:9;29260:48;29276:31;29304:2;29276:31;:::i;29260:48::-;29331:2;29324:5;29317:17;29371:7;29366:2;29361;29357;29353:11;29349:20;29346:33;29343:53;;;29392:1;29389;29382:12;29343:53;29405:67;29469:2;29464;29457:5;29453:14;29448:2;29444;29440:11;29405:67;:::i;:::-;29491:5;28855:647;-1:-1:-1;;;;;28855:647:148:o;29507:966::-;29782:2;29771:9;29764:21;29745:4;29808:56;29860:2;29849:9;29845:18;29837:6;29808:56;:::i;:::-;29883:2;29933:9;29925:6;29921:22;29916:2;29905:9;29901:18;29894:50;29964:6;29999;29993:13;30030:6;30022;30015:22;30065:2;30057:6;30053:15;30046:22;;30124:2;30114:6;30111:1;30107:14;30099:6;30095:27;30091:36;30162:2;30154:6;30150:15;30183:1;30193:251;30207:6;30204:1;30201:13;30193:251;;;30297:2;30293:7;30284:6;30276;30272:19;30268:33;30263:3;30256:46;30325:39;30357:6;30348;30342:13;30325:39;:::i;:::-;30422:12;;;;30315:49;-1:-1:-1;30387:15:148;;;;30229:1;30222:9;30193:251;;;-1:-1:-1;30461:6:148;;29507:966;-1:-1:-1;;;;;;;;;29507:966:148:o;30478:597::-;30769:6;30758:9;30751:25;30812:6;30807:2;30796:9;30792:18;30785:34;30855:3;30850:2;30839:9;30835:18;30828:31;30732:4;30876:57;30928:3;30917:9;30913:19;30905:6;30876:57;:::i;:::-;30868:65;;30969:6;30964:2;30953:9;30949:18;30942:34;-1:-1:-1;;;;;31017:6:148;31013:55;31007:3;30996:9;30992:19;30985:84;30478:597;;;;;;;;:::o;32455:407::-;32657:2;32639:21;;;32696:2;32676:18;;;32669:30;32735:34;32730:2;32715:18;;32708:62;-1:-1:-1;;;32801:2:148;32786:18;;32779:41;32852:3;32837:19;;32455:407::o;33281:287::-;33410:3;33448:6;33442:13;33464:66;33523:6;33518:3;33511:4;33503:6;33499:17;33464:66;:::i;:::-;33546:16;;;;;33281:287;-1:-1:-1;;33281:287:148:o","linkReferences":{"src/libraries/BLS.sol":{"BLS":[{"start":7188,"length":20},{"start":7314,"length":20},{"start":7477,"length":20},{"start":7603,"length":20}]},"src/libraries/GroupLib.sol":{"GroupLib":[{"start":1789,"length":20},{"start":2506,"length":20},{"start":3159,"length":20},{"start":3374,"length":20},{"start":3821,"length":20},{"start":4689,"length":20},{"start":6966,"length":20},{"start":7790,"length":20},{"start":7974,"length":20},{"start":8492,"length":20},{"start":8882,"length":20},{"start":9299,"length":20},{"start":9626,"length":20}]}},"immutableReferences":{"53306":[{"start":3554,"length":32},{"start":3621,"length":32},{"start":4093,"length":32},{"start":4160,"length":32},{"start":4316,"length":32}]}},"methodIdentifiers":{"addReward(address[],uint256,uint256)":"914eb34d","commitDkg((uint256,uint256,bytes,bytes,address[]))":"e37eb96c","getBelongingGroup(address)":"3b6c00b0","getControllerConfig()":"d11b8e68","getCoordinator(uint256)":"42424d6f","getGroup(uint256)":"ceb60654","getGroupCount()":"06545a93","getGroupEpoch()":"7ee49cfd","getGroupThreshold(uint256)":"f49e0ba9","getLastOutput()":"51a2b9a0","getMember(uint256,uint256)":"4d79a893","getValidGroupIndices()":"b330a0fd","initialize(uint256)":"fe4b84df","isPartialKeyRegistered(uint256,address)":"c2db900b","nodeJoin(address)":"ed157c3f","nodeLeave(address)":"35fe4a3f","nodeWithdrawETH(address,uint256)":"0ad98f6a","owner()":"8da5cb5b","postProcessDkg(uint256,uint256)":"0bf9c5c6","proxiableUUID()":"52d1902d","renounceOwnership()":"715018a6","setControllerConfig(address,address,uint256,uint256,uint256,uint256,uint256,uint256)":"f1d49f6b","setLastOutput(uint256)":"f3df0802","transferOwnership(address)":"f2fde38b","upgradeTo(address)":"3659cfe6","upgradeToAndCall(address,bytes)":"4f1ef286"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotLeaveGroupDuringDkg\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"CoordinatorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"DkgNotInProgress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"int8\",\"name\":\"phase\",\"type\":\"int8\"}],\"name\":\"DkgStillInProgress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicatedDisqualifiedNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputGroupEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentGroupEpoch\",\"type\":\"uint256\"}],\"name\":\"EpochMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"GroupNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPartialPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPublicKey\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"}],\"name\":\"NodeNotInGroup\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"}],\"name\":\"PartialKeyAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SenderNotAdapter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SenderNotNodeRegistry\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"nodeRegistryContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adapterContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"disqualifiedNodePenaltyAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"defaultNumberOfCommitters\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"defaultDkgPhaseDuration\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"groupMaxCapacity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"idealNumberOfGroups\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dkgPostProcessReward\",\"type\":\"uint256\"}],\"name\":\"ControllerConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"globalEpoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"groupEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"members\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assignmentBlockHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"DkgTask\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"nodes\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"ethAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"arpaAmount\",\"type\":\"uint256\"}],\"name\":\"addReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupEpoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"partialPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"disqualifiedNodes\",\"type\":\"address[]\"}],\"internalType\":\"struct IController.CommitDkgParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"commitDkg\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nodeAddress\",\"type\":\"address\"}],\"name\":\"getBelongingGroup\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerConfig\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"nodeRegistryContractAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"adapterContractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"disqualifiedNodePenaltyAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"defaultNumberOfCommitters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"defaultDkgPhaseDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupMaxCapacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idealNumberOfGroups\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dkgPostProcessReward\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"getCoordinator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"getGroup\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[4]\",\"name\":\"partialPublicKey\",\"type\":\"uint256[4]\"}],\"internalType\":\"struct IController.Member[]\",\"name\":\"members\",\"type\":\"tuple[]\"},{\"internalType\":\"address[]\",\"name\":\"committers\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"nodeIdAddress\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"publicKey\",\"type\":\"uint256[4]\"},{\"internalType\":\"address[]\",\"name\":\"disqualifiedNodes\",\"type\":\"address[]\"}],\"internalType\":\"struct IController.CommitResult\",\"name\":\"commitResult\",\"type\":\"tuple\"}],\"internalType\":\"struct IController.CommitCache[]\",\"name\":\"commitCacheList\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isStrictlyMajorityConsensusReached\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"publicKey\",\"type\":\"uint256[4]\"}],\"internalType\":\"struct IController.Group\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGroupCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGroupEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"getGroupThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastOutput\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"memberIndex\",\"type\":\"uint256\"}],\"name\":\"getMember\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[4]\",\"name\":\"partialPublicKey\",\"type\":\"uint256[4]\"}],\"internalType\":\"struct IController.Member\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getValidGroupIndices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lastOutput\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"}],\"name\":\"isPartialKeyRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"}],\"name\":\"nodeJoin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"}],\"name\":\"nodeLeave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"ethAmount\",\"type\":\"uint256\"}],\"name\":\"nodeWithdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupEpoch\",\"type\":\"uint256\"}],\"name\":\"postProcessDkg\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nodeRegistryContractAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"adapterContractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"disqualifiedNodePenaltyAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"defaultNumberOfCommitters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"defaultDkgPhaseDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupMaxCapacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idealNumberOfGroups\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dkgPostProcessReward\",\"type\":\"uint256\"}],\"name\":\"setControllerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lastOutput\",\"type\":\"uint256\"}],\"name\":\"setLastOutput\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is changed.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"getValidGroupIndices()\":{\"returns\":{\"_0\":\"uint256[] List of valid group indexes\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"custom:oz-upgrades-unsafe-allow-reachable\":\"delegatecall\",\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"custom:oz-upgrades-unsafe-allow-reachable\":\"delegatecall\",\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getBelongingGroup(address)\":{\"notice\":\"Get the group index and member index of a given node.\"},\"getValidGroupIndices()\":{\"notice\":\"Get list of all group indexes where group.isStrictlyMajorityConsensusReached == true\"},\"isPartialKeyRegistered(uint256,address)\":{\"notice\":\"Check to see if a group has a partial public key registered for a given node.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/Controller.sol\":\"Controller\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":300},\"remappings\":[\":Randcast-User-Contract/=lib/Randcast-User-Contract/contracts/\",\":Staking-v0.1/=lib/Staking-v0.1/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":fx-portal/=lib/fx-portal/contracts/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x359a1ab89b46b9aba7bcad3fb651924baf4893d15153049b9976b0fc9be1358e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e89863421b4014b96a4b62be76eb3b9f0a8afe9684664a6f389124c0964bfe5c\",\"dweb:/ipfs/Qmbk7xr1irpDuU1WdxXgxELBXxs61rHhCgod7heVcvFx16\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1967Upgradeable.sol\":{\"keccak256\":\"0x47d6e06872b12e72c79d1b5eb55842f860b5fb1207b2317c2358d2766b950a7b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ac55bf6f92fc7b90c6d79d346163a0a02bd5c648c7fede08b20e5da96d4ae2a0\",\"dweb:/ipfs/QmQoSrHhka35iKDK5iyNt8cuXXS5ANXVPjLhfsJjktB8V9\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/interfaces/draft-IERC1822Upgradeable.sol\":{\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://496bd9b3df2455d571018c09f0c6badd29713fdeb907c6aa09d8d28cb603f053\",\"dweb:/ipfs/QmXdJDyYs6WMwMh21dez2BYPxhSUaUYFMDtVNcn2cgFR79\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"keccak256\":\"0x7795808e3899c805254e3ae58074b20f799b466e3f43e057e47bedee5fb771f8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://319853a2a682f3f72411507242669ef5e76e0ad3457be53102439709ee8948f0\",\"dweb:/ipfs/QmRtm4Ese9u4jfxXyuWPXLwzenwFotuQjAWV7rXtZTB1E9\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/proxy/beacon/IBeaconUpgradeable.sol\":{\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4dbfe1a3b3b3fb64294ce41fd2ad362e7b7012208117864f42c1a67620a6d5c1\",\"dweb:/ipfs/QmVMU5tWt7zBQMmf5cpMX8UMHV86T3kFeTxBTBjFqVWfoJ\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e\",\"dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol\":{\"keccak256\":\"0xefb41f5c1a00249b7a99f0782f8c557865605426a3fb6e5fe9ae334293ae4f33\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90def55e5782595aabc13f57780c02d3613e5226f20ce6c1709503a63fdeb58f\",\"dweb:/ipfs/Qmb5vcymmNEZUJMaHmYxnhvGJDEsGMae4YjcHwkA74jy99\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b\",\"dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8b06267c5f80bad727af3e48b1382333d591dad51376399ef2f6b0ee6d58bf95\",\"dweb:/ipfs/QmdU5La1agcQvghnfMpWZGDPz2TUDTCxUwTLKmuMRXBpAx\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/utils/StorageSlotUpgradeable.sol\":{\"keccak256\":\"0x07ac95acad040f1fb1f6120dd0aa5f702db69446e95f82613721879d30de0908\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a9df9de7b5da1d1bd3d4b6c073d0174bc4211db60e794a321c8cb5d4eae34685\",\"dweb:/ipfs/QmWe49zj65jayrCe9jZpoWhYUZ1RiwSxyU2s7SBZnMztVy\"]},\"lib/openzeppelin-contracts/contracts/access/Ownable.sol\":{\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc980984badf3984b6303b377711220e067722bbd6a135b24669ff5069ef9f32\",\"dweb:/ipfs/QmPHXMSXj99XjSVM21YsY6aNtLLjLVXDbyN76J5HQYvvrz\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a367861093b74443b137564d3f3c472f70bcf114739e62059c939f25e315706c\",\"dweb:/ipfs/Qmd7JMpcxD9RuQjK3uM3EzJUgSqdN8vzp8eytEiuwxQJ6h\"]},\"src/Controller.sol\":{\"keccak256\":\"0x56e0b85baa8fd72ab89d2cb395fc0691b34f2793fdca6f4472f1f17570c424dd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://31f57d1ab1e804b7996c12543ec611e617091027b93c8df6e72861b27b1d2c8c\",\"dweb:/ipfs/QmTmoPwHiEx1hDJrxrf6BDdZV2RPcH9WjX6kxuByUKUfto\"]},\"src/Coordinator.sol\":{\"keccak256\":\"0x5e5f89b4d5e0560aad2c620ceacb854ad491dcc21ccdd4ec05b71a1c2aed66e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://92e01c67ccd7fb5d807be058136a48af45e85d641189ce4845ec27d5e279b7eb\",\"dweb:/ipfs/QmXn4zawP5pimL7kypg61ezVY494qQgvwUkqtw766Jck1s\"]},\"src/interfaces/IAdapter.sol\":{\"keccak256\":\"0xceaa9cd449a635bc914340206fff76d90323507f8c474619774d9c57d546476e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://63f0aee724f8341f7fd42e81585450091c50a6fd3d1e110161f35f9c91afd5c4\",\"dweb:/ipfs/QmNjqhTXGgxWzuCcCkGYw9LAxhmPvsGvdjkWCfBA6R4SbT\"]},\"src/interfaces/IController.sol\":{\"keccak256\":\"0x948f60df177a67c7d2ee01f4f2ff7c8c8ac9133ff6c6a66932475f40d72191d4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b91f7a0060bc3b597788f283d98bf03a6480e5a19823d8490655a637e28b2b4a\",\"dweb:/ipfs/QmfVbB9Nbc6PckFpGuoY7WNFYoetiYKTSURMuKHQTHRzmN\"]},\"src/interfaces/IControllerOwner.sol\":{\"keccak256\":\"0x1d846a5103b09de80544a7a5b07a6e81a023c546da86e29e1d138be2b6c6cdfa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bcd24bc1074976e129352760a82eb20408c34d2c6655ec676237175ea26d68ad\",\"dweb:/ipfs/QmSS5pHe1TTYQaES5aiBcWN9f9bzdHtUejvRycPU6ZXHYR\"]},\"src/interfaces/ICoordinator.sol\":{\"keccak256\":\"0xd68859c26756794cd6f8cdcccaef77c4fc0f26747ff08a6f78357ba189ac675b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c0aaa84dc7d7b60e982d66b65d6834e6770ea20232cfa5ce7e310bd659007c6b\",\"dweb:/ipfs/QmTkvK7p5HJMrqNbAYEBwtoyyG6mMM3KHZCbnHrshZEFTy\"]},\"src/interfaces/INodeRegistry.sol\":{\"keccak256\":\"0xe9cf369cc6740a6410ff9d7376fa4a3d0557bde1d7f71594d4dce699748c2986\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4a2136a5128c3e5c4fdafb1a51af9739ec051857e99a60bfdb3d7695e75e4c69\",\"dweb:/ipfs/QmZqMiu8YoyxoyAjeymurtbZ4ULJc3zRqDQAmyZyhrkcev\"]},\"src/interfaces/IRequestTypeBase.sol\":{\"keccak256\":\"0x2deca9aac14fc3d57f9e51a8d2523fd775338ce0fda77706f282f0702bd1187b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fd348830ba48d81bf30d17cff28b4fb72b35be724d2933aa565d5bfd0b65452b\",\"dweb:/ipfs/QmRrTeHSoEdAJABvu96AxhuXJbZcvxiZL6Roxosp53XggY\"]},\"src/interfaces/ISignatureUtils.sol\":{\"keccak256\":\"0xdd987d72d8cdbe1839ffa554c35f5e0b65cad95954044b5528a2f2d565188b26\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://60aeff57e190ce78fbdba148b49fedcbd59576645d91d4d995eaebad95b40388\",\"dweb:/ipfs/QmTSCht7dHR2bjjpuaP7efGbixFUr38NcxxHCih2bzyaSK\"]},\"src/libraries/BLS.sol\":{\"keccak256\":\"0x963cd923ec46eab814aec7ab47d02d4565625132482d0dc5db6424b6e795fbdf\",\"license\":\"LGPL 3.0\",\"urls\":[\"bzz-raw://75330a1732e52f73002115b1bf70232a3b5bddeb528562f77ea0a7484538f1f3\",\"dweb:/ipfs/QmPZKvA2eccQBCSL533UvthZDiybM89VRY29yBuLvKe4kP\"]},\"src/libraries/BN256G2.sol\":{\"keccak256\":\"0x7f86978b2856456f588d13dd0f2a1fa8116810427877742fb39c48ba248efd02\",\"license\":\"LGPL 3.0\",\"urls\":[\"bzz-raw://c223787ec2297ee90add7f1ec0ce19ba224231cb7faa0e935d7e61b3fca9f4f8\",\"dweb:/ipfs/QmUDApHuPsYXoxYr7gGezY1mUR9ZXQ1cPSUhuWuDwrH4bA\"]},\"src/libraries/GroupLib.sol\":{\"keccak256\":\"0xb1378769de3207a7a48245a8703c06eb03aef634c5155a76abdc7dfd57f7c920\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ab62322b260e49881724a83ed6e249a32002648ef8ab30f0d49be97a09d86a0\",\"dweb:/ipfs/QmPpHRdhNjTuk7s9dmacCsycLgV1sWC6zjUNejv1QERaQ4\"]},\"src/utils/Utils.sol\":{\"keccak256\":\"0xe05016ecdcd551da8ca90a10160324daa73b7f23737478bfba40df2ae24476c1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b644c37646f88489512f0003b8c4eee497a25df6e9a8fa02870c6c89c85fbd01\",\"dweb:/ipfs/QmVeNDMUHDy5i7H1fsnBZoGm2g3jizYtxvihwMoi9TMwaK\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.18+commit.87f61d96"},"language":"Solidity","output":{"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"type":"error","name":"CannotLeaveGroupDuringDkg"},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"}],"type":"error","name":"CoordinatorNotFound"},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"}],"type":"error","name":"DkgNotInProgress"},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"},{"internalType":"int8","name":"phase","type":"int8"}],"type":"error","name":"DkgStillInProgress"},{"inputs":[],"type":"error","name":"DuplicatedDisqualifiedNode"},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"},{"internalType":"uint256","name":"inputGroupEpoch","type":"uint256"},{"internalType":"uint256","name":"currentGroupEpoch","type":"uint256"}],"type":"error","name":"EpochMismatch"},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"}],"type":"error","name":"GroupNotExist"},{"inputs":[],"type":"error","name":"InvalidPartialPublicKey"},{"inputs":[],"type":"error","name":"InvalidPublicKey"},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"},{"internalType":"address","name":"nodeIdAddress","type":"address"}],"type":"error","name":"NodeNotInGroup"},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"},{"internalType":"address","name":"nodeIdAddress","type":"address"}],"type":"error","name":"PartialKeyAlreadyRegistered"},{"inputs":[],"type":"error","name":"SenderNotAdapter"},{"inputs":[],"type":"error","name":"SenderNotNodeRegistry"},{"inputs":[{"internalType":"address","name":"previousAdmin","type":"address","indexed":false},{"internalType":"address","name":"newAdmin","type":"address","indexed":false}],"type":"event","name":"AdminChanged","anonymous":false},{"inputs":[{"internalType":"address","name":"beacon","type":"address","indexed":true}],"type":"event","name":"BeaconUpgraded","anonymous":false},{"inputs":[{"internalType":"address","name":"nodeRegistryContractAddress","type":"address","indexed":false},{"internalType":"address","name":"adapterContractAddress","type":"address","indexed":false},{"internalType":"uint256","name":"disqualifiedNodePenaltyAmount","type":"uint256","indexed":false},{"internalType":"uint256","name":"defaultNumberOfCommitters","type":"uint256","indexed":false},{"internalType":"uint256","name":"defaultDkgPhaseDuration","type":"uint256","indexed":false},{"internalType":"uint256","name":"groupMaxCapacity","type":"uint256","indexed":false},{"internalType":"uint256","name":"idealNumberOfGroups","type":"uint256","indexed":false},{"internalType":"uint256","name":"dkgPostProcessReward","type":"uint256","indexed":false}],"type":"event","name":"ControllerConfigSet","anonymous":false},{"inputs":[{"internalType":"uint256","name":"globalEpoch","type":"uint256","indexed":true},{"internalType":"uint256","name":"groupIndex","type":"uint256","indexed":true},{"internalType":"uint256","name":"groupEpoch","type":"uint256","indexed":true},{"internalType":"uint256","name":"size","type":"uint256","indexed":false},{"internalType":"uint256","name":"threshold","type":"uint256","indexed":false},{"internalType":"address[]","name":"members","type":"address[]","indexed":false},{"internalType":"uint256","name":"assignmentBlockHeight","type":"uint256","indexed":false},{"internalType":"address","name":"coordinatorAddress","type":"address","indexed":false}],"type":"event","name":"DkgTask","anonymous":false},{"inputs":[{"internalType":"uint8","name":"version","type":"uint8","indexed":false}],"type":"event","name":"Initialized","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[{"internalType":"address","name":"implementation","type":"address","indexed":true}],"type":"event","name":"Upgraded","anonymous":false},{"inputs":[{"internalType":"address[]","name":"nodes","type":"address[]"},{"internalType":"uint256","name":"ethAmount","type":"uint256"},{"internalType":"uint256","name":"arpaAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"addReward"},{"inputs":[{"internalType":"struct IController.CommitDkgParams","name":"params","type":"tuple","components":[{"internalType":"uint256","name":"groupIndex","type":"uint256"},{"internalType":"uint256","name":"groupEpoch","type":"uint256"},{"internalType":"bytes","name":"publicKey","type":"bytes"},{"internalType":"bytes","name":"partialPublicKey","type":"bytes"},{"internalType":"address[]","name":"disqualifiedNodes","type":"address[]"}]}],"stateMutability":"nonpayable","type":"function","name":"commitDkg"},{"inputs":[{"internalType":"address","name":"nodeAddress","type":"address"}],"stateMutability":"view","type":"function","name":"getBelongingGroup","outputs":[{"internalType":"int256","name":"","type":"int256"},{"internalType":"int256","name":"","type":"int256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getControllerConfig","outputs":[{"internalType":"address","name":"nodeRegistryContractAddress","type":"address"},{"internalType":"address","name":"adapterContractAddress","type":"address"},{"internalType":"uint256","name":"disqualifiedNodePenaltyAmount","type":"uint256"},{"internalType":"uint256","name":"defaultNumberOfCommitters","type":"uint256"},{"internalType":"uint256","name":"defaultDkgPhaseDuration","type":"uint256"},{"internalType":"uint256","name":"groupMaxCapacity","type":"uint256"},{"internalType":"uint256","name":"idealNumberOfGroups","type":"uint256"},{"internalType":"uint256","name":"dkgPostProcessReward","type":"uint256"}]},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"}],"stateMutability":"view","type":"function","name":"getCoordinator","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"}],"stateMutability":"view","type":"function","name":"getGroup","outputs":[{"internalType":"struct IController.Group","name":"","type":"tuple","components":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"struct IController.Member[]","name":"members","type":"tuple[]","components":[{"internalType":"address","name":"nodeIdAddress","type":"address"},{"internalType":"uint256[4]","name":"partialPublicKey","type":"uint256[4]"}]},{"internalType":"address[]","name":"committers","type":"address[]"},{"internalType":"struct IController.CommitCache[]","name":"commitCacheList","type":"tuple[]","components":[{"internalType":"address[]","name":"nodeIdAddress","type":"address[]"},{"internalType":"struct IController.CommitResult","name":"commitResult","type":"tuple","components":[{"internalType":"uint256","name":"groupEpoch","type":"uint256"},{"internalType":"uint256[4]","name":"publicKey","type":"uint256[4]"},{"internalType":"address[]","name":"disqualifiedNodes","type":"address[]"}]}]},{"internalType":"bool","name":"isStrictlyMajorityConsensusReached","type":"bool"},{"internalType":"uint256[4]","name":"publicKey","type":"uint256[4]"}]}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getGroupCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getGroupEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"}],"stateMutability":"view","type":"function","name":"getGroupThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getLastOutput","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"},{"internalType":"uint256","name":"memberIndex","type":"uint256"}],"stateMutability":"view","type":"function","name":"getMember","outputs":[{"internalType":"struct IController.Member","name":"","type":"tuple","components":[{"internalType":"address","name":"nodeIdAddress","type":"address"},{"internalType":"uint256[4]","name":"partialPublicKey","type":"uint256[4]"}]}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getValidGroupIndices","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}]},{"inputs":[{"internalType":"uint256","name":"lastOutput","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"initialize"},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"},{"internalType":"address","name":"nodeIdAddress","type":"address"}],"stateMutability":"view","type":"function","name":"isPartialKeyRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"nodeIdAddress","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"nodeJoin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"nodeIdAddress","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"nodeLeave"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"ethAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"nodeWithdrawETH"},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"uint256","name":"groupIndex","type":"uint256"},{"internalType":"uint256","name":"groupEpoch","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"postProcessDkg"},{"inputs":[],"stateMutability":"view","type":"function","name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"address","name":"nodeRegistryContractAddress","type":"address"},{"internalType":"address","name":"adapterContractAddress","type":"address"},{"internalType":"uint256","name":"disqualifiedNodePenaltyAmount","type":"uint256"},{"internalType":"uint256","name":"defaultNumberOfCommitters","type":"uint256"},{"internalType":"uint256","name":"defaultDkgPhaseDuration","type":"uint256"},{"internalType":"uint256","name":"groupMaxCapacity","type":"uint256"},{"internalType":"uint256","name":"idealNumberOfGroups","type":"uint256"},{"internalType":"uint256","name":"dkgPostProcessReward","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"setControllerConfig"},{"inputs":[{"internalType":"uint256","name":"lastOutput","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"setLastOutput"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"upgradeTo"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"stateMutability":"payable","type":"function","name":"upgradeToAndCall"}],"devdoc":{"kind":"dev","methods":{"constructor":{"custom:oz-upgrades-unsafe-allow":"constructor"},"getValidGroupIndices()":{"returns":{"_0":"uint256[] List of valid group indexes"}},"owner()":{"details":"Returns the address of the current owner."},"proxiableUUID()":{"details":"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"upgradeTo(address)":{"custom:oz-upgrades-unsafe-allow-reachable":"delegatecall","details":"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event."},"upgradeToAndCall(address,bytes)":{"custom:oz-upgrades-unsafe-allow-reachable":"delegatecall","details":"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event."}},"version":1},"userdoc":{"kind":"user","methods":{"getBelongingGroup(address)":{"notice":"Get the group index and member index of a given node."},"getValidGroupIndices()":{"notice":"Get list of all group indexes where group.isStrictlyMajorityConsensusReached == true"},"isPartialKeyRegistered(uint256,address)":{"notice":"Check to see if a group has a partial public key registered for a given node."}},"version":1}},"settings":{"remappings":["Randcast-User-Contract/=lib/Randcast-User-Contract/contracts/","Staking-v0.1/=lib/Staking-v0.1/src/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","fx-portal/=lib/fx-portal/contracts/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/"],"optimizer":{"enabled":true,"runs":300},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/Controller.sol":"Controller"},"libraries":{}},"sources":{"lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol":{"keccak256":"0x359a1ab89b46b9aba7bcad3fb651924baf4893d15153049b9976b0fc9be1358e","urls":["bzz-raw://e89863421b4014b96a4b62be76eb3b9f0a8afe9684664a6f389124c0964bfe5c","dweb:/ipfs/Qmbk7xr1irpDuU1WdxXgxELBXxs61rHhCgod7heVcvFx16"],"license":"MIT"},"lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1967Upgradeable.sol":{"keccak256":"0x47d6e06872b12e72c79d1b5eb55842f860b5fb1207b2317c2358d2766b950a7b","urls":["bzz-raw://ac55bf6f92fc7b90c6d79d346163a0a02bd5c648c7fede08b20e5da96d4ae2a0","dweb:/ipfs/QmQoSrHhka35iKDK5iyNt8cuXXS5ANXVPjLhfsJjktB8V9"],"license":"MIT"},"lib/openzeppelin-contracts-upgradeable/contracts/interfaces/draft-IERC1822Upgradeable.sol":{"keccak256":"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f","urls":["bzz-raw://496bd9b3df2455d571018c09f0c6badd29713fdeb907c6aa09d8d28cb603f053","dweb:/ipfs/QmXdJDyYs6WMwMh21dez2BYPxhSUaUYFMDtVNcn2cgFR79"],"license":"MIT"},"lib/openzeppelin-contracts-upgradeable/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol":{"keccak256":"0x7795808e3899c805254e3ae58074b20f799b466e3f43e057e47bedee5fb771f8","urls":["bzz-raw://319853a2a682f3f72411507242669ef5e76e0ad3457be53102439709ee8948f0","dweb:/ipfs/QmRtm4Ese9u4jfxXyuWPXLwzenwFotuQjAWV7rXtZTB1E9"],"license":"MIT"},"lib/openzeppelin-contracts-upgradeable/contracts/proxy/beacon/IBeaconUpgradeable.sol":{"keccak256":"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908","urls":["bzz-raw://4dbfe1a3b3b3fb64294ce41fd2ad362e7b7012208117864f42c1a67620a6d5c1","dweb:/ipfs/QmVMU5tWt7zBQMmf5cpMX8UMHV86T3kFeTxBTBjFqVWfoJ"],"license":"MIT"},"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol":{"keccak256":"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794","urls":["bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e","dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"],"license":"MIT"},"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol":{"keccak256":"0xefb41f5c1a00249b7a99f0782f8c557865605426a3fb6e5fe9ae334293ae4f33","urls":["bzz-raw://90def55e5782595aabc13f57780c02d3613e5226f20ce6c1709503a63fdeb58f","dweb:/ipfs/Qmb5vcymmNEZUJMaHmYxnhvGJDEsGMae4YjcHwkA74jy99"],"license":"MIT"},"lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol":{"keccak256":"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422","urls":["bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b","dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"],"license":"MIT"},"lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol":{"keccak256":"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef","urls":["bzz-raw://8b06267c5f80bad727af3e48b1382333d591dad51376399ef2f6b0ee6d58bf95","dweb:/ipfs/QmdU5La1agcQvghnfMpWZGDPz2TUDTCxUwTLKmuMRXBpAx"],"license":"MIT"},"lib/openzeppelin-contracts-upgradeable/contracts/utils/StorageSlotUpgradeable.sol":{"keccak256":"0x07ac95acad040f1fb1f6120dd0aa5f702db69446e95f82613721879d30de0908","urls":["bzz-raw://a9df9de7b5da1d1bd3d4b6c073d0174bc4211db60e794a321c8cb5d4eae34685","dweb:/ipfs/QmWe49zj65jayrCe9jZpoWhYUZ1RiwSxyU2s7SBZnMztVy"],"license":"MIT"},"lib/openzeppelin-contracts/contracts/access/Ownable.sol":{"keccak256":"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218","urls":["bzz-raw://fc980984badf3984b6303b377711220e067722bbd6a135b24669ff5069ef9f32","dweb:/ipfs/QmPHXMSXj99XjSVM21YsY6aNtLLjLVXDbyN76J5HQYvvrz"],"license":"MIT"},"lib/openzeppelin-contracts/contracts/utils/Context.sol":{"keccak256":"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439","urls":["bzz-raw://a367861093b74443b137564d3f3c472f70bcf114739e62059c939f25e315706c","dweb:/ipfs/Qmd7JMpcxD9RuQjK3uM3EzJUgSqdN8vzp8eytEiuwxQJ6h"],"license":"MIT"},"src/Controller.sol":{"keccak256":"0x56e0b85baa8fd72ab89d2cb395fc0691b34f2793fdca6f4472f1f17570c424dd","urls":["bzz-raw://31f57d1ab1e804b7996c12543ec611e617091027b93c8df6e72861b27b1d2c8c","dweb:/ipfs/QmTmoPwHiEx1hDJrxrf6BDdZV2RPcH9WjX6kxuByUKUfto"],"license":"MIT"},"src/Coordinator.sol":{"keccak256":"0x5e5f89b4d5e0560aad2c620ceacb854ad491dcc21ccdd4ec05b71a1c2aed66e5","urls":["bzz-raw://92e01c67ccd7fb5d807be058136a48af45e85d641189ce4845ec27d5e279b7eb","dweb:/ipfs/QmXn4zawP5pimL7kypg61ezVY494qQgvwUkqtw766Jck1s"],"license":"MIT"},"src/interfaces/IAdapter.sol":{"keccak256":"0xceaa9cd449a635bc914340206fff76d90323507f8c474619774d9c57d546476e","urls":["bzz-raw://63f0aee724f8341f7fd42e81585450091c50a6fd3d1e110161f35f9c91afd5c4","dweb:/ipfs/QmNjqhTXGgxWzuCcCkGYw9LAxhmPvsGvdjkWCfBA6R4SbT"],"license":"MIT"},"src/interfaces/IController.sol":{"keccak256":"0x948f60df177a67c7d2ee01f4f2ff7c8c8ac9133ff6c6a66932475f40d72191d4","urls":["bzz-raw://b91f7a0060bc3b597788f283d98bf03a6480e5a19823d8490655a637e28b2b4a","dweb:/ipfs/QmfVbB9Nbc6PckFpGuoY7WNFYoetiYKTSURMuKHQTHRzmN"],"license":"MIT"},"src/interfaces/IControllerOwner.sol":{"keccak256":"0x1d846a5103b09de80544a7a5b07a6e81a023c546da86e29e1d138be2b6c6cdfa","urls":["bzz-raw://bcd24bc1074976e129352760a82eb20408c34d2c6655ec676237175ea26d68ad","dweb:/ipfs/QmSS5pHe1TTYQaES5aiBcWN9f9bzdHtUejvRycPU6ZXHYR"],"license":"MIT"},"src/interfaces/ICoordinator.sol":{"keccak256":"0xd68859c26756794cd6f8cdcccaef77c4fc0f26747ff08a6f78357ba189ac675b","urls":["bzz-raw://c0aaa84dc7d7b60e982d66b65d6834e6770ea20232cfa5ce7e310bd659007c6b","dweb:/ipfs/QmTkvK7p5HJMrqNbAYEBwtoyyG6mMM3KHZCbnHrshZEFTy"],"license":"MIT"},"src/interfaces/INodeRegistry.sol":{"keccak256":"0xe9cf369cc6740a6410ff9d7376fa4a3d0557bde1d7f71594d4dce699748c2986","urls":["bzz-raw://4a2136a5128c3e5c4fdafb1a51af9739ec051857e99a60bfdb3d7695e75e4c69","dweb:/ipfs/QmZqMiu8YoyxoyAjeymurtbZ4ULJc3zRqDQAmyZyhrkcev"],"license":"MIT"},"src/interfaces/IRequestTypeBase.sol":{"keccak256":"0x2deca9aac14fc3d57f9e51a8d2523fd775338ce0fda77706f282f0702bd1187b","urls":["bzz-raw://fd348830ba48d81bf30d17cff28b4fb72b35be724d2933aa565d5bfd0b65452b","dweb:/ipfs/QmRrTeHSoEdAJABvu96AxhuXJbZcvxiZL6Roxosp53XggY"],"license":"MIT"},"src/interfaces/ISignatureUtils.sol":{"keccak256":"0xdd987d72d8cdbe1839ffa554c35f5e0b65cad95954044b5528a2f2d565188b26","urls":["bzz-raw://60aeff57e190ce78fbdba148b49fedcbd59576645d91d4d995eaebad95b40388","dweb:/ipfs/QmTSCht7dHR2bjjpuaP7efGbixFUr38NcxxHCih2bzyaSK"],"license":"BUSL-1.1"},"src/libraries/BLS.sol":{"keccak256":"0x963cd923ec46eab814aec7ab47d02d4565625132482d0dc5db6424b6e795fbdf","urls":["bzz-raw://75330a1732e52f73002115b1bf70232a3b5bddeb528562f77ea0a7484538f1f3","dweb:/ipfs/QmPZKvA2eccQBCSL533UvthZDiybM89VRY29yBuLvKe4kP"],"license":"LGPL 3.0"},"src/libraries/BN256G2.sol":{"keccak256":"0x7f86978b2856456f588d13dd0f2a1fa8116810427877742fb39c48ba248efd02","urls":["bzz-raw://c223787ec2297ee90add7f1ec0ce19ba224231cb7faa0e935d7e61b3fca9f4f8","dweb:/ipfs/QmUDApHuPsYXoxYr7gGezY1mUR9ZXQ1cPSUhuWuDwrH4bA"],"license":"LGPL 3.0"},"src/libraries/GroupLib.sol":{"keccak256":"0xb1378769de3207a7a48245a8703c06eb03aef634c5155a76abdc7dfd57f7c920","urls":["bzz-raw://0ab62322b260e49881724a83ed6e249a32002648ef8ab30f0d49be97a09d86a0","dweb:/ipfs/QmPpHRdhNjTuk7s9dmacCsycLgV1sWC6zjUNejv1QERaQ4"],"license":"MIT"},"src/utils/Utils.sol":{"keccak256":"0xe05016ecdcd551da8ca90a10160324daa73b7f23737478bfba40df2ae24476c1","urls":["bzz-raw://b644c37646f88489512f0003b8c4eee497a25df6e9a8fa02870c6c89c85fbd01","dweb:/ipfs/QmVeNDMUHDy5i7H1fsnBZoGm2g3jizYtxvihwMoi9TMwaK"],"license":"MIT"}},"version":1},"ast":{"absolutePath":"src/Controller.sol","id":65745,"exportedSymbols":{"BLS":[71125],"Controller":[65744],"Coordinator":[67636],"GroupLib":[74899],"IAdapter":[69592],"IController":[69955],"IControllerOwner":[70144],"ICoordinator":[70169],"INodeRegistry":[70293],"OwnableUpgradeable":[52751],"UUPSUpgradeable":[53423]},"nodeType":"SourceUnit","src":"32:16789:100","nodes":[{"id":64383,"nodeType":"PragmaDirective","src":"32:24:100","nodes":[],"literals":["solidity","^","0.8",".18"]},{"id":64385,"nodeType":"ImportDirective","src":"58:109:100","nodes":[],"absolutePath":"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol","file":"openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol","nameLocation":"-1:-1:-1","scope":65745,"sourceUnit":53424,"symbolAliases":[{"foreign":{"id":64384,"name":"UUPSUpgradeable","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53423,"src":"66:15:100","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":64387,"nodeType":"ImportDirective","src":"168:110:100","nodes":[],"absolutePath":"lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol","file":"openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol","nameLocation":"-1:-1:-1","scope":65745,"sourceUnit":52752,"symbolAliases":[{"foreign":{"id":64386,"name":"OwnableUpgradeable","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52751,"src":"176:18:100","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":64389,"nodeType":"ImportDirective","src":"279:57:100","nodes":[],"absolutePath":"src/interfaces/IController.sol","file":"./interfaces/IController.sol","nameLocation":"-1:-1:-1","scope":65745,"sourceUnit":69956,"symbolAliases":[{"foreign":{"id":64388,"name":"IController","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":69955,"src":"287:11:100","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":64391,"nodeType":"ImportDirective","src":"337:67:100","nodes":[],"absolutePath":"src/interfaces/IControllerOwner.sol","file":"./interfaces/IControllerOwner.sol","nameLocation":"-1:-1:-1","scope":65745,"sourceUnit":70145,"symbolAliases":[{"foreign":{"id":64390,"name":"IControllerOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70144,"src":"345:16:100","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":64393,"nodeType":"ImportDirective","src":"405:51:100","nodes":[],"absolutePath":"src/interfaces/IAdapter.sol","file":"./interfaces/IAdapter.sol","nameLocation":"-1:-1:-1","scope":65745,"sourceUnit":69593,"symbolAliases":[{"foreign":{"id":64392,"name":"IAdapter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":69592,"src":"413:8:100","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":64395,"nodeType":"ImportDirective","src":"457:59:100","nodes":[],"absolutePath":"src/interfaces/ICoordinator.sol","file":"./interfaces/ICoordinator.sol","nameLocation":"-1:-1:-1","scope":65745,"sourceUnit":70170,"symbolAliases":[{"foreign":{"id":64394,"name":"ICoordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70169,"src":"465:12:100","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":64397,"nodeType":"ImportDirective","src":"517:61:100","nodes":[],"absolutePath":"src/interfaces/INodeRegistry.sol","file":"./interfaces/INodeRegistry.sol","nameLocation":"-1:-1:-1","scope":65745,"sourceUnit":70294,"symbolAliases":[{"foreign":{"id":64396,"name":"INodeRegistry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70293,"src":"525:13:100","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":64399,"nodeType":"ImportDirective","src":"579:40:100","nodes":[],"absolutePath":"src/libraries/BLS.sol","file":"./libraries/BLS.sol","nameLocation":"-1:-1:-1","scope":65745,"sourceUnit":71126,"symbolAliases":[{"foreign":{"id":64398,"name":"BLS","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":71125,"src":"587:3:100","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":64401,"nodeType":"ImportDirective","src":"620:50:100","nodes":[],"absolutePath":"src/libraries/GroupLib.sol","file":"./libraries/GroupLib.sol","nameLocation":"-1:-1:-1","scope":65745,"sourceUnit":74900,"symbolAliases":[{"foreign":{"id":64400,"name":"GroupLib","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74899,"src":"628:8:100","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":64403,"nodeType":"ImportDirective","src":"671:46:100","nodes":[],"absolutePath":"src/Coordinator.sol","file":"./Coordinator.sol","nameLocation":"-1:-1:-1","scope":65745,"sourceUnit":67637,"symbolAliases":[{"foreign":{"id":64402,"name":"Coordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":67636,"src":"679:11:100","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":65744,"nodeType":"ContractDefinition","src":"719:16101:100","nodes":[{"id":64415,"nodeType":"UsingForDirective","src":"815:38:100","nodes":[],"global":false,"libraryName":{"id":64412,"name":"GroupLib","nameLocations":["821:8:100"],"nodeType":"IdentifierPath","referencedDeclaration":74899,"src":"821:8:100"},"typeName":{"id":64414,"nodeType":"UserDefinedTypeName","pathNode":{"id":64413,"name":"GroupLib.GroupData","nameLocations":["834:8:100","843:9:100"],"nodeType":"IdentifierPath","referencedDeclaration":73042,"src":"834:18:100"},"referencedDeclaration":73042,"src":"834:18:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage_ptr","typeString":"struct GroupLib.GroupData"}}},{"id":64418,"nodeType":"VariableDeclaration","src":"886:33:100","nodes":[],"constant":false,"mutability":"mutable","name":"_config","nameLocation":"912:7:100","scope":65744,"stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig"},"typeName":{"id":64417,"nodeType":"UserDefinedTypeName","pathNode":{"id":64416,"name":"ControllerConfig","nameLocations":["886:16:100"],"nodeType":"IdentifierPath","referencedDeclaration":64438,"src":"886:16:100"},"referencedDeclaration":64438,"src":"886:16:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage_ptr","typeString":"struct Controller.ControllerConfig"}},"visibility":"internal"},{"id":64422,"nodeType":"VariableDeclaration","src":"949:50:100","nodes":[],"constant":false,"mutability":"mutable","name":"_coordinators","nameLocation":"986:13:100","scope":65744,"stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_address_$","typeString":"mapping(uint256 => address)"},"typeName":{"id":64421,"keyName":"","keyNameLocation":"-1:-1:-1","keyType":{"id":64419,"name":"uint256","nodeType":"ElementaryTypeName","src":"957:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Mapping","src":"949:27:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_address_$","typeString":"mapping(uint256 => address)"},"valueName":"","valueNameLocation":"-1:-1:-1","valueType":{"id":64420,"name":"address","nodeType":"ElementaryTypeName","src":"968:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}},"visibility":"internal"},{"id":64425,"nodeType":"VariableDeclaration","src":"1074:38:100","nodes":[],"constant":false,"mutability":"mutable","name":"_groupData","nameLocation":"1102:10:100","scope":65744,"stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData"},"typeName":{"id":64424,"nodeType":"UserDefinedTypeName","pathNode":{"id":64423,"name":"GroupLib.GroupData","nameLocations":["1074:8:100","1083:9:100"],"nodeType":"IdentifierPath","referencedDeclaration":73042,"src":"1074:18:100"},"referencedDeclaration":73042,"src":"1074:18:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage_ptr","typeString":"struct GroupLib.GroupData"}},"visibility":"internal"},{"id":64427,"nodeType":"VariableDeclaration","src":"1143:28:100","nodes":[],"constant":false,"mutability":"mutable","name":"_lastOutput","nameLocation":"1160:11:100","scope":65744,"stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64426,"name":"uint256","nodeType":"ElementaryTypeName","src":"1143:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"id":64438,"nodeType":"StructDefinition","src":"1195:242:100","nodes":[],"canonicalName":"Controller.ControllerConfig","members":[{"constant":false,"id":64429,"mutability":"mutable","name":"nodeRegistryContractAddress","nameLocation":"1237:27:100","nodeType":"VariableDeclaration","scope":64438,"src":"1229:35:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64428,"name":"address","nodeType":"ElementaryTypeName","src":"1229:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":64431,"mutability":"mutable","name":"adapterContractAddress","nameLocation":"1282:22:100","nodeType":"VariableDeclaration","scope":64438,"src":"1274:30:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64430,"name":"address","nodeType":"ElementaryTypeName","src":"1274:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":64433,"mutability":"mutable","name":"disqualifiedNodePenaltyAmount","nameLocation":"1322:29:100","nodeType":"VariableDeclaration","scope":64438,"src":"1314:37:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64432,"name":"uint256","nodeType":"ElementaryTypeName","src":"1314:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64435,"mutability":"mutable","name":"defaultDkgPhaseDuration","nameLocation":"1369:23:100","nodeType":"VariableDeclaration","scope":64438,"src":"1361:31:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64434,"name":"uint256","nodeType":"ElementaryTypeName","src":"1361:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64437,"mutability":"mutable","name":"dkgPostProcessReward","nameLocation":"1410:20:100","nodeType":"VariableDeclaration","scope":64438,"src":"1402:28:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64436,"name":"uint256","nodeType":"ElementaryTypeName","src":"1402:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"name":"ControllerConfig","nameLocation":"1202:16:100","scope":65744,"visibility":"public"},{"id":64456,"nodeType":"EventDefinition","src":"1459:357:100","nodes":[],"anonymous":false,"eventSelector":"f95156a904d33c289d45bd80fdb27f108976d7a2de754073eb7506cf618779ad","name":"ControllerConfigSet","nameLocation":"1465:19:100","parameters":{"id":64455,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64440,"indexed":false,"mutability":"mutable","name":"nodeRegistryContractAddress","nameLocation":"1502:27:100","nodeType":"VariableDeclaration","scope":64456,"src":"1494:35:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64439,"name":"address","nodeType":"ElementaryTypeName","src":"1494:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":64442,"indexed":false,"mutability":"mutable","name":"adapterContractAddress","nameLocation":"1547:22:100","nodeType":"VariableDeclaration","scope":64456,"src":"1539:30:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64441,"name":"address","nodeType":"ElementaryTypeName","src":"1539:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":64444,"indexed":false,"mutability":"mutable","name":"disqualifiedNodePenaltyAmount","nameLocation":"1587:29:100","nodeType":"VariableDeclaration","scope":64456,"src":"1579:37:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64443,"name":"uint256","nodeType":"ElementaryTypeName","src":"1579:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64446,"indexed":false,"mutability":"mutable","name":"defaultNumberOfCommitters","nameLocation":"1634:25:100","nodeType":"VariableDeclaration","scope":64456,"src":"1626:33:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64445,"name":"uint256","nodeType":"ElementaryTypeName","src":"1626:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64448,"indexed":false,"mutability":"mutable","name":"defaultDkgPhaseDuration","nameLocation":"1677:23:100","nodeType":"VariableDeclaration","scope":64456,"src":"1669:31:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64447,"name":"uint256","nodeType":"ElementaryTypeName","src":"1669:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64450,"indexed":false,"mutability":"mutable","name":"groupMaxCapacity","nameLocation":"1718:16:100","nodeType":"VariableDeclaration","scope":64456,"src":"1710:24:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64449,"name":"uint256","nodeType":"ElementaryTypeName","src":"1710:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64452,"indexed":false,"mutability":"mutable","name":"idealNumberOfGroups","nameLocation":"1752:19:100","nodeType":"VariableDeclaration","scope":64456,"src":"1744:27:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64451,"name":"uint256","nodeType":"ElementaryTypeName","src":"1744:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64454,"indexed":false,"mutability":"mutable","name":"dkgPostProcessReward","nameLocation":"1789:20:100","nodeType":"VariableDeclaration","scope":64456,"src":"1781:28:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64453,"name":"uint256","nodeType":"ElementaryTypeName","src":"1781:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"1484:331:100"}},{"id":64475,"nodeType":"EventDefinition","src":"1821:280:100","nodes":[],"anonymous":false,"eventSelector":"bbd25d64683f157b2e3544d3d6430e14102db1e49592cf4dcaf827e2ded517ee","name":"DkgTask","nameLocation":"1827:7:100","parameters":{"id":64474,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64458,"indexed":true,"mutability":"mutable","name":"globalEpoch","nameLocation":"1860:11:100","nodeType":"VariableDeclaration","scope":64475,"src":"1844:27:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64457,"name":"uint256","nodeType":"ElementaryTypeName","src":"1844:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64460,"indexed":true,"mutability":"mutable","name":"groupIndex","nameLocation":"1897:10:100","nodeType":"VariableDeclaration","scope":64475,"src":"1881:26:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64459,"name":"uint256","nodeType":"ElementaryTypeName","src":"1881:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64462,"indexed":true,"mutability":"mutable","name":"groupEpoch","nameLocation":"1933:10:100","nodeType":"VariableDeclaration","scope":64475,"src":"1917:26:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64461,"name":"uint256","nodeType":"ElementaryTypeName","src":"1917:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64464,"indexed":false,"mutability":"mutable","name":"size","nameLocation":"1961:4:100","nodeType":"VariableDeclaration","scope":64475,"src":"1953:12:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64463,"name":"uint256","nodeType":"ElementaryTypeName","src":"1953:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64466,"indexed":false,"mutability":"mutable","name":"threshold","nameLocation":"1983:9:100","nodeType":"VariableDeclaration","scope":64475,"src":"1975:17:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64465,"name":"uint256","nodeType":"ElementaryTypeName","src":"1975:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64469,"indexed":false,"mutability":"mutable","name":"members","nameLocation":"2012:7:100","nodeType":"VariableDeclaration","scope":64475,"src":"2002:17:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":64467,"name":"address","nodeType":"ElementaryTypeName","src":"2002:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":64468,"nodeType":"ArrayTypeName","src":"2002:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":64471,"indexed":false,"mutability":"mutable","name":"assignmentBlockHeight","nameLocation":"2037:21:100","nodeType":"VariableDeclaration","scope":64475,"src":"2029:29:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64470,"name":"uint256","nodeType":"ElementaryTypeName","src":"2029:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64473,"indexed":false,"mutability":"mutable","name":"coordinatorAddress","nameLocation":"2076:18:100","nodeType":"VariableDeclaration","scope":64475,"src":"2068:26:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64472,"name":"address","nodeType":"ElementaryTypeName","src":"2068:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"1834:266:100"}},{"id":64479,"nodeType":"ErrorDefinition","src":"2123:40:100","nodes":[],"errorSelector":"feddf96a","name":"GroupNotExist","nameLocation":"2129:13:100","parameters":{"id":64478,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64477,"mutability":"mutable","name":"groupIndex","nameLocation":"2151:10:100","nodeType":"VariableDeclaration","scope":64479,"src":"2143:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64476,"name":"uint256","nodeType":"ElementaryTypeName","src":"2143:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"2142:20:100"}},{"id":64483,"nodeType":"ErrorDefinition","src":"2168:46:100","nodes":[],"errorSelector":"5291bbcf","name":"CoordinatorNotFound","nameLocation":"2174:19:100","parameters":{"id":64482,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64481,"mutability":"mutable","name":"groupIndex","nameLocation":"2202:10:100","nodeType":"VariableDeclaration","scope":64483,"src":"2194:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64480,"name":"uint256","nodeType":"ElementaryTypeName","src":"2194:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"2193:20:100"}},{"id":64487,"nodeType":"ErrorDefinition","src":"2219:43:100","nodes":[],"errorSelector":"43609fe1","name":"DkgNotInProgress","nameLocation":"2225:16:100","parameters":{"id":64486,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64485,"mutability":"mutable","name":"groupIndex","nameLocation":"2250:10:100","nodeType":"VariableDeclaration","scope":64487,"src":"2242:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64484,"name":"uint256","nodeType":"ElementaryTypeName","src":"2242:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"2241:20:100"}},{"id":64493,"nodeType":"ErrorDefinition","src":"2267:57:100","nodes":[],"errorSelector":"f7c06f91","name":"DkgStillInProgress","nameLocation":"2273:18:100","parameters":{"id":64492,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64489,"mutability":"mutable","name":"groupIndex","nameLocation":"2300:10:100","nodeType":"VariableDeclaration","scope":64493,"src":"2292:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64488,"name":"uint256","nodeType":"ElementaryTypeName","src":"2292:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64491,"mutability":"mutable","name":"phase","nameLocation":"2317:5:100","nodeType":"VariableDeclaration","scope":64493,"src":"2312:10:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":64490,"name":"int8","nodeType":"ElementaryTypeName","src":"2312:4:100","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"2291:32:100"}},{"id":64501,"nodeType":"ErrorDefinition","src":"2329:92:100","nodes":[],"errorSelector":"0916c786","name":"EpochMismatch","nameLocation":"2335:13:100","parameters":{"id":64500,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64495,"mutability":"mutable","name":"groupIndex","nameLocation":"2357:10:100","nodeType":"VariableDeclaration","scope":64501,"src":"2349:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64494,"name":"uint256","nodeType":"ElementaryTypeName","src":"2349:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64497,"mutability":"mutable","name":"inputGroupEpoch","nameLocation":"2377:15:100","nodeType":"VariableDeclaration","scope":64501,"src":"2369:23:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64496,"name":"uint256","nodeType":"ElementaryTypeName","src":"2369:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64499,"mutability":"mutable","name":"currentGroupEpoch","nameLocation":"2402:17:100","nodeType":"VariableDeclaration","scope":64501,"src":"2394:25:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64498,"name":"uint256","nodeType":"ElementaryTypeName","src":"2394:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"2348:72:100"}},{"id":64507,"nodeType":"ErrorDefinition","src":"2426:64:100","nodes":[],"errorSelector":"eb51f5f9","name":"NodeNotInGroup","nameLocation":"2432:14:100","parameters":{"id":64506,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64503,"mutability":"mutable","name":"groupIndex","nameLocation":"2455:10:100","nodeType":"VariableDeclaration","scope":64507,"src":"2447:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64502,"name":"uint256","nodeType":"ElementaryTypeName","src":"2447:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64505,"mutability":"mutable","name":"nodeIdAddress","nameLocation":"2475:13:100","nodeType":"VariableDeclaration","scope":64507,"src":"2467:21:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64504,"name":"address","nodeType":"ElementaryTypeName","src":"2467:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"2446:43:100"}},{"id":64513,"nodeType":"ErrorDefinition","src":"2495:77:100","nodes":[],"errorSelector":"b9e50848","name":"PartialKeyAlreadyRegistered","nameLocation":"2501:27:100","parameters":{"id":64512,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64509,"mutability":"mutable","name":"groupIndex","nameLocation":"2537:10:100","nodeType":"VariableDeclaration","scope":64513,"src":"2529:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64508,"name":"uint256","nodeType":"ElementaryTypeName","src":"2529:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64511,"mutability":"mutable","name":"nodeIdAddress","nameLocation":"2557:13:100","nodeType":"VariableDeclaration","scope":64513,"src":"2549:21:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64510,"name":"address","nodeType":"ElementaryTypeName","src":"2549:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"2528:43:100"}},{"id":64515,"nodeType":"ErrorDefinition","src":"2577:25:100","nodes":[],"errorSelector":"469666c5","name":"SenderNotAdapter","nameLocation":"2583:16:100","parameters":{"id":64514,"nodeType":"ParameterList","parameters":[],"src":"2599:2:100"}},{"id":64517,"nodeType":"ErrorDefinition","src":"2607:30:100","nodes":[],"errorSelector":"e2c730d0","name":"SenderNotNodeRegistry","nameLocation":"2613:21:100","parameters":{"id":64516,"nodeType":"ParameterList","parameters":[],"src":"2634:2:100"}},{"id":64519,"nodeType":"ErrorDefinition","src":"2642:35:100","nodes":[],"errorSelector":"42381c95","name":"DuplicatedDisqualifiedNode","nameLocation":"2648:26:100","parameters":{"id":64518,"nodeType":"ParameterList","parameters":[],"src":"2674:2:100"}},{"id":64521,"nodeType":"ErrorDefinition","src":"2682:34:100","nodes":[],"errorSelector":"cccf9bf1","name":"CannotLeaveGroupDuringDkg","nameLocation":"2688:25:100","parameters":{"id":64520,"nodeType":"ParameterList","parameters":[],"src":"2713:2:100"}},{"id":64529,"nodeType":"FunctionDefinition","src":"2775:53:100","nodes":[],"body":{"id":64528,"nodeType":"Block","src":"2789:39:100","nodes":[],"statements":[{"expression":{"arguments":[],"expression":{"argumentTypes":[],"id":64525,"name":"_disableInitializers","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53267,"src":"2799:20:100","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":64526,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"2799:22:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64527,"nodeType":"ExpressionStatement","src":"2799:22:100"}]},"documentation":{"id":64522,"nodeType":"StructuredDocumentation","src":"2722:48:100","text":"@custom:oz-upgrades-unsafe-allow constructor"},"implemented":true,"kind":"constructor","modifiers":[],"name":"","nameLocation":"-1:-1:-1","parameters":{"id":64523,"nodeType":"ParameterList","parameters":[],"src":"2786:2:100"},"returnParameters":{"id":64524,"nodeType":"ParameterList","parameters":[],"src":"2789:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"public"},{"id":64544,"nodeType":"FunctionDefinition","src":"2834:127:100","nodes":[],"body":{"id":64543,"nodeType":"Block","src":"2893:68:100","nodes":[],"statements":[{"expression":{"id":64538,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":64536,"name":"_lastOutput","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64427,"src":"2903:11:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":64537,"name":"lastOutput","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64531,"src":"2917:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2903:24:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":64539,"nodeType":"ExpressionStatement","src":"2903:24:100"},{"expression":{"arguments":[],"expression":{"argumentTypes":[],"id":64540,"name":"__Ownable_init","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52646,"src":"2938:14:100","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":64541,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"2938:16:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64542,"nodeType":"ExpressionStatement","src":"2938:16:100"}]},"baseFunctions":[70143],"functionSelector":"fe4b84df","implemented":true,"kind":"function","modifiers":[{"id":64534,"kind":"modifierInvocation","modifierName":{"id":64533,"name":"initializer","nameLocations":["2881:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":53188,"src":"2881:11:100"},"nodeType":"ModifierInvocation","src":"2881:11:100"}],"name":"initialize","nameLocation":"2843:10:100","parameters":{"id":64532,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64531,"mutability":"mutable","name":"lastOutput","nameLocation":"2862:10:100","nodeType":"VariableDeclaration","scope":64544,"src":"2854:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64530,"name":"uint256","nodeType":"ElementaryTypeName","src":"2854:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"2853:20:100"},"returnParameters":{"id":64535,"nodeType":"ParameterList","parameters":[],"src":"2893:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"public"},{"id":64553,"nodeType":"FunctionDefinition","src":"3016:66:100","nodes":[],"body":{"id":64552,"nodeType":"Block","src":"3080:2:100","nodes":[],"statements":[]},"baseFunctions":[53417],"implemented":true,"kind":"function","modifiers":[{"id":64550,"kind":"modifierInvocation","modifierName":{"id":64549,"name":"onlyOwner","nameLocations":["3070:9:100"],"nodeType":"IdentifierPath","referencedDeclaration":52665,"src":"3070:9:100"},"nodeType":"ModifierInvocation","src":"3070:9:100"}],"name":"_authorizeUpgrade","nameLocation":"3025:17:100","overrides":{"id":64548,"nodeType":"OverrideSpecifier","overrides":[],"src":"3061:8:100"},"parameters":{"id":64547,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64546,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":64553,"src":"3043:7:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64545,"name":"address","nodeType":"ElementaryTypeName","src":"3043:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"3042:9:100"},"returnParameters":{"id":64551,"nodeType":"ParameterList","parameters":[],"src":"3080:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"internal"},{"id":64606,"nodeType":"FunctionDefinition","src":"3154:1218:100","nodes":[],"body":{"id":64605,"nodeType":"Block","src":"3560:812:100","nodes":[],"statements":[{"expression":{"id":64584,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":64576,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"3570:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"id":64578,"name":"nodeRegistryContractAddress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64555,"src":"3640:27:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":64579,"name":"adapterContractAddress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64557,"src":"3705:22:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":64580,"name":"disqualifiedNodePenaltyAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64559,"src":"3772:29:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":64581,"name":"defaultDkgPhaseDuration","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64563,"src":"3840:23:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":64582,"name":"dkgPostProcessReward","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64569,"src":"3899:20:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":64577,"name":"ControllerConfig","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64438,"src":"3580:16:100","typeDescriptions":{"typeIdentifier":"t_type$_t_struct$_ControllerConfig_$64438_storage_ptr_$","typeString":"type(struct Controller.ControllerConfig storage pointer)"}},"id":64583,"isConstant":false,"isLValue":false,"isPure":false,"kind":"structConstructorCall","lValueRequested":false,"nameLocations":["3611:27:100","3681:22:100","3741:29:100","3815:23:100","3877:20:100"],"names":["nodeRegistryContractAddress","adapterContractAddress","disqualifiedNodePenaltyAmount","defaultDkgPhaseDuration","dkgPostProcessReward"],"nodeType":"FunctionCall","src":"3580:350:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_memory_ptr","typeString":"struct Controller.ControllerConfig memory"}},"src":"3570:360:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":64585,"nodeType":"ExpressionStatement","src":"3570:360:100"},{"expression":{"arguments":[{"id":64589,"name":"idealNumberOfGroups","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64567,"src":"3962:19:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":64590,"name":"groupMaxCapacity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64565,"src":"3983:16:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":64591,"name":"defaultNumberOfCommitters","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64561,"src":"4001:25:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"id":64586,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"3941:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":64588,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"3952:9:100","memberName":"setConfig","nodeType":"MemberAccess","referencedDeclaration":73079,"src":"3941:20:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,uint256,uint256,uint256)"}},"id":64592,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"3941:86:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64593,"nodeType":"ExpressionStatement","src":"3941:86:100"},{"eventCall":{"arguments":[{"id":64595,"name":"nodeRegistryContractAddress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64555,"src":"4076:27:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":64596,"name":"adapterContractAddress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64557,"src":"4117:22:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":64597,"name":"disqualifiedNodePenaltyAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64559,"src":"4153:29:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":64598,"name":"defaultNumberOfCommitters","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64561,"src":"4196:25:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":64599,"name":"defaultDkgPhaseDuration","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64563,"src":"4235:23:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":64600,"name":"groupMaxCapacity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64565,"src":"4272:16:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":64601,"name":"idealNumberOfGroups","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64567,"src":"4302:19:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":64602,"name":"dkgPostProcessReward","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64569,"src":"4335:20:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":64594,"name":"ControllerConfigSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64456,"src":"4043:19:100","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256,uint256,uint256,uint256,uint256,uint256)"}},"id":64603,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"4043:322:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64604,"nodeType":"EmitStatement","src":"4038:327:100"}]},"baseFunctions":[70138],"functionSelector":"f1d49f6b","implemented":true,"kind":"function","modifiers":[{"id":64574,"kind":"modifierInvocation","modifierName":{"id":64573,"name":"onlyOwner","nameLocations":["3550:9:100"],"nodeType":"IdentifierPath","referencedDeclaration":52665,"src":"3550:9:100"},"nodeType":"ModifierInvocation","src":"3550:9:100"}],"name":"setControllerConfig","nameLocation":"3163:19:100","overrides":{"id":64572,"nodeType":"OverrideSpecifier","overrides":[{"id":64571,"name":"IControllerOwner","nameLocations":["3532:16:100"],"nodeType":"IdentifierPath","referencedDeclaration":70144,"src":"3532:16:100"}],"src":"3523:26:100"},"parameters":{"id":64570,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64555,"mutability":"mutable","name":"nodeRegistryContractAddress","nameLocation":"3200:27:100","nodeType":"VariableDeclaration","scope":64606,"src":"3192:35:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64554,"name":"address","nodeType":"ElementaryTypeName","src":"3192:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":64557,"mutability":"mutable","name":"adapterContractAddress","nameLocation":"3245:22:100","nodeType":"VariableDeclaration","scope":64606,"src":"3237:30:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64556,"name":"address","nodeType":"ElementaryTypeName","src":"3237:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":64559,"mutability":"mutable","name":"disqualifiedNodePenaltyAmount","nameLocation":"3285:29:100","nodeType":"VariableDeclaration","scope":64606,"src":"3277:37:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64558,"name":"uint256","nodeType":"ElementaryTypeName","src":"3277:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64561,"mutability":"mutable","name":"defaultNumberOfCommitters","nameLocation":"3332:25:100","nodeType":"VariableDeclaration","scope":64606,"src":"3324:33:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64560,"name":"uint256","nodeType":"ElementaryTypeName","src":"3324:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64563,"mutability":"mutable","name":"defaultDkgPhaseDuration","nameLocation":"3375:23:100","nodeType":"VariableDeclaration","scope":64606,"src":"3367:31:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64562,"name":"uint256","nodeType":"ElementaryTypeName","src":"3367:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64565,"mutability":"mutable","name":"groupMaxCapacity","nameLocation":"3416:16:100","nodeType":"VariableDeclaration","scope":64606,"src":"3408:24:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64564,"name":"uint256","nodeType":"ElementaryTypeName","src":"3408:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64567,"mutability":"mutable","name":"idealNumberOfGroups","nameLocation":"3450:19:100","nodeType":"VariableDeclaration","scope":64606,"src":"3442:27:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64566,"name":"uint256","nodeType":"ElementaryTypeName","src":"3442:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64569,"mutability":"mutable","name":"dkgPostProcessReward","nameLocation":"3487:20:100","nodeType":"VariableDeclaration","scope":64606,"src":"3479:28:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64568,"name":"uint256","nodeType":"ElementaryTypeName","src":"3479:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"3182:331:100"},"returnParameters":{"id":64575,"nodeType":"ParameterList","parameters":[],"src":"3560:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":64658,"nodeType":"FunctionDefinition","src":"4439:506:100","nodes":[],"body":{"id":64657,"nodeType":"Block","src":"4529:416:100","nodes":[],"statements":[{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":64619,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":64615,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"4543:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":64616,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"4547:6:100","memberName":"sender","nodeType":"MemberAccess","src":"4543:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"expression":{"id":64617,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"4557:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":64618,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"4565:27:100","memberName":"nodeRegistryContractAddress","nodeType":"MemberAccess","referencedDeclaration":64429,"src":"4557:35:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"4543:49:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64624,"nodeType":"IfStatement","src":"4539:110:100","trueBody":{"id":64623,"nodeType":"Block","src":"4594:55:100","statements":[{"errorCall":{"arguments":[],"expression":{"argumentTypes":[],"id":64620,"name":"SenderNotNodeRegistry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64517,"src":"4615:21:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$__$returns$__$","typeString":"function () pure"}},"id":64621,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"4615:23:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64622,"nodeType":"RevertStatement","src":"4608:30:100"}]}},{"assignments":[64626,64629],"declarations":[{"constant":false,"id":64626,"mutability":"mutable","name":"groupIndex","nameLocation":"4668:10:100","nodeType":"VariableDeclaration","scope":64657,"src":"4660:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64625,"name":"uint256","nodeType":"ElementaryTypeName","src":"4660:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":64629,"mutability":"mutable","name":"groupIndicesToEmitEvent","nameLocation":"4697:23:100","nodeType":"VariableDeclaration","scope":64657,"src":"4680:40:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":64627,"name":"uint256","nodeType":"ElementaryTypeName","src":"4680:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":64628,"nodeType":"ArrayTypeName","src":"4680:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"visibility":"internal"}],"id":64635,"initialValue":{"arguments":[{"id":64632,"name":"nodeIdAddress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64608,"src":"4744:13:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":64633,"name":"_lastOutput","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64427,"src":"4759:11:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"id":64630,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"4724:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":64631,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"4735:8:100","memberName":"nodeJoin","nodeType":"MemberAccess","referencedDeclaration":73179,"src":"4724:19:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,address,uint256) returns (uint256,uint256[] memory)"}},"id":64634,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"4724:47:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$","typeString":"tuple(uint256,uint256[] memory)"}},"nodeType":"VariableDeclarationStatement","src":"4659:112:100"},{"body":{"id":64653,"nodeType":"Block","src":"4843:68:100","statements":[{"expression":{"arguments":[{"baseExpression":{"id":64648,"name":"groupIndicesToEmitEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64629,"src":"4873:23:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":64650,"indexExpression":{"id":64649,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64637,"src":"4897:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4873:26:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":64647,"name":"_emitGroupEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65743,"src":"4857:15:100","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":64651,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"4857:43:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64652,"nodeType":"ExpressionStatement","src":"4857:43:100"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":64643,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":64640,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64637,"src":"4802:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"id":64641,"name":"groupIndicesToEmitEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64629,"src":"4806:23:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":64642,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"4830:6:100","memberName":"length","nodeType":"MemberAccess","src":"4806:30:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4802:34:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64654,"initializationExpression":{"assignments":[64637],"declarations":[{"constant":false,"id":64637,"mutability":"mutable","name":"i","nameLocation":"4795:1:100","nodeType":"VariableDeclaration","scope":64654,"src":"4787:9:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64636,"name":"uint256","nodeType":"ElementaryTypeName","src":"4787:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":64639,"initialValue":{"hexValue":"30","id":64638,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4799:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"4787:13:100"},"loopExpression":{"expression":{"id":64645,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"4838:3:100","subExpression":{"id":64644,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64637,"src":"4838:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":64646,"nodeType":"ExpressionStatement","src":"4838:3:100"},"nodeType":"ForStatement","src":"4782:129:100"},{"expression":{"id":64655,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64626,"src":"4928:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":64614,"id":64656,"nodeType":"Return","src":"4921:17:100"}]},"baseFunctions":[69819],"functionSelector":"ed157c3f","implemented":true,"kind":"function","modifiers":[],"name":"nodeJoin","nameLocation":"4448:8:100","overrides":{"id":64611,"nodeType":"OverrideSpecifier","overrides":[{"id":64610,"name":"IController","nameLocations":["4498:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"4498:11:100"}],"src":"4489:21:100"},"parameters":{"id":64609,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64608,"mutability":"mutable","name":"nodeIdAddress","nameLocation":"4465:13:100","nodeType":"VariableDeclaration","scope":64658,"src":"4457:21:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64607,"name":"address","nodeType":"ElementaryTypeName","src":"4457:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"4456:23:100"},"returnParameters":{"id":64614,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64613,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":64658,"src":"4520:7:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64612,"name":"uint256","nodeType":"ElementaryTypeName","src":"4520:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"4519:9:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":64744,"nodeType":"FunctionDefinition","src":"4951:788:100","nodes":[],"body":{"id":64743,"nodeType":"Block","src":"5024:715:100","nodes":[],"statements":[{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":64669,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":64665,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"5038:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":64666,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"5042:6:100","memberName":"sender","nodeType":"MemberAccess","src":"5038:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"expression":{"id":64667,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"5052:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":64668,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"5060:27:100","memberName":"nodeRegistryContractAddress","nodeType":"MemberAccess","referencedDeclaration":64429,"src":"5052:35:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"5038:49:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64674,"nodeType":"IfStatement","src":"5034:110:100","trueBody":{"id":64673,"nodeType":"Block","src":"5089:55:100","statements":[{"errorCall":{"arguments":[],"expression":{"argumentTypes":[],"id":64670,"name":"SenderNotNodeRegistry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64517,"src":"5110:21:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$__$returns$__$","typeString":"function () pure"}},"id":64671,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"5110:23:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64672,"nodeType":"RevertStatement","src":"5103:30:100"}]}},{"assignments":[64676,64678],"declarations":[{"constant":false,"id":64676,"mutability":"mutable","name":"groupIndex","nameLocation":"5162:10:100","nodeType":"VariableDeclaration","scope":64743,"src":"5155:17:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":64675,"name":"int256","nodeType":"ElementaryTypeName","src":"5155:6:100","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"visibility":"internal"},{"constant":false,"id":64678,"mutability":"mutable","name":"memberIndex","nameLocation":"5181:11:100","nodeType":"VariableDeclaration","scope":64743,"src":"5174:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":64677,"name":"int256","nodeType":"ElementaryTypeName","src":"5174:6:100","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"visibility":"internal"}],"id":64683,"initialValue":{"arguments":[{"id":64681,"name":"nodeIdAddress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64660,"src":"5240:13:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":64679,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"5196:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":64680,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"5207:32:100","memberName":"getBelongingGroupByMemberAddress","nodeType":"MemberAccess","referencedDeclaration":73904,"src":"5196:43:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_address_$returns$_t_int256_$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,address) view returns (int256,int256)"}},"id":64682,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"5196:58:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"nodeType":"VariableDeclarationStatement","src":"5154:100:100"},{"condition":{"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":64687,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":64684,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64676,"src":"5269:10:100","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"id":64686,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5283:2:100","subExpression":{"hexValue":"31","id":64685,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5284:1:100","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_minus_1_by_1","typeString":"int_const -1"}},"src":"5269:16:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64742,"nodeType":"IfStatement","src":"5265:468:100","trueBody":{"id":64741,"nodeType":"Block","src":"5287:446:100","statements":[{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":64698,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":64688,"name":"_coordinators","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64422,"src":"5305:13:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_address_$","typeString":"mapping(uint256 => address)"}},"id":64693,"indexExpression":{"arguments":[{"id":64691,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64676,"src":"5327:10:100","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":64690,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5319:7:100","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":{"id":64689,"name":"uint256","nodeType":"ElementaryTypeName","src":"5319:7:100","typeDescriptions":{}}},"id":64692,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"5319:19:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5305:34:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"arguments":[{"hexValue":"30","id":64696,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5351:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"}],"id":64695,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5343:7:100","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":64694,"name":"address","nodeType":"ElementaryTypeName","src":"5343:7:100","typeDescriptions":{}}},"id":64697,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"5343:10:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"5305:48:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64703,"nodeType":"IfStatement","src":"5301:121:100","trueBody":{"id":64702,"nodeType":"Block","src":"5355:67:100","statements":[{"errorCall":{"arguments":[],"expression":{"argumentTypes":[],"id":64699,"name":"CannotLeaveGroupDuringDkg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64521,"src":"5380:25:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$__$returns$__$","typeString":"function () pure"}},"id":64700,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"5380:27:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64701,"nodeType":"RevertStatement","src":"5373:34:100"}]}},{"assignments":[64708],"declarations":[{"constant":false,"id":64708,"mutability":"mutable","name":"groupIndicesToEmitEvent","nameLocation":"5453:23:100","nodeType":"VariableDeclaration","scope":64741,"src":"5436:40:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":64706,"name":"uint256","nodeType":"ElementaryTypeName","src":"5436:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":64707,"nodeType":"ArrayTypeName","src":"5436:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"visibility":"internal"}],"id":64721,"initialValue":{"arguments":[{"arguments":[{"id":64713,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64676,"src":"5524:10:100","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":64712,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5516:7:100","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":{"id":64711,"name":"uint256","nodeType":"ElementaryTypeName","src":"5516:7:100","typeDescriptions":{}}},"id":64714,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"5516:19:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"arguments":[{"id":64717,"name":"memberIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64678,"src":"5545:11:100","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":64716,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5537:7:100","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":{"id":64715,"name":"uint256","nodeType":"ElementaryTypeName","src":"5537:7:100","typeDescriptions":{}}},"id":64718,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"5537:20:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":64719,"name":"_lastOutput","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64427,"src":"5559:11:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"id":64709,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"5495:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":64710,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"5506:9:100","memberName":"nodeLeave","nodeType":"MemberAccess","referencedDeclaration":73244,"src":"5495:20:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,uint256,uint256,uint256) returns (uint256[] memory)"}},"id":64720,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"5495:76:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"5436:135:100"},{"body":{"id":64739,"nodeType":"Block","src":"5647:76:100","statements":[{"expression":{"arguments":[{"baseExpression":{"id":64734,"name":"groupIndicesToEmitEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64708,"src":"5681:23:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":64736,"indexExpression":{"id":64735,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64723,"src":"5705:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5681:26:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":64733,"name":"_emitGroupEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65743,"src":"5665:15:100","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":64737,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"5665:43:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64738,"nodeType":"ExpressionStatement","src":"5665:43:100"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":64729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":64726,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64723,"src":"5606:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"id":64727,"name":"groupIndicesToEmitEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64708,"src":"5610:23:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":64728,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"5634:6:100","memberName":"length","nodeType":"MemberAccess","src":"5610:30:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5606:34:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64740,"initializationExpression":{"assignments":[64723],"declarations":[{"constant":false,"id":64723,"mutability":"mutable","name":"i","nameLocation":"5599:1:100","nodeType":"VariableDeclaration","scope":64740,"src":"5591:9:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64722,"name":"uint256","nodeType":"ElementaryTypeName","src":"5591:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":64725,"initialValue":{"hexValue":"30","id":64724,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5603:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"5591:13:100"},"loopExpression":{"expression":{"id":64731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"5642:3:100","subExpression":{"id":64730,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64723,"src":"5642:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":64732,"nodeType":"ExpressionStatement","src":"5642:3:100"},"nodeType":"ForStatement","src":"5586:137:100"}]}}]},"baseFunctions":[69824],"functionSelector":"35fe4a3f","implemented":true,"kind":"function","modifiers":[],"name":"nodeLeave","nameLocation":"4960:9:100","overrides":{"id":64663,"nodeType":"OverrideSpecifier","overrides":[{"id":64662,"name":"IController","nameLocations":["5011:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"5011:11:100"}],"src":"5002:21:100"},"parameters":{"id":64661,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64660,"mutability":"mutable","name":"nodeIdAddress","nameLocation":"4978:13:100","nodeType":"VariableDeclaration","scope":64744,"src":"4970:21:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64659,"name":"address","nodeType":"ElementaryTypeName","src":"4970:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"4969:23:100"},"returnParameters":{"id":64664,"nodeType":"ParameterList","parameters":[],"src":"5024:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":65091,"nodeType":"FunctionDefinition","src":"5745:4081:100","nodes":[],"body":{"id":65090,"nodeType":"Block","src":"5826:4000:100","nodes":[],"statements":[{"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":64756,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":64752,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"5840:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64753,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"5847:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"5840:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"expression":{"id":64754,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"5861:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":64755,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"5872:10:100","memberName":"groupCount","nodeType":"MemberAccess","referencedDeclaration":73030,"src":"5861:21:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5840:42:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64763,"nodeType":"IfStatement","src":"5836:112:100","trueBody":{"id":64762,"nodeType":"Block","src":"5884:64:100","statements":[{"errorCall":{"arguments":[{"expression":{"id":64758,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"5919:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64759,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"5926:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"5919:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":64757,"name":"GroupNotExist","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64479,"src":"5905:13:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$returns$__$","typeString":"function (uint256) pure"}},"id":64760,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"5905:32:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64761,"nodeType":"RevertStatement","src":"5898:39:100"}]}},{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":64772,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":64764,"name":"_coordinators","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64422,"src":"6000:13:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_address_$","typeString":"mapping(uint256 => address)"}},"id":64767,"indexExpression":{"expression":{"id":64765,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6014:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64766,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6021:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"6014:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"6000:32:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"arguments":[{"hexValue":"30","id":64770,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6044:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"}],"id":64769,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6036:7:100","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":64768,"name":"address","nodeType":"ElementaryTypeName","src":"6036:7:100","typeDescriptions":{}}},"id":64771,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"6036:10:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"6000:46:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64779,"nodeType":"IfStatement","src":"5996:122:100","trueBody":{"id":64778,"nodeType":"Block","src":"6048:70:100","statements":[{"errorCall":{"arguments":[{"expression":{"id":64774,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6089:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64775,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6096:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"6089:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":64773,"name":"CoordinatorNotFound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64483,"src":"6069:19:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$returns$__$","typeString":"function (uint256) pure"}},"id":64776,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"6069:38:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64777,"nodeType":"RevertStatement","src":"6062:45:100"}]}},{"assignments":[64782],"declarations":[{"constant":false,"id":64782,"mutability":"mutable","name":"coordinator","nameLocation":"6184:11:100","nodeType":"VariableDeclaration","scope":65090,"src":"6171:24:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ICoordinator_$70169","typeString":"contract ICoordinator"},"typeName":{"id":64781,"nodeType":"UserDefinedTypeName","pathNode":{"id":64780,"name":"ICoordinator","nameLocations":["6171:12:100"],"nodeType":"IdentifierPath","referencedDeclaration":70169,"src":"6171:12:100"},"referencedDeclaration":70169,"src":"6171:12:100","typeDescriptions":{"typeIdentifier":"t_contract$_ICoordinator_$70169","typeString":"contract ICoordinator"}},"visibility":"internal"}],"id":64789,"initialValue":{"arguments":[{"baseExpression":{"id":64784,"name":"_coordinators","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64422,"src":"6211:13:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_address_$","typeString":"mapping(uint256 => address)"}},"id":64787,"indexExpression":{"expression":{"id":64785,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6225:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64786,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6232:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"6225:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"6211:32:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":64783,"name":"ICoordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70169,"src":"6198:12:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_ICoordinator_$70169_$","typeString":"type(contract ICoordinator)"}},"id":64788,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"6198:46:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_ICoordinator_$70169","typeString":"contract ICoordinator"}},"nodeType":"VariableDeclarationStatement","src":"6171:73:100"},{"condition":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":64795,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":64790,"name":"coordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64782,"src":"6258:11:100","typeDescriptions":{"typeIdentifier":"t_contract$_ICoordinator_$70169","typeString":"contract ICoordinator"}},"id":64791,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"6270:7:100","memberName":"inPhase","nodeType":"MemberAccess","referencedDeclaration":70151,"src":"6258:19:100","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int8_$","typeString":"function () view external returns (int8)"}},"id":64792,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"6258:21:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":64794,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"6283:2:100","subExpression":{"hexValue":"31","id":64793,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6284:1:100","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_minus_1_by_1","typeString":"int_const -1"}},"src":"6258:27:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64802,"nodeType":"IfStatement","src":"6254:100:100","trueBody":{"id":64801,"nodeType":"Block","src":"6287:67:100","statements":[{"errorCall":{"arguments":[{"expression":{"id":64797,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6325:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64798,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6332:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"6325:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":64796,"name":"DkgNotInProgress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64487,"src":"6308:16:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$returns$__$","typeString":"function (uint256) pure"}},"id":64799,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"6308:35:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64800,"nodeType":"RevertStatement","src":"6301:42:100"}]}},{"assignments":[64805],"declarations":[{"constant":false,"id":64805,"mutability":"mutable","name":"g","nameLocation":"6476:1:100","nodeType":"VariableDeclaration","scope":65090,"src":"6462:15:100","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group"},"typeName":{"id":64804,"nodeType":"UserDefinedTypeName","pathNode":{"id":64803,"name":"Group","nameLocations":["6462:5:100"],"nodeType":"IdentifierPath","referencedDeclaration":69776,"src":"6462:5:100"},"referencedDeclaration":69776,"src":"6462:5:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group"}},"visibility":"internal"}],"id":64811,"initialValue":{"baseExpression":{"expression":{"id":64806,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"6480:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":64807,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6491:6:100","memberName":"groups","nodeType":"MemberAccess","referencedDeclaration":73035,"src":"6480:17:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$","typeString":"mapping(uint256 => struct IController.Group storage ref)"}},"id":64810,"indexExpression":{"expression":{"id":64808,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6498:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64809,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6505:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"6498:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"6480:36:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage","typeString":"struct IController.Group storage ref"}},"nodeType":"VariableDeclarationStatement","src":"6462:54:100"},{"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":64816,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":64812,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6530:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64813,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6537:10:100","memberName":"groupEpoch","nodeType":"MemberAccess","referencedDeclaration":69804,"src":"6530:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"expression":{"id":64814,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64805,"src":"6551:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group storage pointer"}},"id":64815,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6553:5:100","memberName":"epoch","nodeType":"MemberAccess","referencedDeclaration":69754,"src":"6551:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6530:28:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64827,"nodeType":"IfStatement","src":"6526:126:100","trueBody":{"id":64826,"nodeType":"Block","src":"6560:92:100","statements":[{"errorCall":{"arguments":[{"expression":{"id":64818,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6595:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64819,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6602:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"6595:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":64820,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6614:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64821,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6621:10:100","memberName":"groupEpoch","nodeType":"MemberAccess","referencedDeclaration":69804,"src":"6614:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":64822,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64805,"src":"6633:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group storage pointer"}},"id":64823,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6635:5:100","memberName":"epoch","nodeType":"MemberAccess","referencedDeclaration":69754,"src":"6633:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":64817,"name":"EpochMismatch","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64501,"src":"6581:13:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (uint256,uint256,uint256) pure"}},"id":64824,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"6581:60:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64825,"nodeType":"RevertStatement","src":"6574:67:100"}]}},{"condition":{"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":64837,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[{"expression":{"id":64830,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6701:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64831,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6708:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"6701:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":64832,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"6720:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":64833,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"6724:6:100","memberName":"sender","nodeType":"MemberAccess","src":"6720:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":64828,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"6666:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":64829,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6677:23:100","memberName":"getMemberIndexByAddress","nodeType":"MemberAccess","referencedDeclaration":73958,"src":"6666:34:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_address_$returns$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,uint256,address) view returns (int256)"}},"id":64834,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"6666:65:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":64836,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"6735:2:100","subExpression":{"hexValue":"31","id":64835,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6736:1:100","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_minus_1_by_1","typeString":"int_const -1"}},"src":"6666:71:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64846,"nodeType":"IfStatement","src":"6662:154:100","trueBody":{"id":64845,"nodeType":"Block","src":"6739:77:100","statements":[{"errorCall":{"arguments":[{"expression":{"id":64839,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6775:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64840,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6782:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"6775:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":64841,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"6794:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":64842,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"6798:6:100","memberName":"sender","nodeType":"MemberAccess","src":"6794:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_address","typeString":"address"}],"id":64838,"name":"NodeNotInGroup","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64507,"src":"6760:14:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$_t_address_$returns$__$","typeString":"function (uint256,address) pure"}},"id":64843,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"6760:45:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64844,"nodeType":"RevertStatement","src":"6753:52:100"}]}},{"condition":{"arguments":[{"expression":{"id":64848,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"6921:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64849,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"6928:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"6921:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":64850,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"6940:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":64851,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"6944:6:100","memberName":"sender","nodeType":"MemberAccess","src":"6940:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_address","typeString":"address"}],"id":64847,"name":"isPartialKeyRegistered","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65605,"src":"6898:22:100","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$_t_address_$returns$_t_bool_$","typeString":"function (uint256,address) view returns (bool)"}},"id":64852,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"6898:53:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64861,"nodeType":"IfStatement","src":"6894:149:100","trueBody":{"id":64860,"nodeType":"Block","src":"6953:90:100","statements":[{"errorCall":{"arguments":[{"expression":{"id":64854,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"7002:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64855,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"7009:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"7002:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":64856,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"7021:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":64857,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"7025:6:100","memberName":"sender","nodeType":"MemberAccess","src":"7021:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_address","typeString":"address"}],"id":64853,"name":"PartialKeyAlreadyRegistered","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64513,"src":"6974:27:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$_t_address_$returns$__$","typeString":"function (uint256,address) pure"}},"id":64858,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"6974:58:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64859,"nodeType":"RevertStatement","src":"6967:65:100"}]}},{"assignments":[64867],"declarations":[{"constant":false,"id":64867,"mutability":"mutable","name":"partialPublicKey","nameLocation":"7161:16:100","nodeType":"VariableDeclaration","scope":65090,"src":"7143:34:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4]"},"typeName":{"baseType":{"id":64865,"name":"uint256","nodeType":"ElementaryTypeName","src":"7143:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":64866,"length":{"hexValue":"34","id":64864,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7151:1:100","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"nodeType":"ArrayTypeName","src":"7143:10:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_storage_ptr","typeString":"uint256[4]"}},"visibility":"internal"}],"id":64873,"initialValue":{"arguments":[{"expression":{"id":64870,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"7203:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64871,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"7210:16:100","memberName":"partialPublicKey","nodeType":"MemberAccess","referencedDeclaration":69808,"src":"7203:23:100","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"expression":{"id":64868,"name":"BLS","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":71125,"src":"7180:3:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_BLS_$71125_$","typeString":"type(library BLS)"}},"id":64869,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"7184:18:100","memberName":"fromBytesPublicKey","nodeType":"MemberAccess","referencedDeclaration":70904,"src":"7180:22:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$4_memory_ptr_$","typeString":"function (bytes memory) pure returns (uint256[4] memory)"}},"id":64872,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"7180:47:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4] memory"}},"nodeType":"VariableDeclarationStatement","src":"7143:84:100"},{"condition":{"id":64878,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"7241:39:100","subExpression":{"arguments":[{"id":64876,"name":"partialPublicKey","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64867,"src":"7263:16:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4] memory"}],"expression":{"id":64874,"name":"BLS","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":71125,"src":"7242:3:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_BLS_$71125_$","typeString":"type(library BLS)"}},"id":64875,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"7246:16:100","memberName":"isValidPublicKey","nodeType":"MemberAccess","referencedDeclaration":70864,"src":"7242:20:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_array$_t_uint256_$4_memory_ptr_$returns$_t_bool_$","typeString":"function (uint256[4] memory) pure returns (bool)"}},"id":64877,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"7242:38:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64885,"nodeType":"IfStatement","src":"7237:106:100","trueBody":{"id":64884,"nodeType":"Block","src":"7282:61:100","statements":[{"errorCall":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":64879,"name":"BLS","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":71125,"src":"7303:3:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_BLS_$71125_$","typeString":"type(library BLS)"}},"id":64881,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"7307:23:100","memberName":"InvalidPartialPublicKey","nodeType":"MemberAccess","referencedDeclaration":70477,"src":"7303:27:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$__$returns$__$","typeString":"function () pure"}},"id":64882,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"7303:29:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64883,"nodeType":"RevertStatement","src":"7296:36:100"}]}},{"assignments":[64891],"declarations":[{"constant":false,"id":64891,"mutability":"mutable","name":"publicKey","nameLocation":"7371:9:100","nodeType":"VariableDeclaration","scope":65090,"src":"7353:27:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4]"},"typeName":{"baseType":{"id":64889,"name":"uint256","nodeType":"ElementaryTypeName","src":"7353:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":64890,"length":{"hexValue":"34","id":64888,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7361:1:100","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"nodeType":"ArrayTypeName","src":"7353:10:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_storage_ptr","typeString":"uint256[4]"}},"visibility":"internal"}],"id":64897,"initialValue":{"arguments":[{"expression":{"id":64894,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"7406:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64895,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"7413:9:100","memberName":"publicKey","nodeType":"MemberAccess","referencedDeclaration":69806,"src":"7406:16:100","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"expression":{"id":64892,"name":"BLS","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":71125,"src":"7383:3:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_BLS_$71125_$","typeString":"type(library BLS)"}},"id":64893,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"7387:18:100","memberName":"fromBytesPublicKey","nodeType":"MemberAccess","referencedDeclaration":70904,"src":"7383:22:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$4_memory_ptr_$","typeString":"function (bytes memory) pure returns (uint256[4] memory)"}},"id":64896,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"7383:40:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4] memory"}},"nodeType":"VariableDeclarationStatement","src":"7353:70:100"},{"condition":{"id":64902,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"7437:32:100","subExpression":{"arguments":[{"id":64900,"name":"publicKey","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64891,"src":"7459:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4] memory"}],"expression":{"id":64898,"name":"BLS","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":71125,"src":"7438:3:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_BLS_$71125_$","typeString":"type(library BLS)"}},"id":64899,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"7442:16:100","memberName":"isValidPublicKey","nodeType":"MemberAccess","referencedDeclaration":70864,"src":"7438:20:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_array$_t_uint256_$4_memory_ptr_$returns$_t_bool_$","typeString":"function (uint256[4] memory) pure returns (bool)"}},"id":64901,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"7438:31:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64909,"nodeType":"IfStatement","src":"7433:92:100","trueBody":{"id":64908,"nodeType":"Block","src":"7471:54:100","statements":[{"errorCall":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":64903,"name":"BLS","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":71125,"src":"7492:3:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_BLS_$71125_$","typeString":"type(library BLS)"}},"id":64905,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"7496:16:100","memberName":"InvalidPublicKey","nodeType":"MemberAccess","referencedDeclaration":70475,"src":"7492:20:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$__$returns$__$","typeString":"function () pure"}},"id":64906,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"7492:22:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64907,"nodeType":"RevertStatement","src":"7485:29:100"}]}},{"expression":{"id":64926,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"expression":{"baseExpression":{"expression":{"id":64910,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64805,"src":"7662:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group storage pointer"}},"id":64922,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"7664:7:100","memberName":"members","nodeType":"MemberAccess","referencedDeclaration":69762,"src":"7662:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Member_$69783_storage_$dyn_storage","typeString":"struct IController.Member storage ref[] storage ref"}},"id":64923,"indexExpression":{"arguments":[{"arguments":[{"expression":{"id":64916,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"7715:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64917,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"7722:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"7715:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":64918,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"7734:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":64919,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"7738:6:100","memberName":"sender","nodeType":"MemberAccess","src":"7734:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":64914,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"7680:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":64915,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"7691:23:100","memberName":"getMemberIndexByAddress","nodeType":"MemberAccess","referencedDeclaration":73958,"src":"7680:34:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_address_$returns$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,uint256,address) view returns (int256)"}},"id":64920,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"7680:65:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":64913,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7672:7:100","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":{"id":64912,"name":"uint256","nodeType":"ElementaryTypeName","src":"7672:7:100","typeDescriptions":{}}},"id":64921,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"7672:74:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"7662:85:100","typeDescriptions":{"typeIdentifier":"t_struct$_Member_$69783_storage","typeString":"struct IController.Member storage ref"}},"id":64924,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"memberLocation":"7748:16:100","memberName":"partialPublicKey","nodeType":"MemberAccess","referencedDeclaration":69782,"src":"7662:102:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_storage","typeString":"uint256[4] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":64925,"name":"partialPublicKey","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64867,"src":"7779:16:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4] memory"}},"src":"7662:133:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_storage","typeString":"uint256[4] storage ref"}},"id":64927,"nodeType":"ExpressionStatement","src":"7662:133:100"},{"condition":{"id":64930,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"7952:37:100","subExpression":{"expression":{"id":64928,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64805,"src":"7953:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group storage pointer"}},"id":64929,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"7955:34:100","memberName":"isStrictlyMajorityConsensusReached","nodeType":"MemberAccess","referencedDeclaration":69771,"src":"7953:36:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65089,"nodeType":"IfStatement","src":"7948:1872:100","trueBody":{"id":65088,"nodeType":"Block","src":"7991:1829:100","statements":[{"body":{"id":64996,"nodeType":"Block","src":"8118:507:100","statements":[{"condition":{"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":64954,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[{"expression":{"id":64945,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8175:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64946,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8182:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"8175:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"baseExpression":{"expression":{"id":64947,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8194:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64948,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8201:17:100","memberName":"disqualifiedNodes","nodeType":"MemberAccess","referencedDeclaration":69811,"src":"8194:24:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":64950,"indexExpression":{"id":64949,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64932,"src":"8219:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8194:27:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":64943,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"8140:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":64944,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8151:23:100","memberName":"getMemberIndexByAddress","nodeType":"MemberAccess","referencedDeclaration":73958,"src":"8140:34:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_address_$returns$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,uint256,address) view returns (int256)"}},"id":64951,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"8140:82:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":64953,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8226:2:100","subExpression":{"hexValue":"31","id":64952,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8227:1:100","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_minus_1_by_1","typeString":"int_const -1"}},"src":"8140:88:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64965,"nodeType":"IfStatement","src":"8136:204:100","trueBody":{"id":64964,"nodeType":"Block","src":"8230:110:100","statements":[{"errorCall":{"arguments":[{"expression":{"id":64956,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8274:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64957,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8281:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"8274:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"baseExpression":{"expression":{"id":64958,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8293:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64959,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8300:17:100","memberName":"disqualifiedNodes","nodeType":"MemberAccess","referencedDeclaration":69811,"src":"8293:24:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":64961,"indexExpression":{"id":64960,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64932,"src":"8318:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8293:27:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_address","typeString":"address"}],"id":64955,"name":"NodeNotInGroup","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64507,"src":"8259:14:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$_t_address_$returns$__$","typeString":"function (uint256,address) pure"}},"id":64962,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"8259:62:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64963,"nodeType":"RevertStatement","src":"8252:69:100"}]}},{"body":{"id":64994,"nodeType":"Block","src":"8423:188:100","statements":[{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":64988,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"expression":{"id":64980,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8449:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64981,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8456:17:100","memberName":"disqualifiedNodes","nodeType":"MemberAccess","referencedDeclaration":69811,"src":"8449:24:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":64983,"indexExpression":{"id":64982,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64932,"src":"8474:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8449:27:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"baseExpression":{"expression":{"id":64984,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8480:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64985,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8487:17:100","memberName":"disqualifiedNodes","nodeType":"MemberAccess","referencedDeclaration":69811,"src":"8480:24:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":64987,"indexExpression":{"id":64986,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64967,"src":"8505:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8480:27:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"8449:58:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64993,"nodeType":"IfStatement","src":"8445:148:100","trueBody":{"id":64992,"nodeType":"Block","src":"8509:84:100","statements":[{"errorCall":{"arguments":[],"expression":{"argumentTypes":[],"id":64989,"name":"DuplicatedDisqualifiedNode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64519,"src":"8542:26:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$__$returns$__$","typeString":"function () pure"}},"id":64990,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"8542:28:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64991,"nodeType":"RevertStatement","src":"8535:35:100"}]}}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":64976,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":64972,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64967,"src":"8381:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"expression":{"id":64973,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8385:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64974,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8392:17:100","memberName":"disqualifiedNodes","nodeType":"MemberAccess","referencedDeclaration":69811,"src":"8385:24:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":64975,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"8410:6:100","memberName":"length","nodeType":"MemberAccess","src":"8385:31:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8381:35:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64995,"initializationExpression":{"assignments":[64967],"declarations":[{"constant":false,"id":64967,"mutability":"mutable","name":"j","nameLocation":"8370:1:100","nodeType":"VariableDeclaration","scope":64995,"src":"8362:9:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64966,"name":"uint256","nodeType":"ElementaryTypeName","src":"8362:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":64971,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":64970,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":64968,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64932,"src":"8374:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"hexValue":"31","id":64969,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8378:1:100","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8374:5:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"8362:17:100"},"loopExpression":{"expression":{"id":64978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"8418:3:100","subExpression":{"id":64977,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64967,"src":"8418:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":64979,"nodeType":"ExpressionStatement","src":"8418:3:100"},"nodeType":"ForStatement","src":"8357:254:100"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":64939,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":64935,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64932,"src":"8076:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"expression":{"id":64936,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8080:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":64937,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8087:17:100","memberName":"disqualifiedNodes","nodeType":"MemberAccess","referencedDeclaration":69811,"src":"8080:24:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":64938,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"8105:6:100","memberName":"length","nodeType":"MemberAccess","src":"8080:31:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8076:35:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":64997,"initializationExpression":{"assignments":[64932],"declarations":[{"constant":false,"id":64932,"mutability":"mutable","name":"i","nameLocation":"8069:1:100","nodeType":"VariableDeclaration","scope":64997,"src":"8061:9:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64931,"name":"uint256","nodeType":"ElementaryTypeName","src":"8061:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":64934,"initialValue":{"hexValue":"30","id":64933,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8073:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"8061:13:100"},"loopExpression":{"expression":{"id":64941,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"8113:3:100","subExpression":{"id":64940,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64932,"src":"8113:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":64942,"nodeType":"ExpressionStatement","src":"8113:3:100"},"nodeType":"ForStatement","src":"8056:569:100"},{"assignments":[65000],"declarations":[{"constant":false,"id":65000,"mutability":"mutable","name":"commitResult","nameLocation":"8710:12:100","nodeType":"VariableDeclaration","scope":65088,"src":"8690:32:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_CommitResult_$69793_memory_ptr","typeString":"struct IController.CommitResult"},"typeName":{"id":64999,"nodeType":"UserDefinedTypeName","pathNode":{"id":64998,"name":"CommitResult","nameLocations":["8690:12:100"],"nodeType":"IdentifierPath","referencedDeclaration":69793,"src":"8690:12:100"},"referencedDeclaration":69793,"src":"8690:12:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitResult_$69793_storage_ptr","typeString":"struct IController.CommitResult"}},"visibility":"internal"}],"id":65008,"initialValue":{"arguments":[{"expression":{"id":65002,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8768:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":65003,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8775:10:100","memberName":"groupEpoch","nodeType":"MemberAccess","referencedDeclaration":69804,"src":"8768:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":65004,"name":"publicKey","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64891,"src":"8814:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4] memory"}},{"expression":{"id":65005,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8860:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":65006,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8867:17:100","memberName":"disqualifiedNodes","nodeType":"MemberAccess","referencedDeclaration":69811,"src":"8860:24:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4] memory"},{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}],"id":65001,"name":"CommitResult","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":69793,"src":"8725:12:100","typeDescriptions":{"typeIdentifier":"t_type$_t_struct$_CommitResult_$69793_storage_ptr_$","typeString":"type(struct IController.CommitResult storage pointer)"}},"id":65007,"isConstant":false,"isLValue":false,"isPure":false,"kind":"structConstructorCall","lValueRequested":false,"nameLocations":["8756:10:100","8803:9:100","8841:17:100"],"names":["groupEpoch","publicKey","disqualifiedNodes"],"nodeType":"FunctionCall","src":"8725:174:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_struct$_CommitResult_$69793_memory_ptr","typeString":"struct IController.CommitResult memory"}},"nodeType":"VariableDeclarationStatement","src":"8690:209:100"},{"condition":{"id":65015,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"8918:72:100","subExpression":{"arguments":[{"expression":{"id":65011,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"8958:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":65012,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8965:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"8958:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":65013,"name":"commitResult","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65000,"src":"8977:12:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitResult_$69793_memory_ptr","typeString":"struct IController.CommitResult memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_struct$_CommitResult_$69793_memory_ptr","typeString":"struct IController.CommitResult memory"}],"expression":{"id":65009,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"8919:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65010,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"8930:27:100","memberName":"tryAddToExistingCommitCache","nodeType":"MemberAccess","referencedDeclaration":73787,"src":"8919:38:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_struct$_CommitResult_$69793_memory_ptr_$returns$_t_bool_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,uint256,struct IController.CommitResult memory) returns (bool)"}},"id":65014,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"8919:71:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65046,"nodeType":"IfStatement","src":"8914:351:100","trueBody":{"id":65045,"nodeType":"Block","src":"8992:273:100","statements":[{"assignments":[65018],"declarations":[{"constant":false,"id":65018,"mutability":"mutable","name":"commitCache","nameLocation":"9029:11:100","nodeType":"VariableDeclaration","scope":65045,"src":"9010:30:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_CommitCache_$69800_memory_ptr","typeString":"struct IController.CommitCache"},"typeName":{"id":65017,"nodeType":"UserDefinedTypeName","pathNode":{"id":65016,"name":"CommitCache","nameLocations":["9010:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69800,"src":"9010:11:100"},"referencedDeclaration":69800,"src":"9010:11:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitCache_$69800_storage_ptr","typeString":"struct IController.CommitCache"}},"visibility":"internal"}],"id":65027,"initialValue":{"arguments":[{"id":65020,"name":"commitResult","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65000,"src":"9090:12:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitResult_$69793_memory_ptr","typeString":"struct IController.CommitResult memory"}},{"arguments":[{"hexValue":"31","id":65024,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9133:1:100","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":65023,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"9119:13:100","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":65021,"name":"address","nodeType":"ElementaryTypeName","src":"9123:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65022,"nodeType":"ArrayTypeName","src":"9123:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":65025,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"9119:16:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_struct$_CommitResult_$69793_memory_ptr","typeString":"struct IController.CommitResult memory"},{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}],"id":65019,"name":"CommitCache","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":69800,"src":"9063:11:100","typeDescriptions":{"typeIdentifier":"t_type$_t_struct$_CommitCache_$69800_storage_ptr_$","typeString":"type(struct IController.CommitCache storage pointer)"}},"id":65026,"isConstant":false,"isLValue":false,"isPure":false,"kind":"structConstructorCall","lValueRequested":false,"nameLocations":["9076:12:100","9104:13:100"],"names":["commitResult","nodeIdAddress"],"nodeType":"FunctionCall","src":"9063:74:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_struct$_CommitCache_$69800_memory_ptr","typeString":"struct IController.CommitCache memory"}},"nodeType":"VariableDeclarationStatement","src":"9010:127:100"},{"expression":{"id":65035,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"expression":{"id":65028,"name":"commitCache","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65018,"src":"9156:11:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitCache_$69800_memory_ptr","typeString":"struct IController.CommitCache memory"}},"id":65031,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"9168:13:100","memberName":"nodeIdAddress","nodeType":"MemberAccess","referencedDeclaration":69796,"src":"9156:25:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":65032,"indexExpression":{"hexValue":"30","id":65030,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9182:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"9156:28:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":65033,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"9187:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":65034,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"9191:6:100","memberName":"sender","nodeType":"MemberAccess","src":"9187:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"9156:41:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65036,"nodeType":"ExpressionStatement","src":"9156:41:100"},{"expression":{"arguments":[{"id":65042,"name":"commitCache","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65018,"src":"9238:11:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitCache_$69800_memory_ptr","typeString":"struct IController.CommitCache memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_struct$_CommitCache_$69800_memory_ptr","typeString":"struct IController.CommitCache memory"}],"expression":{"expression":{"id":65037,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64805,"src":"9215:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group storage pointer"}},"id":65040,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"9217:15:100","memberName":"commitCacheList","nodeType":"MemberAccess","referencedDeclaration":69769,"src":"9215:17:100","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_CommitCache_$69800_storage_$dyn_storage","typeString":"struct IController.CommitCache storage ref[] storage ref"}},"id":65041,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"9233:4:100","memberName":"push","nodeType":"MemberAccess","src":"9215:22:100","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_array$_t_struct$_CommitCache_$69800_storage_$dyn_storage_ptr_$_t_struct$_CommitCache_$69800_storage_$returns$__$attached_to$_t_array$_t_struct$_CommitCache_$69800_storage_$dyn_storage_ptr_$","typeString":"function (struct IController.CommitCache storage ref[] storage pointer,struct IController.CommitCache storage ref)"}},"id":65043,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"9215:35:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65044,"nodeType":"ExpressionStatement","src":"9215:35:100"}]}},{"assignments":[65048,65051],"declarations":[{"constant":false,"id":65048,"mutability":"mutable","name":"success","nameLocation":"9285:7:100","nodeType":"VariableDeclaration","scope":65088,"src":"9280:12:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":65047,"name":"bool","nodeType":"ElementaryTypeName","src":"9280:4:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"},{"constant":false,"id":65051,"mutability":"mutable","name":"disqualifiedNodes","nameLocation":"9311:17:100","nodeType":"VariableDeclaration","scope":65088,"src":"9294:34:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":65049,"name":"address","nodeType":"ElementaryTypeName","src":"9294:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65050,"nodeType":"ArrayTypeName","src":"9294:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":65058,"initialValue":{"arguments":[{"expression":{"id":65054,"name":"params","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64747,"src":"9374:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams memory"}},"id":65055,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"9381:10:100","memberName":"groupIndex","nodeType":"MemberAccess","referencedDeclaration":69802,"src":"9374:17:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":65056,"name":"_lastOutput","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64427,"src":"9393:11:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"id":65052,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"9348:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65053,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"9359:14:100","memberName":"tryEnableGroup","nodeType":"MemberAccess","referencedDeclaration":73508,"src":"9348:25:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,uint256,uint256) returns (bool,address[] memory)"}},"id":65057,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"9348:57:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"tuple(bool,address[] memory)"}},"nodeType":"VariableDeclarationStatement","src":"9279:126:100"},{"condition":{"id":65059,"name":"success","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65048,"src":"9424:7:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65087,"nodeType":"IfStatement","src":"9420:390:100","trueBody":{"id":65086,"nodeType":"Block","src":"9433:377:100","statements":[{"body":{"id":65084,"nodeType":"Block","src":"9585:211:100","statements":[{"expression":{"arguments":[{"baseExpression":{"id":65076,"name":"disqualifiedNodes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65051,"src":"9693:17:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":65078,"indexExpression":{"id":65077,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65061,"src":"9711:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9693:20:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"expression":{"id":65079,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"9715:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65080,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"9723:29:100","memberName":"disqualifiedNodePenaltyAmount","nodeType":"MemberAccess","referencedDeclaration":64433,"src":"9715:37:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"hexValue":"30","id":65081,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9754:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"}],"expression":{"arguments":[{"expression":{"id":65072,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"9621:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65073,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"9629:27:100","memberName":"nodeRegistryContractAddress","nodeType":"MemberAccess","referencedDeclaration":64429,"src":"9621:35:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":65071,"name":"INodeRegistry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70293,"src":"9607:13:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_INodeRegistry_$70293_$","typeString":"type(contract INodeRegistry)"}},"id":65074,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"9607:50:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_INodeRegistry_$70293","typeString":"contract INodeRegistry"}},"id":65075,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"9658:9:100","memberName":"slashNode","nodeType":"MemberAccess","referencedDeclaration":70245,"src":"9607:60:100","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint256,uint256) external"}},"id":65082,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"9607:170:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65083,"nodeType":"ExpressionStatement","src":"9607:170:100"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":65067,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":65064,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65061,"src":"9550:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"id":65065,"name":"disqualifiedNodes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65051,"src":"9554:17:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":65066,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"9572:6:100","memberName":"length","nodeType":"MemberAccess","src":"9554:24:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"9550:28:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65085,"initializationExpression":{"assignments":[65061],"declarations":[{"constant":false,"id":65061,"mutability":"mutable","name":"i","nameLocation":"9543:1:100","nodeType":"VariableDeclaration","scope":65085,"src":"9535:9:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65060,"name":"uint256","nodeType":"ElementaryTypeName","src":"9535:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":65063,"initialValue":{"hexValue":"30","id":65062,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9547:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"9535:13:100"},"loopExpression":{"expression":{"id":65069,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"9580:3:100","subExpression":{"id":65068,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65061,"src":"9580:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":65070,"nodeType":"ExpressionStatement","src":"9580:3:100"},"nodeType":"ForStatement","src":"9530:266:100"}]}}]}}]},"baseFunctions":[69830],"functionSelector":"e37eb96c","implemented":true,"kind":"function","modifiers":[],"name":"commitDkg","nameLocation":"5754:9:100","overrides":{"id":64750,"nodeType":"OverrideSpecifier","overrides":[{"id":64749,"name":"IController","nameLocations":["5813:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"5813:11:100"}],"src":"5804:21:100"},"parameters":{"id":64748,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64747,"mutability":"mutable","name":"params","nameLocation":"5787:6:100","nodeType":"VariableDeclaration","scope":65091,"src":"5764:29:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_memory_ptr","typeString":"struct IController.CommitDkgParams"},"typeName":{"id":64746,"nodeType":"UserDefinedTypeName","pathNode":{"id":64745,"name":"CommitDkgParams","nameLocations":["5764:15:100"],"nodeType":"IdentifierPath","referencedDeclaration":69812,"src":"5764:15:100"},"referencedDeclaration":69812,"src":"5764:15:100","typeDescriptions":{"typeIdentifier":"t_struct$_CommitDkgParams_$69812_storage_ptr","typeString":"struct IController.CommitDkgParams"}},"visibility":"internal"}],"src":"5763:31:100"},"returnParameters":{"id":64751,"nodeType":"ParameterList","parameters":[],"src":"5826:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":65294,"nodeType":"FunctionDefinition","src":"9832:2097:100","nodes":[],"body":{"id":65293,"nodeType":"Block","src":"9927:2002:100","nodes":[],"statements":[{"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":65103,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":65100,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"9941:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"expression":{"id":65101,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"9955:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65102,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"9966:10:100","memberName":"groupCount","nodeType":"MemberAccess","referencedDeclaration":73030,"src":"9955:21:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"9941:35:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65109,"nodeType":"IfStatement","src":"9937:98:100","trueBody":{"id":65108,"nodeType":"Block","src":"9978:57:100","statements":[{"errorCall":{"arguments":[{"id":65105,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"10013:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":65104,"name":"GroupNotExist","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64479,"src":"9999:13:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$returns$__$","typeString":"function (uint256) pure"}},"id":65106,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"9999:25:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65107,"nodeType":"RevertStatement","src":"9992:32:100"}]}},{"condition":{"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":65118,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[{"id":65112,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"10128:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65113,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"10140:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":65114,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"10144:6:100","memberName":"sender","nodeType":"MemberAccess","src":"10140:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":65110,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"10093:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65111,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"10104:23:100","memberName":"getMemberIndexByAddress","nodeType":"MemberAccess","referencedDeclaration":73958,"src":"10093:34:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_address_$returns$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,uint256,address) view returns (int256)"}},"id":65115,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10093:58:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":65117,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10155:2:100","subExpression":{"hexValue":"31","id":65116,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10156:1:100","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_minus_1_by_1","typeString":"int_const -1"}},"src":"10093:64:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65126,"nodeType":"IfStatement","src":"10089:140:100","trueBody":{"id":65125,"nodeType":"Block","src":"10159:70:100","statements":[{"errorCall":{"arguments":[{"id":65120,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"10195:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65121,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"10207:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":65122,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"10211:6:100","memberName":"sender","nodeType":"MemberAccess","src":"10207:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_address","typeString":"address"}],"id":65119,"name":"NodeNotInGroup","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64507,"src":"10180:14:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$_t_address_$returns$__$","typeString":"function (uint256,address) pure"}},"id":65123,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10180:38:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65124,"nodeType":"RevertStatement","src":"10173:45:100"}]}},{"assignments":[65129],"declarations":[{"constant":false,"id":65129,"mutability":"mutable","name":"g","nameLocation":"10286:1:100","nodeType":"VariableDeclaration","scope":65293,"src":"10272:15:100","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group"},"typeName":{"id":65128,"nodeType":"UserDefinedTypeName","pathNode":{"id":65127,"name":"Group","nameLocations":["10272:5:100"],"nodeType":"IdentifierPath","referencedDeclaration":69776,"src":"10272:5:100"},"referencedDeclaration":69776,"src":"10272:5:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group"}},"visibility":"internal"}],"id":65134,"initialValue":{"baseExpression":{"expression":{"id":65130,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"10290:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65131,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"10301:6:100","memberName":"groups","nodeType":"MemberAccess","referencedDeclaration":73035,"src":"10290:17:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$","typeString":"mapping(uint256 => struct IController.Group storage ref)"}},"id":65133,"indexExpression":{"id":65132,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"10308:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"10290:29:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage","typeString":"struct IController.Group storage ref"}},"nodeType":"VariableDeclarationStatement","src":"10272:47:100"},{"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":65138,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":65135,"name":"groupEpoch","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65095,"src":"10333:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"expression":{"id":65136,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65129,"src":"10347:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group storage pointer"}},"id":65137,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"10349:5:100","memberName":"epoch","nodeType":"MemberAccess","referencedDeclaration":69754,"src":"10347:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"10333:21:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65147,"nodeType":"IfStatement","src":"10329:105:100","trueBody":{"id":65146,"nodeType":"Block","src":"10356:78:100","statements":[{"errorCall":{"arguments":[{"id":65140,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"10391:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":65141,"name":"groupEpoch","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65095,"src":"10403:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65142,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65129,"src":"10415:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group storage pointer"}},"id":65143,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"10417:5:100","memberName":"epoch","nodeType":"MemberAccess","referencedDeclaration":69754,"src":"10415:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":65139,"name":"EpochMismatch","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64501,"src":"10377:13:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (uint256,uint256,uint256) pure"}},"id":65144,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10377:46:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65145,"nodeType":"RevertStatement","src":"10370:53:100"}]}},{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":65155,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":65148,"name":"_coordinators","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64422,"src":"10486:13:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_address_$","typeString":"mapping(uint256 => address)"}},"id":65150,"indexExpression":{"id":65149,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"10500:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"10486:25:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"arguments":[{"hexValue":"30","id":65153,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10523:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"}],"id":65152,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10515:7:100","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":65151,"name":"address","nodeType":"ElementaryTypeName","src":"10515:7:100","typeDescriptions":{}}},"id":65154,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10515:10:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"10486:39:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65161,"nodeType":"IfStatement","src":"10482:108:100","trueBody":{"id":65160,"nodeType":"Block","src":"10527:63:100","statements":[{"errorCall":{"arguments":[{"id":65157,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"10568:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":65156,"name":"CoordinatorNotFound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64483,"src":"10548:19:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$returns$__$","typeString":"function (uint256) pure"}},"id":65158,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10548:31:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65159,"nodeType":"RevertStatement","src":"10541:38:100"}]}},{"assignments":[65164],"declarations":[{"constant":false,"id":65164,"mutability":"mutable","name":"coordinator","nameLocation":"10660:11:100","nodeType":"VariableDeclaration","scope":65293,"src":"10647:24:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ICoordinator_$70169","typeString":"contract ICoordinator"},"typeName":{"id":65163,"nodeType":"UserDefinedTypeName","pathNode":{"id":65162,"name":"ICoordinator","nameLocations":["10647:12:100"],"nodeType":"IdentifierPath","referencedDeclaration":70169,"src":"10647:12:100"},"referencedDeclaration":70169,"src":"10647:12:100","typeDescriptions":{"typeIdentifier":"t_contract$_ICoordinator_$70169","typeString":"contract ICoordinator"}},"visibility":"internal"}],"id":65170,"initialValue":{"arguments":[{"baseExpression":{"id":65166,"name":"_coordinators","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64422,"src":"10687:13:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_address_$","typeString":"mapping(uint256 => address)"}},"id":65168,"indexExpression":{"id":65167,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"10701:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"10687:25:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":65165,"name":"ICoordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70169,"src":"10674:12:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_ICoordinator_$70169_$","typeString":"type(contract ICoordinator)"}},"id":65169,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10674:39:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_ICoordinator_$70169","typeString":"contract ICoordinator"}},"nodeType":"VariableDeclarationStatement","src":"10647:66:100"},{"condition":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":65176,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":65171,"name":"coordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65164,"src":"10727:11:100","typeDescriptions":{"typeIdentifier":"t_contract$_ICoordinator_$70169","typeString":"contract ICoordinator"}},"id":65172,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"10739:7:100","memberName":"inPhase","nodeType":"MemberAccess","referencedDeclaration":70151,"src":"10727:19:100","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int8_$","typeString":"function () view external returns (int8)"}},"id":65173,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10727:21:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"id":65175,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10752:2:100","subExpression":{"hexValue":"31","id":65174,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10753:1:100","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_minus_1_by_1","typeString":"int_const -1"}},"src":"10727:27:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65185,"nodeType":"IfStatement","src":"10723:118:100","trueBody":{"id":65184,"nodeType":"Block","src":"10756:85:100","statements":[{"errorCall":{"arguments":[{"id":65178,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"10796:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":65179,"name":"coordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65164,"src":"10808:11:100","typeDescriptions":{"typeIdentifier":"t_contract$_ICoordinator_$70169","typeString":"contract ICoordinator"}},"id":65180,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"10820:7:100","memberName":"inPhase","nodeType":"MemberAccess","referencedDeclaration":70151,"src":"10808:19:100","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int8_$","typeString":"function () view external returns (int8)"}},"id":65181,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10808:21:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_int8","typeString":"int8"}],"id":65177,"name":"DkgStillInProgress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64493,"src":"10777:18:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$_t_uint256_$_t_int8_$returns$__$","typeString":"function (uint256,int8) pure"}},"id":65182,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10777:53:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65183,"nodeType":"RevertStatement","src":"10770:60:100"}]}},{"expression":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":65186,"name":"coordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65164,"src":"10881:11:100","typeDescriptions":{"typeIdentifier":"t_contract$_ICoordinator_$70169","typeString":"contract ICoordinator"}},"id":65188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"10893:12:100","memberName":"selfDestruct","nodeType":"MemberAccess","referencedDeclaration":70168,"src":"10881:24:100","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":65189,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10881:26:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65190,"nodeType":"ExpressionStatement","src":"10881:26:100"},{"expression":{"id":65198,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":65191,"name":"_coordinators","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64422,"src":"10947:13:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_address_$","typeString":"mapping(uint256 => address)"}},"id":65193,"indexExpression":{"id":65192,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"10961:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"10947:25:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"hexValue":"30","id":65196,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10983:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"}],"id":65195,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10975:7:100","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":65194,"name":"address","nodeType":"ElementaryTypeName","src":"10975:7:100","typeDescriptions":{}}},"id":65197,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"10975:10:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"10947:38:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65199,"nodeType":"ExpressionStatement","src":"10947:38:100"},{"condition":{"id":65202,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"11035:37:100","subExpression":{"expression":{"id":65200,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65129,"src":"11036:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group storage pointer"}},"id":65201,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"11038:34:100","memberName":"isStrictlyMajorityConsensusReached","nodeType":"MemberAccess","referencedDeclaration":69771,"src":"11036:36:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65263,"nodeType":"IfStatement","src":"11031:638:100","trueBody":{"id":65262,"nodeType":"Block","src":"11074:595:100","statements":[{"assignments":[65207,65210],"declarations":[{"constant":false,"id":65207,"mutability":"mutable","name":"nodesToBeSlashed","nameLocation":"11106:16:100","nodeType":"VariableDeclaration","scope":65262,"src":"11089:33:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":65205,"name":"address","nodeType":"ElementaryTypeName","src":"11089:7:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65206,"nodeType":"ArrayTypeName","src":"11089:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":65210,"mutability":"mutable","name":"groupIndicesToEmitEvent","nameLocation":"11141:23:100","nodeType":"VariableDeclaration","scope":65262,"src":"11124:40:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":65208,"name":"uint256","nodeType":"ElementaryTypeName","src":"11124:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":65209,"nodeType":"ArrayTypeName","src":"11124:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"visibility":"internal"}],"id":65216,"initialValue":{"arguments":[{"id":65213,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65093,"src":"11222:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":65214,"name":"_lastOutput","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64427,"src":"11234:11:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"id":65211,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"11184:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65212,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"11195:26:100","memberName":"handleUnsuccessfulGroupDkg","nodeType":"MemberAccess","referencedDeclaration":73717,"src":"11184:37:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,uint256,uint256) returns (address[] memory,uint256[] memory)"}},"id":65215,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"11184:62:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$","typeString":"tuple(address[] memory,uint256[] memory)"}},"nodeType":"VariableDeclarationStatement","src":"11088:158:100"},{"body":{"id":65241,"nodeType":"Block","src":"11315:194:100","statements":[{"expression":{"arguments":[{"baseExpression":{"id":65233,"name":"nodesToBeSlashed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65207,"src":"11415:16:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":65235,"indexExpression":{"id":65234,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65218,"src":"11432:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"11415:19:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"expression":{"id":65236,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"11436:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65237,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"11444:29:100","memberName":"disqualifiedNodePenaltyAmount","nodeType":"MemberAccess","referencedDeclaration":64433,"src":"11436:37:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"hexValue":"30","id":65238,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"11475:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"}],"expression":{"arguments":[{"expression":{"id":65229,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"11347:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65230,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"11355:27:100","memberName":"nodeRegistryContractAddress","nodeType":"MemberAccess","referencedDeclaration":64429,"src":"11347:35:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":65228,"name":"INodeRegistry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70293,"src":"11333:13:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_INodeRegistry_$70293_$","typeString":"type(contract INodeRegistry)"}},"id":65231,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"11333:50:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_INodeRegistry_$70293","typeString":"contract INodeRegistry"}},"id":65232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"11384:9:100","memberName":"slashNode","nodeType":"MemberAccess","referencedDeclaration":70245,"src":"11333:60:100","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint256,uint256) external"}},"id":65239,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"11333:161:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65240,"nodeType":"ExpressionStatement","src":"11333:161:100"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":65224,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":65221,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65218,"src":"11281:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"id":65222,"name":"nodesToBeSlashed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65207,"src":"11285:16:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":65223,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"11302:6:100","memberName":"length","nodeType":"MemberAccess","src":"11285:23:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"11281:27:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65242,"initializationExpression":{"assignments":[65218],"declarations":[{"constant":false,"id":65218,"mutability":"mutable","name":"i","nameLocation":"11274:1:100","nodeType":"VariableDeclaration","scope":65242,"src":"11266:9:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65217,"name":"uint256","nodeType":"ElementaryTypeName","src":"11266:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":65220,"initialValue":{"hexValue":"30","id":65219,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"11278:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"11266:13:100"},"loopExpression":{"expression":{"id":65226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"11310:3:100","subExpression":{"id":65225,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65218,"src":"11310:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":65227,"nodeType":"ExpressionStatement","src":"11310:3:100"},"nodeType":"ForStatement","src":"11261:248:100"},{"body":{"id":65260,"nodeType":"Block","src":"11583:76:100","statements":[{"expression":{"arguments":[{"baseExpression":{"id":65255,"name":"groupIndicesToEmitEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65210,"src":"11617:23:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":65257,"indexExpression":{"id":65256,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65244,"src":"11641:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"11617:26:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":65254,"name":"_emitGroupEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65743,"src":"11601:15:100","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":65258,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"11601:43:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65259,"nodeType":"ExpressionStatement","src":"11601:43:100"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":65250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":65247,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65244,"src":"11542:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"id":65248,"name":"groupIndicesToEmitEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65210,"src":"11546:23:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":65249,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"11570:6:100","memberName":"length","nodeType":"MemberAccess","src":"11546:30:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"11542:34:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65261,"initializationExpression":{"assignments":[65244],"declarations":[{"constant":false,"id":65244,"mutability":"mutable","name":"i","nameLocation":"11535:1:100","nodeType":"VariableDeclaration","scope":65261,"src":"11527:9:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65243,"name":"uint256","nodeType":"ElementaryTypeName","src":"11527:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":65246,"initialValue":{"hexValue":"30","id":65245,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"11539:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"11527:13:100"},"loopExpression":{"expression":{"id":65252,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"11578:3:100","subExpression":{"id":65251,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65244,"src":"11578:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":65253,"nodeType":"ExpressionStatement","src":"11578:3:100"},"nodeType":"ForStatement","src":"11522:137:100"}]}},{"assignments":[65268],"declarations":[{"constant":false,"id":65268,"mutability":"mutable","name":"nodeAddress","nameLocation":"11739:11:100","nodeType":"VariableDeclaration","scope":65293,"src":"11722:28:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":65266,"name":"address","nodeType":"ElementaryTypeName","src":"11722:7:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65267,"nodeType":"ArrayTypeName","src":"11722:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":65274,"initialValue":{"arguments":[{"hexValue":"31","id":65272,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"11767:1:100","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":65271,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"11753:13:100","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":65269,"name":"address","nodeType":"ElementaryTypeName","src":"11757:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65270,"nodeType":"ArrayTypeName","src":"11757:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":65273,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"11753:16:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"11722:47:100"},{"expression":{"id":65280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":65275,"name":"nodeAddress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65268,"src":"11779:11:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":65277,"indexExpression":{"hexValue":"30","id":65276,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"11791:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"11779:14:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":65278,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"11796:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":65279,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"11800:6:100","memberName":"sender","nodeType":"MemberAccess","src":"11796:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"11779:27:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65281,"nodeType":"ExpressionStatement","src":"11779:27:100"},{"expression":{"arguments":[{"id":65287,"name":"nodeAddress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65268,"src":"11877:11:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"hexValue":"30","id":65288,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"11890:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"expression":{"id":65289,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"11893:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65290,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"11901:20:100","memberName":"dkgPostProcessReward","nodeType":"MemberAccess","referencedDeclaration":64437,"src":"11893:28:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"arguments":[{"expression":{"id":65283,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"11830:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65284,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"11838:27:100","memberName":"nodeRegistryContractAddress","nodeType":"MemberAccess","referencedDeclaration":64429,"src":"11830:35:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":65282,"name":"INodeRegistry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70293,"src":"11816:13:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_INodeRegistry_$70293_$","typeString":"type(contract INodeRegistry)"}},"id":65285,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"11816:50:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_INodeRegistry_$70293","typeString":"contract INodeRegistry"}},"id":65286,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"11867:9:100","memberName":"addReward","nodeType":"MemberAccess","referencedDeclaration":70255,"src":"11816:60:100","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address[] memory,uint256,uint256) external"}},"id":65291,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"11816:106:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65292,"nodeType":"ExpressionStatement","src":"11816:106:100"}]},"baseFunctions":[69837],"functionSelector":"0bf9c5c6","implemented":true,"kind":"function","modifiers":[],"name":"postProcessDkg","nameLocation":"9841:14:100","overrides":{"id":65098,"nodeType":"OverrideSpecifier","overrides":[{"id":65097,"name":"IController","nameLocations":["9914:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"9914:11:100"}],"src":"9905:21:100"},"parameters":{"id":65096,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65093,"mutability":"mutable","name":"groupIndex","nameLocation":"9864:10:100","nodeType":"VariableDeclaration","scope":65294,"src":"9856:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65092,"name":"uint256","nodeType":"ElementaryTypeName","src":"9856:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":65095,"mutability":"mutable","name":"groupEpoch","nameLocation":"9884:10:100","nodeType":"VariableDeclaration","scope":65294,"src":"9876:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65094,"name":"uint256","nodeType":"ElementaryTypeName","src":"9876:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"9855:40:100"},"returnParameters":{"id":65099,"nodeType":"ParameterList","parameters":[],"src":"9927:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":65316,"nodeType":"FunctionDefinition","src":"11935:224:100","nodes":[],"body":{"id":65315,"nodeType":"Block","src":"12009:150:100","nodes":[],"statements":[{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":65305,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":65301,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"12023:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":65302,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"12027:6:100","memberName":"sender","nodeType":"MemberAccess","src":"12023:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"expression":{"id":65303,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"12037:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65304,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"12045:22:100","memberName":"adapterContractAddress","nodeType":"MemberAccess","referencedDeclaration":64431,"src":"12037:30:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"12023:44:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65310,"nodeType":"IfStatement","src":"12019:100:100","trueBody":{"id":65309,"nodeType":"Block","src":"12069:50:100","statements":[{"errorCall":{"arguments":[],"expression":{"argumentTypes":[],"id":65306,"name":"SenderNotAdapter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64515,"src":"12090:16:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$__$returns$__$","typeString":"function () pure"}},"id":65307,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"12090:18:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65308,"nodeType":"RevertStatement","src":"12083:25:100"}]}},{"expression":{"id":65313,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":65311,"name":"_lastOutput","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64427,"src":"12128:11:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":65312,"name":"lastOutput","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65296,"src":"12142:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"12128:24:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":65314,"nodeType":"ExpressionStatement","src":"12128:24:100"}]},"baseFunctions":[69859],"functionSelector":"f3df0802","implemented":true,"kind":"function","modifiers":[],"name":"setLastOutput","nameLocation":"11944:13:100","overrides":{"id":65299,"nodeType":"OverrideSpecifier","overrides":[{"id":65298,"name":"IController","nameLocations":["11996:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"11996:11:100"}],"src":"11987:21:100"},"parameters":{"id":65297,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65296,"mutability":"mutable","name":"lastOutput","nameLocation":"11966:10:100","nodeType":"VariableDeclaration","scope":65316,"src":"11958:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65295,"name":"uint256","nodeType":"ElementaryTypeName","src":"11958:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"11957:20:100"},"returnParameters":{"id":65300,"nodeType":"ParameterList","parameters":[],"src":"12009:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":65349,"nodeType":"FunctionDefinition","src":"12165:330:100","nodes":[],"body":{"id":65348,"nodeType":"Block","src":"12278:217:100","nodes":[],"statements":[{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":65332,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":65328,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"12292:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":65329,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"12296:6:100","memberName":"sender","nodeType":"MemberAccess","src":"12292:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"expression":{"id":65330,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"12306:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65331,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"12314:22:100","memberName":"adapterContractAddress","nodeType":"MemberAccess","referencedDeclaration":64431,"src":"12306:30:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"12292:44:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65337,"nodeType":"IfStatement","src":"12288:100:100","trueBody":{"id":65336,"nodeType":"Block","src":"12338:50:100","statements":[{"errorCall":{"arguments":[],"expression":{"argumentTypes":[],"id":65333,"name":"SenderNotAdapter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64515,"src":"12359:16:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$__$returns$__$","typeString":"function () pure"}},"id":65334,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"12359:18:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65335,"nodeType":"RevertStatement","src":"12352:25:100"}]}},{"expression":{"arguments":[{"id":65343,"name":"nodes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65319,"src":"12459:5:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"id":65344,"name":"ethAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65321,"src":"12466:9:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":65345,"name":"arpaAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65323,"src":"12477:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"arguments":[{"expression":{"id":65339,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"12412:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65340,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"12420:27:100","memberName":"nodeRegistryContractAddress","nodeType":"MemberAccess","referencedDeclaration":64429,"src":"12412:35:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":65338,"name":"INodeRegistry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70293,"src":"12398:13:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_INodeRegistry_$70293_$","typeString":"type(contract INodeRegistry)"}},"id":65341,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"12398:50:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_INodeRegistry_$70293","typeString":"contract INodeRegistry"}},"id":65342,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"12449:9:100","memberName":"addReward","nodeType":"MemberAccess","referencedDeclaration":70255,"src":"12398:60:100","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address[] memory,uint256,uint256) external"}},"id":65346,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"12398:90:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65347,"nodeType":"ExpressionStatement","src":"12398:90:100"}]},"baseFunctions":[69854],"functionSelector":"914eb34d","implemented":true,"kind":"function","modifiers":[],"name":"addReward","nameLocation":"12174:9:100","overrides":{"id":65326,"nodeType":"OverrideSpecifier","overrides":[{"id":65325,"name":"IController","nameLocations":["12265:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"12265:11:100"}],"src":"12256:21:100"},"parameters":{"id":65324,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65319,"mutability":"mutable","name":"nodes","nameLocation":"12201:5:100","nodeType":"VariableDeclaration","scope":65349,"src":"12184:22:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":65317,"name":"address","nodeType":"ElementaryTypeName","src":"12184:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65318,"nodeType":"ArrayTypeName","src":"12184:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":65321,"mutability":"mutable","name":"ethAmount","nameLocation":"12216:9:100","nodeType":"VariableDeclaration","scope":65349,"src":"12208:17:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65320,"name":"uint256","nodeType":"ElementaryTypeName","src":"12208:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":65323,"mutability":"mutable","name":"arpaAmount","nameLocation":"12235:10:100","nodeType":"VariableDeclaration","scope":65349,"src":"12227:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65322,"name":"uint256","nodeType":"ElementaryTypeName","src":"12227:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"12183:63:100"},"returnParameters":{"id":65327,"nodeType":"ParameterList","parameters":[],"src":"12278:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":65378,"nodeType":"FunctionDefinition","src":"12501:308:100","nodes":[],"body":{"id":65377,"nodeType":"Block","src":"12595:214:100","nodes":[],"statements":[{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":65362,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":65358,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"12609:3:100","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":65359,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"12613:6:100","memberName":"sender","nodeType":"MemberAccess","src":"12609:10:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"expression":{"id":65360,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"12623:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65361,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"12631:27:100","memberName":"nodeRegistryContractAddress","nodeType":"MemberAccess","referencedDeclaration":64429,"src":"12623:35:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"12609:49:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65367,"nodeType":"IfStatement","src":"12605:110:100","trueBody":{"id":65366,"nodeType":"Block","src":"12660:55:100","statements":[{"errorCall":{"arguments":[],"expression":{"argumentTypes":[],"id":65363,"name":"SenderNotNodeRegistry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64517,"src":"12681:21:100","typeDescriptions":{"typeIdentifier":"t_function_error_pure$__$returns$__$","typeString":"function () pure"}},"id":65364,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"12681:23:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65365,"nodeType":"RevertStatement","src":"12674:30:100"}]}},{"expression":{"arguments":[{"id":65373,"name":"recipient","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65351,"src":"12781:9:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":65374,"name":"ethAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65353,"src":"12792:9:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"arguments":[{"expression":{"id":65369,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"12733:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65370,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"12741:22:100","memberName":"adapterContractAddress","nodeType":"MemberAccess","referencedDeclaration":64431,"src":"12733:30:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":65368,"name":"IAdapter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":69592,"src":"12724:8:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_IAdapter_$69592_$","typeString":"type(contract IAdapter)"}},"id":65371,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"12724:40:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_IAdapter_$69592","typeString":"contract IAdapter"}},"id":65372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"12765:15:100","memberName":"nodeWithdrawETH","nodeType":"MemberAccess","referencedDeclaration":69372,"src":"12724:56:100","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":65375,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"12724:78:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65376,"nodeType":"ExpressionStatement","src":"12724:78:100"}]},"baseFunctions":[69844],"functionSelector":"0ad98f6a","implemented":true,"kind":"function","modifiers":[],"name":"nodeWithdrawETH","nameLocation":"12510:15:100","overrides":{"id":65356,"nodeType":"OverrideSpecifier","overrides":[{"id":65355,"name":"IController","nameLocations":["12582:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"12582:11:100"}],"src":"12573:21:100"},"parameters":{"id":65354,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65351,"mutability":"mutable","name":"recipient","nameLocation":"12534:9:100","nodeType":"VariableDeclaration","scope":65378,"src":"12526:17:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":65350,"name":"address","nodeType":"ElementaryTypeName","src":"12526:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":65353,"mutability":"mutable","name":"ethAmount","nameLocation":"12553:9:100","nodeType":"VariableDeclaration","scope":65378,"src":"12545:17:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65352,"name":"uint256","nodeType":"ElementaryTypeName","src":"12545:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"12525:38:100"},"returnParameters":{"id":65357,"nodeType":"ParameterList","parameters":[],"src":"12595:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":65416,"nodeType":"FunctionDefinition","src":"12815:849:100","nodes":[],"body":{"id":65415,"nodeType":"Block","src":"13264:400:100","nodes":[],"statements":[{"expression":{"components":[{"expression":{"id":65397,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"13295:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65398,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"13303:27:100","memberName":"nodeRegistryContractAddress","nodeType":"MemberAccess","referencedDeclaration":64429,"src":"13295:35:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"expression":{"id":65399,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"13344:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65400,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"13352:22:100","memberName":"adapterContractAddress","nodeType":"MemberAccess","referencedDeclaration":64431,"src":"13344:30:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"expression":{"id":65401,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"13388:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65402,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"13396:29:100","memberName":"disqualifiedNodePenaltyAmount","nodeType":"MemberAccess","referencedDeclaration":64433,"src":"13388:37:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65403,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"13439:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65404,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"13450:25:100","memberName":"defaultNumberOfCommitters","nodeType":"MemberAccess","referencedDeclaration":73041,"src":"13439:36:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65405,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"13489:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65406,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"13497:23:100","memberName":"defaultDkgPhaseDuration","nodeType":"MemberAccess","referencedDeclaration":64435,"src":"13489:31:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65407,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"13534:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65408,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"13545:16:100","memberName":"groupMaxCapacity","nodeType":"MemberAccess","referencedDeclaration":73039,"src":"13534:27:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65409,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"13575:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65410,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"13586:19:100","memberName":"idealNumberOfGroups","nodeType":"MemberAccess","referencedDeclaration":73037,"src":"13575:30:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65411,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"13619:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65412,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"13627:20:100","memberName":"dkgPostProcessReward","nodeType":"MemberAccess","referencedDeclaration":64437,"src":"13619:28:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":65413,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"13281:376:100","typeDescriptions":{"typeIdentifier":"t_tuple$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$","typeString":"tuple(address,address,uint256,uint256,uint256,uint256,uint256,uint256)"}},"functionReturnParameters":65396,"id":65414,"nodeType":"Return","src":"13274:383:100"}]},"baseFunctions":[69878],"functionSelector":"d11b8e68","implemented":true,"kind":"function","modifiers":[],"name":"getControllerConfig","nameLocation":"12824:19:100","parameters":{"id":65379,"nodeType":"ParameterList","parameters":[],"src":"12843:2:100"},"returnParameters":{"id":65396,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65381,"mutability":"mutable","name":"nodeRegistryContractAddress","nameLocation":"12914:27:100","nodeType":"VariableDeclaration","scope":65416,"src":"12906:35:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":65380,"name":"address","nodeType":"ElementaryTypeName","src":"12906:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":65383,"mutability":"mutable","name":"adapterContractAddress","nameLocation":"12963:22:100","nodeType":"VariableDeclaration","scope":65416,"src":"12955:30:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":65382,"name":"address","nodeType":"ElementaryTypeName","src":"12955:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":65385,"mutability":"mutable","name":"disqualifiedNodePenaltyAmount","nameLocation":"13007:29:100","nodeType":"VariableDeclaration","scope":65416,"src":"12999:37:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65384,"name":"uint256","nodeType":"ElementaryTypeName","src":"12999:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":65387,"mutability":"mutable","name":"defaultNumberOfCommitters","nameLocation":"13058:25:100","nodeType":"VariableDeclaration","scope":65416,"src":"13050:33:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65386,"name":"uint256","nodeType":"ElementaryTypeName","src":"13050:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":65389,"mutability":"mutable","name":"defaultDkgPhaseDuration","nameLocation":"13105:23:100","nodeType":"VariableDeclaration","scope":65416,"src":"13097:31:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65388,"name":"uint256","nodeType":"ElementaryTypeName","src":"13097:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":65391,"mutability":"mutable","name":"groupMaxCapacity","nameLocation":"13150:16:100","nodeType":"VariableDeclaration","scope":65416,"src":"13142:24:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65390,"name":"uint256","nodeType":"ElementaryTypeName","src":"13142:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":65393,"mutability":"mutable","name":"idealNumberOfGroups","nameLocation":"13188:19:100","nodeType":"VariableDeclaration","scope":65416,"src":"13180:27:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65392,"name":"uint256","nodeType":"ElementaryTypeName","src":"13180:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":65395,"mutability":"mutable","name":"dkgPostProcessReward","nameLocation":"13229:20:100","nodeType":"VariableDeclaration","scope":65416,"src":"13221:28:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65394,"name":"uint256","nodeType":"ElementaryTypeName","src":"13221:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"12892:367:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"external"},{"id":65429,"nodeType":"FunctionDefinition","src":"13670:150:100","nodes":[],"body":{"id":65428,"nodeType":"Block","src":"13763:57:100","nodes":[],"statements":[{"expression":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":65424,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"13780:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65425,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"13791:20:100","memberName":"getValidGroupIndices","nodeType":"MemberAccess","referencedDeclaration":74026,"src":"13780:31:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer) view returns (uint256[] memory)"}},"id":65426,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"13780:33:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"functionReturnParameters":65423,"id":65427,"nodeType":"Return","src":"13773:40:100"}]},"baseFunctions":[69885],"functionSelector":"b330a0fd","implemented":true,"kind":"function","modifiers":[],"name":"getValidGroupIndices","nameLocation":"13679:20:100","overrides":{"id":65419,"nodeType":"OverrideSpecifier","overrides":[{"id":65418,"name":"IController","nameLocations":["13723:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"13723:11:100"}],"src":"13714:21:100"},"parameters":{"id":65417,"nodeType":"ParameterList","parameters":[],"src":"13699:2:100"},"returnParameters":{"id":65423,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65422,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65429,"src":"13745:16:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":65420,"name":"uint256","nodeType":"ElementaryTypeName","src":"13745:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":65421,"nodeType":"ArrayTypeName","src":"13745:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"visibility":"internal"}],"src":"13744:18:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"public"},{"id":65438,"nodeType":"FunctionDefinition","src":"13826:97:100","nodes":[],"body":{"id":65437,"nodeType":"Block","src":"13883:40:100","nodes":[],"statements":[{"expression":{"expression":{"id":65434,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"13900:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65435,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"13911:5:100","memberName":"epoch","nodeType":"MemberAccess","referencedDeclaration":73028,"src":"13900:16:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":65433,"id":65436,"nodeType":"Return","src":"13893:23:100"}]},"baseFunctions":[69890],"functionSelector":"7ee49cfd","implemented":true,"kind":"function","modifiers":[],"name":"getGroupEpoch","nameLocation":"13835:13:100","parameters":{"id":65430,"nodeType":"ParameterList","parameters":[],"src":"13848:2:100"},"returnParameters":{"id":65433,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65432,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65438,"src":"13874:7:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65431,"name":"uint256","nodeType":"ElementaryTypeName","src":"13874:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"13873:9:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"external"},{"id":65449,"nodeType":"FunctionDefinition","src":"13929:124:100","nodes":[],"body":{"id":65448,"nodeType":"Block","src":"14008:45:100","nodes":[],"statements":[{"expression":{"expression":{"id":65445,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"14025:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65446,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"14036:10:100","memberName":"groupCount","nodeType":"MemberAccess","referencedDeclaration":73030,"src":"14025:21:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":65444,"id":65447,"nodeType":"Return","src":"14018:28:100"}]},"baseFunctions":[69895],"functionSelector":"06545a93","implemented":true,"kind":"function","modifiers":[],"name":"getGroupCount","nameLocation":"13938:13:100","overrides":{"id":65441,"nodeType":"OverrideSpecifier","overrides":[{"id":65440,"name":"IController","nameLocations":["13977:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"13977:11:100"}],"src":"13968:21:100"},"parameters":{"id":65439,"nodeType":"ParameterList","parameters":[],"src":"13951:2:100"},"returnParameters":{"id":65444,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65443,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65449,"src":"13999:7:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65442,"name":"uint256","nodeType":"ElementaryTypeName","src":"13999:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"13998:9:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"external"},{"id":65465,"nodeType":"FunctionDefinition","src":"14059:148:100","nodes":[],"body":{"id":65464,"nodeType":"Block","src":"14154:53:100","nodes":[],"statements":[{"expression":{"baseExpression":{"expression":{"id":65459,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"14171:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65460,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"14182:6:100","memberName":"groups","nodeType":"MemberAccess","referencedDeclaration":73035,"src":"14171:17:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$","typeString":"mapping(uint256 => struct IController.Group storage ref)"}},"id":65462,"indexExpression":{"id":65461,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65451,"src":"14189:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"14171:29:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage","typeString":"struct IController.Group storage ref"}},"functionReturnParameters":65458,"id":65463,"nodeType":"Return","src":"14164:36:100"}]},"baseFunctions":[69903],"functionSelector":"ceb60654","implemented":true,"kind":"function","modifiers":[],"name":"getGroup","nameLocation":"14068:8:100","overrides":{"id":65454,"nodeType":"OverrideSpecifier","overrides":[{"id":65453,"name":"IController","nameLocations":["14118:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"14118:11:100"}],"src":"14109:21:100"},"parameters":{"id":65452,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65451,"mutability":"mutable","name":"groupIndex","nameLocation":"14085:10:100","nodeType":"VariableDeclaration","scope":65465,"src":"14077:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65450,"name":"uint256","nodeType":"ElementaryTypeName","src":"14077:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"14076:20:100"},"returnParameters":{"id":65458,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65457,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65465,"src":"14140:12:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group"},"typeName":{"id":65456,"nodeType":"UserDefinedTypeName","pathNode":{"id":65455,"name":"Group","nameLocations":["14140:5:100"],"nodeType":"IdentifierPath","referencedDeclaration":69776,"src":"14140:5:100"},"referencedDeclaration":69776,"src":"14140:5:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group"}},"visibility":"internal"}],"src":"14139:14:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"public"},{"id":65489,"nodeType":"FunctionDefinition","src":"14213:209:100","nodes":[],"body":{"id":65488,"nodeType":"Block","src":"14321:101:100","nodes":[],"statements":[{"expression":{"components":[{"expression":{"baseExpression":{"expression":{"id":65476,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"14339:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65477,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"14350:6:100","memberName":"groups","nodeType":"MemberAccess","referencedDeclaration":73035,"src":"14339:17:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$","typeString":"mapping(uint256 => struct IController.Group storage ref)"}},"id":65479,"indexExpression":{"id":65478,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65467,"src":"14357:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"14339:29:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage","typeString":"struct IController.Group storage ref"}},"id":65480,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"14369:9:100","memberName":"threshold","nodeType":"MemberAccess","referencedDeclaration":69758,"src":"14339:39:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"baseExpression":{"expression":{"id":65481,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"14380:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65482,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"14391:6:100","memberName":"groups","nodeType":"MemberAccess","referencedDeclaration":73035,"src":"14380:17:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$","typeString":"mapping(uint256 => struct IController.Group storage ref)"}},"id":65484,"indexExpression":{"id":65483,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65467,"src":"14398:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"14380:29:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage","typeString":"struct IController.Group storage ref"}},"id":65485,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"14410:4:100","memberName":"size","nodeType":"MemberAccess","referencedDeclaration":69756,"src":"14380:34:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":65486,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"14338:77:100","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_uint256_$","typeString":"tuple(uint256,uint256)"}},"functionReturnParameters":65475,"id":65487,"nodeType":"Return","src":"14331:84:100"}]},"baseFunctions":[69912],"functionSelector":"f49e0ba9","implemented":true,"kind":"function","modifiers":[],"name":"getGroupThreshold","nameLocation":"14222:17:100","overrides":{"id":65470,"nodeType":"OverrideSpecifier","overrides":[{"id":65469,"name":"IController","nameLocations":["14281:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"14281:11:100"}],"src":"14272:21:100"},"parameters":{"id":65468,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65467,"mutability":"mutable","name":"groupIndex","nameLocation":"14248:10:100","nodeType":"VariableDeclaration","scope":65489,"src":"14240:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65466,"name":"uint256","nodeType":"ElementaryTypeName","src":"14240:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"14239:20:100"},"returnParameters":{"id":65475,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65472,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65489,"src":"14303:7:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65471,"name":"uint256","nodeType":"ElementaryTypeName","src":"14303:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":65474,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65489,"src":"14312:7:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65473,"name":"uint256","nodeType":"ElementaryTypeName","src":"14312:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"14302:18:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"public"},{"id":65510,"nodeType":"FunctionDefinition","src":"14428:228:100","nodes":[],"body":{"id":65509,"nodeType":"Block","src":"14582:74:100","nodes":[],"statements":[{"expression":{"baseExpression":{"expression":{"baseExpression":{"expression":{"id":65501,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"14599:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65502,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"14610:6:100","memberName":"groups","nodeType":"MemberAccess","referencedDeclaration":73035,"src":"14599:17:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$","typeString":"mapping(uint256 => struct IController.Group storage ref)"}},"id":65504,"indexExpression":{"id":65503,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65491,"src":"14617:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"14599:29:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage","typeString":"struct IController.Group storage ref"}},"id":65505,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"14629:7:100","memberName":"members","nodeType":"MemberAccess","referencedDeclaration":69762,"src":"14599:37:100","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Member_$69783_storage_$dyn_storage","typeString":"struct IController.Member storage ref[] storage ref"}},"id":65507,"indexExpression":{"id":65506,"name":"memberIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65493,"src":"14637:11:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"14599:50:100","typeDescriptions":{"typeIdentifier":"t_struct$_Member_$69783_storage","typeString":"struct IController.Member storage ref"}},"functionReturnParameters":65500,"id":65508,"nodeType":"Return","src":"14592:57:100"}]},"baseFunctions":[69922],"functionSelector":"4d79a893","implemented":true,"kind":"function","modifiers":[],"name":"getMember","nameLocation":"14437:9:100","overrides":{"id":65496,"nodeType":"OverrideSpecifier","overrides":[{"id":65495,"name":"IController","nameLocations":["14533:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"14533:11:100"}],"src":"14524:21:100"},"parameters":{"id":65494,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65491,"mutability":"mutable","name":"groupIndex","nameLocation":"14455:10:100","nodeType":"VariableDeclaration","scope":65510,"src":"14447:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65490,"name":"uint256","nodeType":"ElementaryTypeName","src":"14447:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":65493,"mutability":"mutable","name":"memberIndex","nameLocation":"14475:11:100","nodeType":"VariableDeclaration","scope":65510,"src":"14467:19:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65492,"name":"uint256","nodeType":"ElementaryTypeName","src":"14467:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"14446:41:100"},"returnParameters":{"id":65500,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65499,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65510,"src":"14563:13:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Member_$69783_memory_ptr","typeString":"struct IController.Member"},"typeName":{"id":65498,"nodeType":"UserDefinedTypeName","pathNode":{"id":65497,"name":"Member","nameLocations":["14563:6:100"],"nodeType":"IdentifierPath","referencedDeclaration":69783,"src":"14563:6:100"},"referencedDeclaration":69783,"src":"14563:6:100","typeDescriptions":{"typeIdentifier":"t_struct$_Member_$69783_storage_ptr","typeString":"struct IController.Member"}},"visibility":"internal"}],"src":"14562:15:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"public"},{"id":65527,"nodeType":"FunctionDefinition","src":"14662:189:100","nodes":[],"body":{"id":65526,"nodeType":"Block","src":"14771:80:100","nodes":[],"statements":[{"expression":{"arguments":[{"id":65523,"name":"nodeAddress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65512,"src":"14832:11:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":65521,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"14788:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65522,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"14799:32:100","memberName":"getBelongingGroupByMemberAddress","nodeType":"MemberAccess","referencedDeclaration":73904,"src":"14788:43:100","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_address_$returns$_t_int256_$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,address) view returns (int256,int256)"}},"id":65524,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"14788:56:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"functionReturnParameters":65520,"id":65525,"nodeType":"Return","src":"14781:63:100"}]},"baseFunctions":[69932],"functionSelector":"3b6c00b0","implemented":true,"kind":"function","modifiers":[],"name":"getBelongingGroup","nameLocation":"14671:17:100","overrides":{"id":65515,"nodeType":"OverrideSpecifier","overrides":[{"id":65514,"name":"IController","nameLocations":["14733:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"14733:11:100"}],"src":"14724:21:100"},"parameters":{"id":65513,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65512,"mutability":"mutable","name":"nodeAddress","nameLocation":"14697:11:100","nodeType":"VariableDeclaration","scope":65527,"src":"14689:19:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":65511,"name":"address","nodeType":"ElementaryTypeName","src":"14689:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"14688:21:100"},"returnParameters":{"id":65520,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65517,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65527,"src":"14755:6:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":65516,"name":"int256","nodeType":"ElementaryTypeName","src":"14755:6:100","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"visibility":"internal"},{"constant":false,"id":65519,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65527,"src":"14763:6:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":65518,"name":"int256","nodeType":"ElementaryTypeName","src":"14763:6:100","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"visibility":"internal"}],"src":"14754:16:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"external"},{"id":65541,"nodeType":"FunctionDefinition","src":"14857:145:100","nodes":[],"body":{"id":65540,"nodeType":"Block","src":"14953:49:100","nodes":[],"statements":[{"expression":{"baseExpression":{"id":65536,"name":"_coordinators","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64422,"src":"14970:13:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_address_$","typeString":"mapping(uint256 => address)"}},"id":65538,"indexExpression":{"id":65537,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65529,"src":"14984:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"14970:25:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"functionReturnParameters":65535,"id":65539,"nodeType":"Return","src":"14963:32:100"}]},"baseFunctions":[69939],"functionSelector":"42424d6f","implemented":true,"kind":"function","modifiers":[],"name":"getCoordinator","nameLocation":"14866:14:100","overrides":{"id":65532,"nodeType":"OverrideSpecifier","overrides":[{"id":65531,"name":"IController","nameLocations":["14922:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"14922:11:100"}],"src":"14913:21:100"},"parameters":{"id":65530,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65529,"mutability":"mutable","name":"groupIndex","nameLocation":"14889:10:100","nodeType":"VariableDeclaration","scope":65541,"src":"14881:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65528,"name":"uint256","nodeType":"ElementaryTypeName","src":"14881:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"14880:20:100"},"returnParameters":{"id":65535,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65534,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65541,"src":"14944:7:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":65533,"name":"address","nodeType":"ElementaryTypeName","src":"14944:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"14943:9:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"public"},{"id":65549,"nodeType":"FunctionDefinition","src":"15008:92:100","nodes":[],"body":{"id":65548,"nodeType":"Block","src":"15065:35:100","nodes":[],"statements":[{"expression":{"id":65546,"name":"_lastOutput","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64427,"src":"15082:11:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":65545,"id":65547,"nodeType":"Return","src":"15075:18:100"}]},"baseFunctions":[69944],"functionSelector":"51a2b9a0","implemented":true,"kind":"function","modifiers":[],"name":"getLastOutput","nameLocation":"15017:13:100","parameters":{"id":65542,"nodeType":"ParameterList","parameters":[],"src":"15030:2:100"},"returnParameters":{"id":65545,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65544,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65549,"src":"15056:7:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65543,"name":"uint256","nodeType":"ElementaryTypeName","src":"15056:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"15055:9:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"external"},{"id":65605,"nodeType":"FunctionDefinition","src":"15192:451:100","nodes":[],"body":{"id":65604,"nodeType":"Block","src":"15352:291:100","nodes":[],"statements":[{"assignments":[65563],"declarations":[{"constant":false,"id":65563,"mutability":"mutable","name":"g","nameLocation":"15375:1:100","nodeType":"VariableDeclaration","scope":65604,"src":"15362:14:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group"},"typeName":{"id":65562,"nodeType":"UserDefinedTypeName","pathNode":{"id":65561,"name":"Group","nameLocations":["15362:5:100"],"nodeType":"IdentifierPath","referencedDeclaration":69776,"src":"15362:5:100"},"referencedDeclaration":69776,"src":"15362:5:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group"}},"visibility":"internal"}],"id":65568,"initialValue":{"baseExpression":{"expression":{"id":65564,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"15379:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65565,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"15390:6:100","memberName":"groups","nodeType":"MemberAccess","referencedDeclaration":73035,"src":"15379:17:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$","typeString":"mapping(uint256 => struct IController.Group storage ref)"}},"id":65567,"indexExpression":{"id":65566,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65552,"src":"15397:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"15379:29:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage","typeString":"struct IController.Group storage ref"}},"nodeType":"VariableDeclarationStatement","src":"15362:46:100"},{"body":{"id":65600,"nodeType":"Block","src":"15465:150:100","statements":[{"condition":{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":65587,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"baseExpression":{"expression":{"id":65581,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65563,"src":"15483:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65582,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"15485:7:100","memberName":"members","nodeType":"MemberAccess","referencedDeclaration":69762,"src":"15483:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Member_$69783_memory_ptr_$dyn_memory_ptr","typeString":"struct IController.Member memory[] memory"}},"id":65584,"indexExpression":{"id":65583,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65570,"src":"15493:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"15483:12:100","typeDescriptions":{"typeIdentifier":"t_struct$_Member_$69783_memory_ptr","typeString":"struct IController.Member memory"}},"id":65585,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"15496:13:100","memberName":"nodeIdAddress","nodeType":"MemberAccess","referencedDeclaration":69778,"src":"15483:26:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":65586,"name":"nodeIdAddress","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65554,"src":"15513:13:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"15483:43:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65599,"nodeType":"IfStatement","src":"15479:126:100","trueBody":{"id":65598,"nodeType":"Block","src":"15528:77:100","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":65596,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"expression":{"baseExpression":{"expression":{"id":65588,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65563,"src":"15553:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65589,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"15555:7:100","memberName":"members","nodeType":"MemberAccess","referencedDeclaration":69762,"src":"15553:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Member_$69783_memory_ptr_$dyn_memory_ptr","typeString":"struct IController.Member memory[] memory"}},"id":65591,"indexExpression":{"id":65590,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65570,"src":"15563:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"15553:12:100","typeDescriptions":{"typeIdentifier":"t_struct$_Member_$69783_memory_ptr","typeString":"struct IController.Member memory"}},"id":65592,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"15566:16:100","memberName":"partialPublicKey","nodeType":"MemberAccess","referencedDeclaration":69782,"src":"15553:29:100","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$4_memory_ptr","typeString":"uint256[4] memory"}},"id":65594,"indexExpression":{"hexValue":"30","id":65593,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"15583:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"15553:32:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"hexValue":"30","id":65595,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"15589:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"15553:37:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":65560,"id":65597,"nodeType":"Return","src":"15546:44:100"}]}}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":65577,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":65573,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65570,"src":"15438:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"expression":{"id":65574,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65563,"src":"15442:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65575,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"15444:7:100","memberName":"members","nodeType":"MemberAccess","referencedDeclaration":69762,"src":"15442:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Member_$69783_memory_ptr_$dyn_memory_ptr","typeString":"struct IController.Member memory[] memory"}},"id":65576,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"15452:6:100","memberName":"length","nodeType":"MemberAccess","src":"15442:16:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"15438:20:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65601,"initializationExpression":{"assignments":[65570],"declarations":[{"constant":false,"id":65570,"mutability":"mutable","name":"i","nameLocation":"15431:1:100","nodeType":"VariableDeclaration","scope":65601,"src":"15423:9:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65569,"name":"uint256","nodeType":"ElementaryTypeName","src":"15423:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":65572,"initialValue":{"hexValue":"30","id":65571,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"15435:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"15423:13:100"},"loopExpression":{"expression":{"id":65579,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"15460:3:100","subExpression":{"id":65578,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65570,"src":"15460:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":65580,"nodeType":"ExpressionStatement","src":"15460:3:100"},"nodeType":"ForStatement","src":"15418:197:100"},{"expression":{"hexValue":"66616c7365","id":65602,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"15631:5:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"false"},"functionReturnParameters":65560,"id":65603,"nodeType":"Return","src":"15624:12:100"}]},"baseFunctions":[69954],"documentation":{"id":65550,"nodeType":"StructuredDocumentation","src":"15106:81:100","text":"Check to see if a group has a partial public key registered for a given node."},"functionSelector":"c2db900b","implemented":true,"kind":"function","modifiers":[],"name":"isPartialKeyRegistered","nameLocation":"15201:22:100","overrides":{"id":65557,"nodeType":"OverrideSpecifier","overrides":[{"id":65556,"name":"IController","nameLocations":["15312:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"15312:11:100"}],"src":"15303:21:100"},"parameters":{"id":65555,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65552,"mutability":"mutable","name":"groupIndex","nameLocation":"15232:10:100","nodeType":"VariableDeclaration","scope":65605,"src":"15224:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65551,"name":"uint256","nodeType":"ElementaryTypeName","src":"15224:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":65554,"mutability":"mutable","name":"nodeIdAddress","nameLocation":"15252:13:100","nodeType":"VariableDeclaration","scope":65605,"src":"15244:21:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":65553,"name":"address","nodeType":"ElementaryTypeName","src":"15244:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"15223:43:100"},"returnParameters":{"id":65560,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65559,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":65605,"src":"15342:4:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":65558,"name":"bool","nodeType":"ElementaryTypeName","src":"15342:4:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"15341:6:100"},"scope":65744,"stateMutability":"view","virtual":false,"visibility":"public"},{"id":65743,"nodeType":"FunctionDefinition","src":"15708:1110:100","nodes":[],"body":{"id":65742,"nodeType":"Block","src":"15762:1056:100","nodes":[],"statements":[{"expression":{"arguments":[{"id":65613,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65607,"src":"15801:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"id":65610,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"15772:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65612,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"15783:17:100","memberName":"prepareGroupEvent","nodeType":"MemberAccess","referencedDeclaration":73851,"src":"15772:28:100","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$returns$__$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$","typeString":"function (struct GroupLib.GroupData storage pointer,uint256)"}},"id":65614,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"15772:40:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65615,"nodeType":"ExpressionStatement","src":"15772:40:100"},{"assignments":[65618],"declarations":[{"constant":false,"id":65618,"mutability":"mutable","name":"g","nameLocation":"15836:1:100","nodeType":"VariableDeclaration","scope":65742,"src":"15823:14:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group"},"typeName":{"id":65617,"nodeType":"UserDefinedTypeName","pathNode":{"id":65616,"name":"Group","nameLocations":["15823:5:100"],"nodeType":"IdentifierPath","referencedDeclaration":69776,"src":"15823:5:100"},"referencedDeclaration":69776,"src":"15823:5:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage_ptr","typeString":"struct IController.Group"}},"visibility":"internal"}],"id":65623,"initialValue":{"baseExpression":{"expression":{"id":65619,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"15840:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65620,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"15851:6:100","memberName":"groups","nodeType":"MemberAccess","referencedDeclaration":73035,"src":"15840:17:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$","typeString":"mapping(uint256 => struct IController.Group storage ref)"}},"id":65622,"indexExpression":{"id":65621,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65607,"src":"15858:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"15840:29:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_storage","typeString":"struct IController.Group storage ref"}},"nodeType":"VariableDeclarationStatement","src":"15823:46:100"},{"assignments":[65626],"declarations":[{"constant":false,"id":65626,"mutability":"mutable","name":"coordinator","nameLocation":"15951:11:100","nodeType":"VariableDeclaration","scope":65742,"src":"15939:23:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"},"typeName":{"id":65625,"nodeType":"UserDefinedTypeName","pathNode":{"id":65624,"name":"Coordinator","nameLocations":["15939:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":67636,"src":"15939:11:100"},"referencedDeclaration":67636,"src":"15939:11:100","typeDescriptions":{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"}},"visibility":"internal"}],"id":65627,"nodeType":"VariableDeclarationStatement","src":"15939:23:100"},{"expression":{"id":65637,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":65628,"name":"coordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65626,"src":"15972:11:100","typeDescriptions":{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"expression":{"id":65632,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65618,"src":"16002:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65633,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16004:9:100","memberName":"threshold","nodeType":"MemberAccess","referencedDeclaration":69758,"src":"16002:11:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65634,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"16015:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65635,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16023:23:100","memberName":"defaultDkgPhaseDuration","nodeType":"MemberAccess","referencedDeclaration":64435,"src":"16015:31:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":65631,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"15986:15:100","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_Coordinator_$67636_$","typeString":"function (uint256,uint256) returns (contract Coordinator)"},"typeName":{"id":65630,"nodeType":"UserDefinedTypeName","pathNode":{"id":65629,"name":"Coordinator","nameLocations":["15990:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":67636,"src":"15990:11:100"},"referencedDeclaration":67636,"src":"15990:11:100","typeDescriptions":{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"}}},"id":65636,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"15986:61:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"}},"src":"15972:75:100","typeDescriptions":{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"}},"id":65638,"nodeType":"ExpressionStatement","src":"15972:75:100"},{"expression":{"id":65646,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":65639,"name":"_coordinators","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64422,"src":"16057:13:100","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint256_$_t_address_$","typeString":"mapping(uint256 => address)"}},"id":65641,"indexExpression":{"id":65640,"name":"groupIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65607,"src":"16071:10:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"16057:25:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"id":65644,"name":"coordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65626,"src":"16093:11:100","typeDescriptions":{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"}],"id":65643,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"16085:7:100","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":65642,"name":"address","nodeType":"ElementaryTypeName","src":"16085:7:100","typeDescriptions":{}}},"id":65645,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"16085:20:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"16057:48:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65647,"nodeType":"ExpressionStatement","src":"16057:48:100"},{"assignments":[65652],"declarations":[{"constant":false,"id":65652,"mutability":"mutable","name":"groupNodes","nameLocation":"16167:10:100","nodeType":"VariableDeclaration","scope":65742,"src":"16150:27:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":65650,"name":"address","nodeType":"ElementaryTypeName","src":"16150:7:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65651,"nodeType":"ArrayTypeName","src":"16150:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":65659,"initialValue":{"arguments":[{"expression":{"id":65656,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65618,"src":"16194:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65657,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16196:4:100","memberName":"size","nodeType":"MemberAccess","referencedDeclaration":69756,"src":"16194:6:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":65655,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"16180:13:100","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":65653,"name":"address","nodeType":"ElementaryTypeName","src":"16184:7:100","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65654,"nodeType":"ArrayTypeName","src":"16184:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":65658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"16180:21:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"16150:51:100"},{"assignments":[65664],"declarations":[{"constant":false,"id":65664,"mutability":"mutable","name":"groupKeys","nameLocation":"16226:9:100","nodeType":"VariableDeclaration","scope":65742,"src":"16211:24:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_bytes_memory_ptr_$dyn_memory_ptr","typeString":"bytes[]"},"typeName":{"baseType":{"id":65662,"name":"bytes","nodeType":"ElementaryTypeName","src":"16211:5:100","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"id":65663,"nodeType":"ArrayTypeName","src":"16211:7:100","typeDescriptions":{"typeIdentifier":"t_array$_t_bytes_storage_$dyn_storage_ptr","typeString":"bytes[]"}},"visibility":"internal"}],"id":65671,"initialValue":{"arguments":[{"expression":{"id":65668,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65618,"src":"16250:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65669,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16252:4:100","memberName":"size","nodeType":"MemberAccess","referencedDeclaration":69756,"src":"16250:6:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":65667,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"16238:11:100","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes_memory_ptr_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (bytes memory[] memory)"},"typeName":{"baseType":{"id":65665,"name":"bytes","nodeType":"ElementaryTypeName","src":"16242:5:100","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"id":65666,"nodeType":"ArrayTypeName","src":"16242:7:100","typeDescriptions":{"typeIdentifier":"t_array$_t_bytes_storage_$dyn_storage_ptr","typeString":"bytes[]"}}},"id":65670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"16238:19:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_bytes_memory_ptr_$dyn_memory_ptr","typeString":"bytes memory[] memory"}},"nodeType":"VariableDeclarationStatement","src":"16211:46:100"},{"body":{"id":65713,"nodeType":"Block","src":"16305:301:100","statements":[{"expression":{"id":65691,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":65683,"name":"groupNodes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65652,"src":"16319:10:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":65685,"indexExpression":{"id":65684,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65673,"src":"16330:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"16319:13:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"baseExpression":{"expression":{"id":65686,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65618,"src":"16335:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65687,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16337:7:100","memberName":"members","nodeType":"MemberAccess","referencedDeclaration":69762,"src":"16335:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Member_$69783_memory_ptr_$dyn_memory_ptr","typeString":"struct IController.Member memory[] memory"}},"id":65689,"indexExpression":{"id":65688,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65673,"src":"16345:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"16335:12:100","typeDescriptions":{"typeIdentifier":"t_struct$_Member_$69783_memory_ptr","typeString":"struct IController.Member memory"}},"id":65690,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16348:13:100","memberName":"nodeIdAddress","nodeType":"MemberAccess","referencedDeclaration":69778,"src":"16335:26:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"16319:42:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":65692,"nodeType":"ExpressionStatement","src":"16319:42:100"},{"assignments":[65694],"declarations":[{"constant":false,"id":65694,"mutability":"mutable","name":"dkgPublicKey","nameLocation":"16429:12:100","nodeType":"VariableDeclaration","scope":65713,"src":"16416:25:100","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":65693,"name":"bytes","nodeType":"ElementaryTypeName","src":"16416:5:100","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"internal"}],"id":65706,"initialValue":{"arguments":[{"expression":{"baseExpression":{"expression":{"id":65700,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65618,"src":"16527:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65701,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16529:7:100","memberName":"members","nodeType":"MemberAccess","referencedDeclaration":69762,"src":"16527:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Member_$69783_memory_ptr_$dyn_memory_ptr","typeString":"struct IController.Member memory[] memory"}},"id":65703,"indexExpression":{"id":65702,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65673,"src":"16537:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"16527:12:100","typeDescriptions":{"typeIdentifier":"t_struct$_Member_$69783_memory_ptr","typeString":"struct IController.Member memory"}},"id":65704,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16540:13:100","memberName":"nodeIdAddress","nodeType":"MemberAccess","referencedDeclaration":69778,"src":"16527:26:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"arguments":[{"expression":{"id":65696,"name":"_config","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64418,"src":"16474:7:100","typeDescriptions":{"typeIdentifier":"t_struct$_ControllerConfig_$64438_storage","typeString":"struct Controller.ControllerConfig storage ref"}},"id":65697,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16482:27:100","memberName":"nodeRegistryContractAddress","nodeType":"MemberAccess","referencedDeclaration":64429,"src":"16474:35:100","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":65695,"name":"INodeRegistry","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70293,"src":"16460:13:100","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_INodeRegistry_$70293_$","typeString":"type(contract INodeRegistry)"}},"id":65698,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"16460:50:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_INodeRegistry_$70293","typeString":"contract INodeRegistry"}},"id":65699,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"16511:15:100","memberName":"getDKGPublicKey","nodeType":"MemberAccess","referencedDeclaration":70262,"src":"16460:66:100","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_bytes_memory_ptr_$","typeString":"function (address) view external returns (bytes memory)"}},"id":65705,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"16460:94:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"nodeType":"VariableDeclarationStatement","src":"16416:138:100"},{"expression":{"id":65711,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":65707,"name":"groupKeys","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65664,"src":"16568:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_bytes_memory_ptr_$dyn_memory_ptr","typeString":"bytes memory[] memory"}},"id":65709,"indexExpression":{"id":65708,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65673,"src":"16578:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"16568:12:100","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":65710,"name":"dkgPublicKey","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65694,"src":"16583:12:100","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"src":"16568:27:100","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"id":65712,"nodeType":"ExpressionStatement","src":"16568:27:100"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":65679,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":65676,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65673,"src":"16288:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"id":65677,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65618,"src":"16292:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65678,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16294:4:100","memberName":"size","nodeType":"MemberAccess","referencedDeclaration":69756,"src":"16292:6:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"16288:10:100","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":65714,"initializationExpression":{"assignments":[65673],"declarations":[{"constant":false,"id":65673,"mutability":"mutable","name":"i","nameLocation":"16281:1:100","nodeType":"VariableDeclaration","scope":65714,"src":"16273:9:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65672,"name":"uint256","nodeType":"ElementaryTypeName","src":"16273:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":65675,"initialValue":{"hexValue":"30","id":65674,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"16285:1:100","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"16273:13:100"},"loopExpression":{"expression":{"id":65681,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"16300:3:100","subExpression":{"id":65680,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65673,"src":"16300:1:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":65682,"nodeType":"ExpressionStatement","src":"16300:3:100"},"nodeType":"ForStatement","src":"16268:338:100"},{"expression":{"arguments":[{"id":65718,"name":"groupNodes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65652,"src":"16639:10:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"id":65719,"name":"groupKeys","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65664,"src":"16651:9:100","typeDescriptions":{"typeIdentifier":"t_array$_t_bytes_memory_ptr_$dyn_memory_ptr","typeString":"bytes memory[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_array$_t_bytes_memory_ptr_$dyn_memory_ptr","typeString":"bytes memory[] memory"}],"expression":{"id":65715,"name":"coordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65626,"src":"16616:11:100","typeDescriptions":{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"}},"id":65717,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"16628:10:100","memberName":"initialize","nodeType":"MemberAccess","referencedDeclaration":67275,"src":"16616:22:100","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_bytes_memory_ptr_$dyn_memory_ptr_$returns$__$","typeString":"function (address[] memory,bytes memory[] memory) external"}},"id":65720,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"16616:45:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65721,"nodeType":"ExpressionStatement","src":"16616:45:100"},{"eventCall":{"arguments":[{"expression":{"id":65723,"name":"_groupData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64425,"src":"16698:10:100","typeDescriptions":{"typeIdentifier":"t_struct$_GroupData_$73042_storage","typeString":"struct GroupLib.GroupData storage ref"}},"id":65724,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16709:5:100","memberName":"epoch","nodeType":"MemberAccess","referencedDeclaration":73028,"src":"16698:16:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65725,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65618,"src":"16716:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65726,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16718:5:100","memberName":"index","nodeType":"MemberAccess","referencedDeclaration":69752,"src":"16716:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65727,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65618,"src":"16725:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65728,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16727:5:100","memberName":"epoch","nodeType":"MemberAccess","referencedDeclaration":69754,"src":"16725:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65729,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65618,"src":"16734:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65730,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16736:4:100","memberName":"size","nodeType":"MemberAccess","referencedDeclaration":69756,"src":"16734:6:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"expression":{"id":65731,"name":"g","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65618,"src":"16742:1:100","typeDescriptions":{"typeIdentifier":"t_struct$_Group_$69776_memory_ptr","typeString":"struct IController.Group memory"}},"id":65732,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberLocation":"16744:9:100","memberName":"threshold","nodeType":"MemberAccess","referencedDeclaration":69758,"src":"16742:11:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":65733,"name":"groupNodes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65652,"src":"16755:10:100","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"expression":{"id":65734,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-4,"src":"16767:5:100","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":65735,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"16773:6:100","memberName":"number","nodeType":"MemberAccess","src":"16767:12:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"arguments":[{"id":65738,"name":"coordinator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":65626,"src":"16789:11:100","typeDescriptions":{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Coordinator_$67636","typeString":"contract Coordinator"}],"id":65737,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"16781:7:100","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":65736,"name":"address","nodeType":"ElementaryTypeName","src":"16781:7:100","typeDescriptions":{}}},"id":65739,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"16781:20:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_address","typeString":"address"}],"id":65722,"name":"DkgTask","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64475,"src":"16677:7:100","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_address_$returns$__$","typeString":"function (uint256,uint256,uint256,uint256,uint256,address[] memory,uint256,address)"}},"id":65740,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"16677:134:100","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":65741,"nodeType":"EmitStatement","src":"16672:139:100"}]},"implemented":true,"kind":"function","modifiers":[],"name":"_emitGroupEvent","nameLocation":"15717:15:100","parameters":{"id":65608,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65607,"mutability":"mutable","name":"groupIndex","nameLocation":"15741:10:100","nodeType":"VariableDeclaration","scope":65743,"src":"15733:18:100","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":65606,"name":"uint256","nodeType":"ElementaryTypeName","src":"15733:7:100","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"15732:20:100"},"returnParameters":{"id":65609,"nodeType":"ParameterList","parameters":[],"src":"15762:0:100"},"scope":65744,"stateMutability":"nonpayable","virtual":false,"visibility":"internal"}],"abstract":false,"baseContracts":[{"baseName":{"id":64404,"name":"UUPSUpgradeable","nameLocations":["742:15:100"],"nodeType":"IdentifierPath","referencedDeclaration":53423,"src":"742:15:100"},"id":64405,"nodeType":"InheritanceSpecifier","src":"742:15:100"},{"baseName":{"id":64406,"name":"IController","nameLocations":["759:11:100"],"nodeType":"IdentifierPath","referencedDeclaration":69955,"src":"759:11:100"},"id":64407,"nodeType":"InheritanceSpecifier","src":"759:11:100"},{"baseName":{"id":64408,"name":"IControllerOwner","nameLocations":["772:16:100"],"nodeType":"IdentifierPath","referencedDeclaration":70144,"src":"772:16:100"},"id":64409,"nodeType":"InheritanceSpecifier","src":"772:16:100"},{"baseName":{"id":64410,"name":"OwnableUpgradeable","nameLocations":["790:18:100"],"nodeType":"IdentifierPath","referencedDeclaration":52751,"src":"790:18:100"},"id":64411,"nodeType":"InheritanceSpecifier","src":"790:18:100"}],"canonicalName":"Controller","contractDependencies":[67636],"contractKind":"contract","fullyImplemented":true,"linearizedBaseContracts":[65744,52751,53804,70144,69955,53423,53107,52772,52782,53286],"name":"Controller","nameLocation":"728:10:100","scope":65745,"usedErrors":[64479,64483,64487,64493,64501,64507,64513,64515,64517,64519,64521,70475,70477]}],"license":"MIT"},"id":100} \ No newline at end of file +{ + "abi": [ + { "type": "constructor", "inputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "addReward", + "inputs": [ + { "name": "nodes", "type": "address[]", "internalType": "address[]" }, + { "name": "ethAmount", "type": "uint256", "internalType": "uint256" }, + { "name": "arpaAmount", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "commitDkg", + "inputs": [ + { + "name": "params", + "type": "tuple", + "internalType": "struct IController.CommitDkgParams", + "components": [ + { + "name": "groupIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "groupEpoch", + "type": "uint256", + "internalType": "uint256" + }, + { "name": "publicKey", "type": "bytes", "internalType": "bytes" }, + { + "name": "partialPublicKey", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "disqualifiedNodes", + "type": "address[]", + "internalType": "address[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getBelongingGroup", + "inputs": [ + { "name": "nodeAddress", "type": "address", "internalType": "address" } + ], + "outputs": [ + { "name": "", "type": "int256", "internalType": "int256" }, + { "name": "", "type": "int256", "internalType": "int256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getControllerConfig", + "inputs": [], + "outputs": [ + { + "name": "nodeRegistryContractAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "adapterContractAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "disqualifiedNodePenaltyAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "defaultNumberOfCommitters", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "defaultDkgPhaseDuration", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "groupMaxCapacity", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "idealNumberOfGroups", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "dkgPostProcessReward", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getCoordinator", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGroup", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct IController.Group", + "components": [ + { "name": "index", "type": "uint256", "internalType": "uint256" }, + { "name": "epoch", "type": "uint256", "internalType": "uint256" }, + { "name": "size", "type": "uint256", "internalType": "uint256" }, + { + "name": "threshold", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "members", + "type": "tuple[]", + "internalType": "struct IController.Member[]", + "components": [ + { + "name": "nodeIdAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "partialPublicKey", + "type": "uint256[4]", + "internalType": "uint256[4]" + } + ] + }, + { + "name": "committers", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "commitCacheList", + "type": "tuple[]", + "internalType": "struct IController.CommitCache[]", + "components": [ + { + "name": "nodeIdAddress", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "commitResult", + "type": "tuple", + "internalType": "struct IController.CommitResult", + "components": [ + { + "name": "groupEpoch", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicKey", + "type": "uint256[4]", + "internalType": "uint256[4]" + }, + { + "name": "disqualifiedNodes", + "type": "address[]", + "internalType": "address[]" + } + ] + } + ] + }, + { + "name": "isStrictlyMajorityConsensusReached", + "type": "bool", + "internalType": "bool" + }, + { + "name": "publicKey", + "type": "uint256[4]", + "internalType": "uint256[4]" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGroupCount", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGroupEpoch", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGroupThreshold", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [ + { "name": "", "type": "uint256", "internalType": "uint256" }, + { "name": "", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getLastOutput", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMember", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" }, + { "name": "memberIndex", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct IController.Member", + "components": [ + { + "name": "nodeIdAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "partialPublicKey", + "type": "uint256[4]", + "internalType": "uint256[4]" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getValidGroupIndices", + "inputs": [], + "outputs": [ + { "name": "", "type": "uint256[]", "internalType": "uint256[]" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { "name": "lastOutput", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isPartialKeyRegistered", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" }, + { + "name": "nodeIdAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nodeJoin", + "inputs": [ + { + "name": "nodeIdAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "nodeLeave", + "inputs": [ + { + "name": "nodeIdAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "nodeWithdrawETH", + "inputs": [ + { "name": "recipient", "type": "address", "internalType": "address" }, + { "name": "ethAmount", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "postProcessDkg", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" }, + { "name": "groupEpoch", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "proxiableUUID", + "inputs": [], + "outputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setControllerConfig", + "inputs": [ + { + "name": "nodeRegistryContractAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "adapterContractAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "disqualifiedNodePenaltyAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "defaultNumberOfCommitters", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "defaultDkgPhaseDuration", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "groupMaxCapacity", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "idealNumberOfGroups", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "dkgPostProcessReward", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLastOutput", + "inputs": [ + { "name": "lastOutput", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { "name": "newOwner", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeTo", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { "name": "data", "type": "bytes", "internalType": "bytes" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ControllerConfigSet", + "inputs": [ + { + "name": "nodeRegistryContractAddress", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "adapterContractAddress", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "disqualifiedNodePenaltyAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "defaultNumberOfCommitters", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "defaultDkgPhaseDuration", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "groupMaxCapacity", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "idealNumberOfGroups", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "dkgPostProcessReward", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DkgTask", + "inputs": [ + { + "name": "globalEpoch", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "groupIndex", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "groupEpoch", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "size", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "threshold", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "members", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "assignmentBlockHeight", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "coordinatorAddress", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { "type": "error", "name": "CannotLeaveGroupDuringDkg", "inputs": [] }, + { + "type": "error", + "name": "CoordinatorNotFound", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" } + ] + }, + { + "type": "error", + "name": "DkgNotInProgress", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" } + ] + }, + { + "type": "error", + "name": "DkgStillInProgress", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" }, + { "name": "phase", "type": "int8", "internalType": "int8" } + ] + }, + { "type": "error", "name": "DuplicatedDisqualifiedNode", "inputs": [] }, + { + "type": "error", + "name": "EpochMismatch", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" }, + { + "name": "inputGroupEpoch", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "currentGroupEpoch", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "GroupNotExist", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" } + ] + }, + { "type": "error", "name": "InvalidPartialPublicKey", "inputs": [] }, + { "type": "error", "name": "InvalidPublicKey", "inputs": [] }, + { + "type": "error", + "name": "NodeNotInGroup", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" }, + { + "name": "nodeIdAddress", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "PartialKeyAlreadyRegistered", + "inputs": [ + { "name": "groupIndex", "type": "uint256", "internalType": "uint256" }, + { + "name": "nodeIdAddress", + "type": "address", + "internalType": "address" + } + ] + }, + { "type": "error", "name": "SenderNotAdapter", "inputs": [] }, + { "type": "error", "name": "SenderNotNodeRegistry", "inputs": [] } + ], + "bytecode": { + "object": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e7565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000e5576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051615ae26200011f60003960008181610de201528181610e2501528181610ffd0152818161104001526110dc0152615ae26000f3fe608060405260043610620001c35760003560e01c80638da5cb5b11620000f3578063e37eb96c1162000095578063f2fde38b116200006c578063f2fde38b146200056c578063f3df08021462000591578063f49e0ba914620005b6578063fe4b84df14620005f257600080fd5b8063e37eb96c14620004fd578063ed157c3f1462000522578063f1d49f6b146200054757600080fd5b8063c2db900b11620000ca578063c2db900b1462000426578063ceb60654146200045c578063d11b8e68146200049057600080fd5b80638da5cb5b14620003ba578063914eb34d14620003da578063b330a0fd14620003ff57600080fd5b806342424d6f116200016957806351a2b9a0116200014057806351a2b9a0146200035c57806352d1902d1462000373578063715018a6146200038b5780637ee49cfd14620003a357600080fd5b806342424d6f14620002be5780634d79a89314620003115780634f1ef286146200034557600080fd5b806335fe4a3f116200019e57806335fe4a3f14620002395780633659cfe6146200025e5780633b6c00b0146200028357600080fd5b806306545a9314620001c85780630ad98f6a14620001ed5780630bf9c5c61462000214575b600080fd5b348015620001d557600080fd5b5060d0545b6040519081526020015b60405180910390f35b348015620001fa57600080fd5b50620002126200020c36600462003658565b62000617565b005b3480156200022157600080fd5b50620002126200023336600462003687565b620006af565b3480156200024657600080fd5b506200021262000258366004620036aa565b62000c01565b3480156200026b57600080fd5b50620002126200027d366004620036aa565b62000dd8565b3480156200029057600080fd5b50620002a8620002a2366004620036aa565b62000ec3565b60408051928352602083019190915201620001e4565b348015620002cb57600080fd5b50620002f8620002dd366004620036ca565b600090815260ce60205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001620001e4565b3480156200031e57600080fd5b50620003366200033036600462003687565b62000f56565b604051620001e491906200372a565b620002126200035636600462003837565b62000ff3565b3480156200036957600080fd5b5060d554620001da565b3480156200038057600080fd5b50620001da620010cf565b3480156200039857600080fd5b506200021262001185565b348015620003b057600080fd5b5060cf54620001da565b348015620003c757600080fd5b506097546001600160a01b0316620002f8565b348015620003e757600080fd5b5062000212620003f93660046200392c565b6200119d565b3480156200040c57600080fd5b506200041762001238565b604051620001e491906200397e565b3480156200043357600080fd5b506200044b62000445366004620039c4565b620012bb565b6040519015158152602001620001e4565b3480156200046957600080fd5b50620004816200047b366004620036ca565b62001687565b604051620001e4919062003b24565b3480156200049d57600080fd5b5060c95460ca5460cb5460d45460cc5460d35460d25460cd54604080516001600160a01b03998a168152989097166020890152958701949094526060860192909252608085015260a084015260c083015260e082015261010001620001e4565b3480156200050a57600080fd5b50620002126200051c36600462003be2565b620019a5565b3480156200052f57600080fd5b50620001da62000541366004620036aa565b620023f0565b3480156200055457600080fd5b50620002126200056636600462003cb9565b62002500565b3480156200057957600080fd5b50620002126200058b366004620036aa565b62002663565b3480156200059e57600080fd5b5062000212620005b0366004620036ca565b620026df565b348015620005c357600080fd5b50620002a8620005d5366004620036ca565b600090815260d16020526040902060038101546002909101549091565b348015620005ff57600080fd5b506200021262000611366004620036ca565b62002710565b60c9546001600160a01b031633146200064357604051630e2c730d60e41b815260040160405180910390fd5b60ca5460405163056cc7b560e11b81526001600160a01b0384811660048301526024820184905290911690630ad98f6a90604401600060405180830381600087803b1580156200069257600080fd5b505af1158015620006a7573d6000803e3d6000fd5b505050505050565b60d0548210620006da57604051637f6efcb560e11b8152600481018390526024015b60405180910390fd5b6040516358914d0360e01b815260cf60048201526024810183905233604482015273__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562000738573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200075e919062003d29565b19620007875760405163eb51f5f960e01b815260048101839052336024820152604401620006d1565b600082815260d16020526040902060018101548214620007d257600181015460405163048b63c360e11b815260048101859052602481018490526044810191909152606401620006d1565b600083815260ce60205260409020546001600160a01b03166200080c57604051635291bbcf60e01b815260048101849052602401620006d1565b600083815260ce602090815260409182902054825163221f951160e01b815292516001600160a01b0390911692839263221f9511926004808401938290030181865afa15801562000861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000887919062003d43565b60000b600019146200091f5783816001600160a01b031663221f95116040518163ffffffff1660e01b8152600401602060405180830381865afa158015620008d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008f9919062003d43565b60405163f7c06f9160e01b8152600481019290925260000b6024820152604401620006d1565b806001600160a01b0316639cb8a26a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200095b57600080fd5b505af115801562000970573d6000803e3d6000fd5b505050600085815260ce6020526040902080546001600160a01b031916905550600782015460ff1662000b455760d554604051630295316d60e51b815260cf6004820152602481018690526044810191909152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__906352a62da090606401600060405180830381865af415801562000a05573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000a2f919081019062003e37565b9150915060005b825181101562000af75760c95483516001600160a01b0390911690638ed470089085908490811062000a6c5762000a6c62003e98565b602090810291909101015160cb546040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260006044820152606401600060405180830381600087803b15801562000ac857600080fd5b505af115801562000add573d6000803e3d6000fd5b50505050808062000aee9062003ec4565b91505062000a36565b5060005b815181101562000b415762000b2c82828151811062000b1e5762000b1e62003e98565b60200260200101516200282f565b8062000b388162003ec4565b91505062000afb565b5050505b60408051600180825281830190925260009160208083019080368337019050509050338160008151811062000b7e5762000b7e62003e98565b6001600160a01b03928316602091820292909201015260c95460cd5460405163914eb34d60e01b8152919092169163914eb34d9162000bc69185916000919060040162003ee0565b600060405180830381600087803b15801562000be157600080fd5b505af115801562000bf6573d6000803e3d6000fd5b505050505050505050565b60c9546001600160a01b0316331462000c2d57604051630e2c730d60e41b815260040160405180910390fd5b60405163787c576760e01b815260cf60048201526001600160a01b0382166024820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__9063787c5767906044016040805180830381865af415801562000c91573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000cb7919062003f07565b91509150816000191462000dd357600082815260ce60205260409020546001600160a01b03161562000cfc5760405163cccf9bf160e01b815260040160405180910390fd5b60d55460405163cd21da9960e01b815260cf60048201526024810184905260448101839052606481019190915260009073__$99f6e31d9157e72684c1fb13c20fb01510$__9063cd21da9990608401600060405180830381865af415801562000d69573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000d93919081019062003f2c565b905060005b815181101562000dd05762000dbb82828151811062000b1e5762000b1e62003e98565b8062000dc78162003ec4565b91505062000d98565b50505b505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300362000e235760405162461bcd60e51b8152600401620006d19062003f65565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031662000e6e60008051602062005a66833981519152546001600160a01b031690565b6001600160a01b03161462000e975760405162461bcd60e51b8152600401620006d19062003fb1565b62000ea28162002e66565b6040805160008082526020820190925262000ec09183919062002e70565b50565b60405163787c576760e01b815260cf60048201526001600160a01b0382166024820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__9063787c5767906044016040805180830381865af415801562000f27573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f4d919062003f07565b91509150915091565b62000f606200344e565b600083815260d16020526040902060040180548390811062000f865762000f8662003e98565b6000918252602091829020604080518082018252600590930290910180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b81548152602001906001019080831162000fcd5750505050508152505090505b92915050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036200103e5760405162461bcd60e51b8152600401620006d19062003f65565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200108960008051602062005a66833981519152546001600160a01b031690565b6001600160a01b031614620010b25760405162461bcd60e51b8152600401620006d19062003fb1565b620010bd8262002e66565b620010cb8282600162002e70565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620011715760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401620006d1565b5060008051602062005a6683398151915290565b6200118f62002fe8565b6200119b600062003044565b565b60ca546001600160a01b03163314620011c95760405163469666c560e01b815260040160405180910390fd5b60c95460405163914eb34d60e01b81526001600160a01b039091169063914eb34d90620011ff9086908690869060040162003ee0565b600060405180830381600087803b1580156200121a57600080fd5b505af11580156200122f573d6000803e3d6000fd5b50505050505050565b604051631c2da66560e31b815260cf600482015260609073__$99f6e31d9157e72684c1fb13c20fb01510$__9063e16d332890602401600060405180830381865af41580156200128c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620012b6919081019062003f2c565b905090565b600082815260d160209081526040808320815161012081018352815481526001820154818501526002820154818401526003820154606082015260048201805484518187028101870190955280855286959294608086019390929190879084015b82821015620013985760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b8154815260200190600101908083116200136b57505050505081525050815260200190600101906200131c565b50505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015620013fb57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620013dc575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b8282101562001579578382906000526020600020906007020160405180604001604052908160008201805480602002602001604051908101604052809291908181526020018280548015620014a857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162001489575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b815481526020019060010190808311620014e45750505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200155c57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200153d575b505050505081525050815250508152602001906001019062001429565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b815481526020019060010190808311620015ac57505050505081525050905060005b8160800151518110156200167c57836001600160a01b031682608001518281518110620015ff57620015ff62003e98565b6020026020010151600001516001600160a01b03160362001667578160800151818151811062001633576200163362003e98565b60200260200101516020015160006004811062001654576200165462003e98565b6020020151600014159250505062000fed565b80620016738162003ec4565b915050620015ce565b506000949350505050565b6200169162003478565b600082815260d1602090815260408083208151610120810183528154815260018201548185015260028201548184015260038201546060820152600482018054845181870281018701909552808552919592946080870194939192919084015b828210156200176d5760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311620017405750505050508152505081526020019060010190620016f1565b50505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015620017d057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620017b1575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156200194e5783829060005260206000209060070201604051806040016040529081600082018054806020026020016040519081016040528092919081815260200182805480156200187d57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200185e575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b815481526020019060010190808311620018b95750505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200193157602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162001912575b5050505050815250508152505081526020019060010190620017fe565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b81548152602001906001019080831162001981575050505050815250509050919050565b60d054815110620019d0578051604051637f6efcb560e11b81526004810191909152602401620006d1565b8051600090815260ce60205260409020546001600160a01b031662001a0f578051604051635291bbcf60e01b81526004810191909152602401620006d1565b8051600090815260ce602090815260409182902054825163221f951160e01b815292516001600160a01b0390911692839263221f9511926004808401938290030181865afa15801562001a66573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a8c919062003d43565b60000b1962001ab55781516040516343609fe160e01b81526004810191909152602401620006d1565b8151600090815260d16020908152604090912060018101549184015190911462001b105782516020840151600183015460405163048b63c360e11b8152600481019390935260248301919091526044820152606401620006d1565b82516040516358914d0360e01b815260cf6004820152602481019190915233604482015273__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562001b71573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001b97919062003d29565b1962001bc357825160405163eb51f5f960e01b81526004810191909152336024820152604401620006d1565b825162001bd19033620012bb565b1562001bfd57825160405163173ca10960e31b81526004810191909152336024820152604401620006d1565b60608301516040516316f6db8160e01b815260009173__$34d23ddaee48904c6c566425acbfa0fc0e$__916316f6db819162001c3c9160040162004051565b608060405180830381865af415801562001c5a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001c80919062004066565b604051636fda2c7960e01b815290915073__$34d23ddaee48904c6c566425acbfa0fc0e$__90636fda2c799062001cbc908490600401620040ec565b602060405180830381865af415801562001cda573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001d00919062004112565b62001d1e57604051631886185760e01b815260040160405180910390fd5b60408085015190516316f6db8160e01b815260009173__$34d23ddaee48904c6c566425acbfa0fc0e$__916316f6db819162001d5d9160040162004051565b608060405180830381865af415801562001d7b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001da1919062004066565b604051636fda2c7960e01b815290915073__$34d23ddaee48904c6c566425acbfa0fc0e$__90636fda2c799062001ddd908490600401620040ec565b602060405180830381865af415801562001dfb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001e21919062004112565b62001e3f5760405163145a1fdd60e31b815260040160405180910390fd5b84516040516358914d0360e01b815260cf6004808301919091526024820192909252336044820152839185019073__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562001ea9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ecf919062003d29565b8154811062001ee25762001ee262003e98565b906000526020600020906005020160010190600462001f03929190620034c8565b50600783015460ff1662000dd05760005b856080015151811015620020f95760cf73__$99f6e31d9157e72684c1fb13c20fb01510$__6358914d03909188600001518960800151858151811062001f5e5762001f5e62003e98565b60200260200101516040518463ffffffff1660e01b815260040162001f9f9392919092835260208301919091526001600160a01b0316604082015260600190565b602060405180830381865af415801562001fbd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001fe3919062003d29565b196200203b578551608087015180518390811062002005576200200562003e98565b602002602001015160405163eb51f5f960e01b8152600401620006d19291909182526001600160a01b0316602082015260400190565b60006200204a82600162004130565b90505b866080015151811015620020e3578660800151818151811062002074576200207462003e98565b60200260200101516001600160a01b0316876080015183815181106200209e576200209e62003e98565b60200260200101516001600160a01b031603620020ce576040516342381c9560e01b815260040160405180910390fd5b80620020da8162003ec4565b9150506200204d565b5080620020f08162003ec4565b91505062001f14565b50604080516060810182526020808801518252810183905260808701518183015286519151636aba6eeb60e11b8152909173__$99f6e31d9157e72684c1fb13c20fb01510$__9163d574ddd6916200215a9160cf9190869060040162004146565b602060405180830381865af415801562002178573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200219e919062004112565b6200228557604080516001818301818152608083019093526000928291606083016020803683375050508152602001839052805180519192503391600090620021eb57620021eb62003e98565b6001600160a01b0390921660209283029190910182015260068601805460018101825560009182529082902083518051859460079094029092019262002237928492909101906200350b565b5060208281015180516001840190815591810151909190620022609060028501906004620034c8565b50604082015180516200227e9160058401916020909101906200350b565b5050505050505b855160d55460405163449cf2fd60e11b815260cf600482015260248101929092526044820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__90638939e5fa90606401600060405180830381865af4158015620022ed573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620023179190810190620041d1565b915091508115620023e65760005b815181101562000bf65760c95482516001600160a01b0390911690638ed47008908490849081106200235b576200235b62003e98565b602090810291909101015160cb546040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260006044820152606401600060405180830381600087803b158015620023b757600080fd5b505af1158015620023cc573d6000803e3d6000fd5b505050508080620023dd9062003ec4565b91505062002325565b5050505050505050565b60c9546000906001600160a01b031633146200241f57604051630e2c730d60e41b815260040160405180910390fd5b60d554604051629bf68360e11b815260cf60048201526001600160a01b03841660248201526044810191909152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__90630137ed0690606401600060405180830381865af41580156200248e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620024b891908101906200421b565b9150915060005b8151811015620024f757620024e282828151811062000b1e5762000b1e62003e98565b80620024ee8162003ec4565b915050620024bf565b50909392505050565b6200250a62002fe8565b6040805160a0810182526001600160a01b038a8116808352908a16602083018190528284018a905260608301889052608090920184905260c980546001600160a01b0319908116909217905560ca8054909116909117905560cb87905560cc85905560cd829055516301a79f6360e71b815260cf600482015260248101839052604481018490526064810186905273__$99f6e31d9157e72684c1fb13c20fb01510$__9063d3cfb1809060840160006040518083038186803b158015620025d057600080fd5b505af4158015620025e5573d6000803e3d6000fd5b5050604080516001600160a01b03808d1682528b166020820152908101899052606081018890526080810187905260a0810186905260c0810185905260e081018490527ff95156a904d33c289d45bd80fdb27f108976d7a2de754073eb7506cf618779ad925061010001905060405180910390a15050505050505050565b6200266d62002fe8565b6001600160a01b038116620026d45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620006d1565b62000ec08162003044565b60ca546001600160a01b031633146200270b5760405163469666c560e01b815260040160405180910390fd5b60d555565b600054610100900460ff1615808015620027315750600054600160ff909116105b806200274d5750303b1580156200274d575060005460ff166001145b620027b25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620006d1565b6000805460ff191660011790558015620027d6576000805461ff0019166101001790555b60d5829055620027e562003096565b8015620010cb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6200283c60cf82620030ca565b600081815260d1602090815260408083208151610120810183528154815260018201548185015260028201548184015260038201546060820152600482018054845181870281018701909552808552919492936080860193909290879084015b82821015620029185760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311620028eb57505050505081525050815260200190600101906200289c565b505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200297b57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200295c575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b8282101562002af957838290600052602060002090600702016040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801562002a2857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162002a09575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b81548152602001906001019080831162002a6457505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801562002adc57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162002abd575b5050505050815250508152505081526020019060010190620029a9565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b81548152602001906001019080831162002b2c5750505050508152505090506000816060015160c96003015460405162002b669062003563565b9182526020820152604001604051809103906000f08015801562002b8e573d6000803e3d6000fd5b50600084815260ce602052604080822080546001600160a01b0319166001600160a01b0385161790558401519192509067ffffffffffffffff81111562002bd95762002bd96200373a565b60405190808252806020026020018201604052801562002c03578160200160208202803683370190505b5090506000836040015167ffffffffffffffff81111562002c285762002c286200373a565b60405190808252806020026020018201604052801562002c5d57816020015b606081526020019060019003908162002c475790505b50905060005b846040015181101562002da1578460800151818151811062002c895762002c8962003e98565b60200260200101516000015183828151811062002caa5762002caa62003e98565b6001600160a01b03928316602091820292909201015260c9546080870151805160009392909216916315dac9b291908590811062002cec5762002cec62003e98565b6020908102919091010151516040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381865afa15801562002d3d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262002d6791908101906200425c565b90508083838151811062002d7f5762002d7f62003e98565b602002602001018190525050808062002d989062003ec4565b91505062002c63565b506040516337f8d5ff60e01b81526001600160a01b038416906337f8d5ff9062002dd29085908590600401620042dc565b600060405180830381600087803b15801562002ded57600080fd5b505af115801562002e02573d6000803e3d6000fd5b505050508360200151846000015160cf600001547fbbd25d64683f157b2e3544d3d6430e14102db1e49592cf4dcaf827e2ded517ee8760400151886060015187438a60405162002e5795949392919062004354565b60405180910390a45050505050565b62000ec062002fe8565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562002ea65762000dd383620031ab565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801562002f03575060408051601f3d908101601f1916820190925262002f009181019062003d29565b60015b62002f685760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401620006d1565b60008051602062005a66833981519152811462002fda5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401620006d1565b5062000dd38383836200324a565b6097546001600160a01b031633146200119b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006d1565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620030c05760405162461bcd60e51b8152600401620006d19062004396565b6200119b62003275565b8154826000620030da8362003ec4565b9091555050600081815260028301602052604081206001810180549192620031028362003ec4565b909155505060078101805460ff191690556200312360058201600062003571565b6200313360068201600062003591565b60005b6004820154811015620031a5578160040181815481106200315b576200315b62003e98565b906000526020600020906005020160010160006200319091905060008155600101600081556001016000815560010160009055565b806200319c8162003ec4565b91505062003136565b50505050565b6001600160a01b0381163b6200321a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620006d1565b60008051602062005a6683398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6200325583620032aa565b600082511180620032635750805b1562000dd357620031a58383620032ec565b600054610100900460ff166200329f5760405162461bcd60e51b8152600401620006d19062004396565b6200119b3362003044565b620032b581620031ab565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062003314838360405180606001604052806027815260200162005a86602791396200331b565b9392505050565b6060600080856001600160a01b0316856040516200333a9190620043e1565b600060405180830381855af49150503d806000811462003377576040519150601f19603f3d011682016040523d82523d6000602084013e6200337c565b606091505b50915091506200338f8683838762003399565b9695505050505050565b606083156200340d57825160000362003405576001600160a01b0385163b620034055760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620006d1565b508162003419565b62003419838362003421565b949350505050565b815115620034325781518083602001fd5b8060405162461bcd60e51b8152600401620006d1919062004051565b604051806040016040528060006001600160a01b0316815260200162003473620035b4565b905290565b6040518061012001604052806000815260200160008152602001600081526020016000815260200160608152602001606081526020016060815260200160001515815260200162003473620035b4565b8260048101928215620034f9579160200282015b82811115620034f9578251825591602001919060010190620034dc565b5062003507929150620035d2565b5090565b828054828255906000526020600020908101928215620034f9579160200282015b82811115620034f957825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200352c565b611666806200440083390190565b508054600082559060005260206000209081019062000ec09190620035d2565b508054600082556007029060005260206000209081019062000ec09190620035e9565b60405180608001604052806004906020820280368337509192915050565b5b80821115620035075760008155600101620035d3565b808211156200350757600062003600828262003571565b60006001830181815560028401829055600384018290556004840182905560058401829055906200363660058301600062003571565b505050600701620035e9565b6001600160a01b038116811462000ec057600080fd5b600080604083850312156200366c57600080fd5b8235620036798162003642565b946020939093013593505050565b600080604083850312156200369b57600080fd5b50508035926020909101359150565b600060208284031215620036bd57600080fd5b8135620033148162003642565b600060208284031215620036dd57600080fd5b5035919050565b8060005b6004811015620031a5578151845260209384019390910190600101620036e8565b6001600160a01b038151168252602081015162000dd36020840182620036e4565b60a0810162000fed828462003709565b634e487b7160e01b600052604160045260246000fd5b60405160a0810167ffffffffffffffff811182821017156200377657620037766200373a565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715620037a857620037a86200373a565b604052919050565b600067ffffffffffffffff821115620037cd57620037cd6200373a565b50601f01601f191660200190565b600082601f830112620037ed57600080fd5b813562003804620037fe82620037b0565b6200377c565b8181528460208386010111156200381a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156200384b57600080fd5b8235620038588162003642565b9150602083013567ffffffffffffffff8111156200387557600080fd5b6200388385828601620037db565b9150509250929050565b600067ffffffffffffffff821115620038aa57620038aa6200373a565b5060051b60200190565b600082601f830112620038c657600080fd5b81356020620038d9620037fe836200388d565b82815260059290921b84018101918181019086841115620038f957600080fd5b8286015b8481101562003921578035620039138162003642565b8352918301918301620038fd565b509695505050505050565b6000806000606084860312156200394257600080fd5b833567ffffffffffffffff8111156200395a57600080fd5b6200396886828701620038b4565b9660208601359650604090950135949350505050565b6020808252825182820181905260009190848201906040850190845b81811015620039b8578351835292840192918401916001016200399a565b50909695505050505050565b60008060408385031215620039d857600080fd5b823591506020830135620039ec8162003642565b809150509250929050565b600081518084526020808501945080840160005b8381101562003a355762003a2187835162003709565b60a096909601959082019060010162003a0b565b509495945050505050565b600081518084526020808501945080840160005b8381101562003a355781516001600160a01b03168752958201959082019060010162003a54565b600081518084526020808501808196508360051b8101915082860160005b8581101562003b1757828403895281516040815181875262003abe8288018262003a40565b90508783015192508681038888015260c0835182528884015162003ae58a840182620036e4565b508284015193508060a083015262003b008183018562003a40565b9c89019c9750505092860192505060010162003a99565b5091979650505050505050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015161018060a084015262003b6c6101a0840182620039f7565b905060a0840151601f19808584030160c086015262003b8c838362003a40565b925060c08601519150808584030160e08601525062003bac828262003a7b565b91505060e084015161010062003bc58186018315159052565b850151905062003bda610120850182620036e4565b509392505050565b60006020828403121562003bf557600080fd5b813567ffffffffffffffff8082111562003c0e57600080fd5b9083019060a0828603121562003c2357600080fd5b62003c2d62003750565b823581526020830135602082015260408301358281111562003c4e57600080fd5b62003c5c87828601620037db565b60408301525060608301358281111562003c7557600080fd5b62003c8387828601620037db565b60608301525060808301358281111562003c9c57600080fd5b62003caa87828601620038b4565b60808301525095945050505050565b600080600080600080600080610100898b03121562003cd757600080fd5b883562003ce48162003642565b9750602089013562003cf68162003642565b979a9799505050506040860135956060810135956080820135955060a0820135945060c0820135935060e0909101359150565b60006020828403121562003d3c57600080fd5b5051919050565b60006020828403121562003d5657600080fd5b81518060000b81146200331457600080fd5b600082601f83011262003d7a57600080fd5b8151602062003d8d620037fe836200388d565b82815260059290921b8401810191818101908684111562003dad57600080fd5b8286015b848110156200392157805162003dc78162003642565b835291830191830162003db1565b600082601f83011262003de757600080fd5b8151602062003dfa620037fe836200388d565b82815260059290921b8401810191818101908684111562003e1a57600080fd5b8286015b8481101562003921578051835291830191830162003e1e565b6000806040838503121562003e4b57600080fd5b825167ffffffffffffffff8082111562003e6457600080fd5b62003e728683870162003d68565b9350602085015191508082111562003e8957600080fd5b50620038838582860162003dd5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162003ed95762003ed962003eae565b5060010190565b60608152600062003ef5606083018662003a40565b60208301949094525060400152919050565b6000806040838503121562003f1b57600080fd5b505080516020909101519092909150565b60006020828403121562003f3f57600080fd5b815167ffffffffffffffff81111562003f5757600080fd5b620034198482850162003dd5565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60005b838110156200401a57818101518382015260200162004000565b50506000910152565b600081518084526200403d81602086016020860162003ffd565b601f01601f19169290920160200192915050565b60208152600062003314602083018462004023565b6000608082840312156200407957600080fd5b82601f8301126200408957600080fd5b6040516080810181811067ffffffffffffffff82111715620040af57620040af6200373a565b604052806080840185811115620040c557600080fd5b845b81811015620040e1578051835260209283019201620040c7565b509195945050505050565b6080810162000fed8284620036e4565b805180151581146200410d57600080fd5b919050565b6000602082840312156200412557600080fd5b6200331482620040fc565b8082018082111562000fed5762000fed62003eae565b8381526000602084818401526060604084015261012083018451606085015281850151620041786080860182620036e4565b50604085015160c06101008601528051918290528201906000906101408601905b80831015620041c45783516001600160a01b0316825292840192600192909201919084019062004199565b5098975050505050505050565b60008060408385031215620041e557600080fd5b620041f083620040fc565b9150602083015167ffffffffffffffff8111156200420d57600080fd5b620038838582860162003d68565b600080604083850312156200422f57600080fd5b82519150602083015167ffffffffffffffff8111156200424e57600080fd5b620038838582860162003dd5565b6000602082840312156200426f57600080fd5b815167ffffffffffffffff8111156200428757600080fd5b8201601f810184136200429957600080fd5b8051620042aa620037fe82620037b0565b818152856020838501011115620042c057600080fd5b620042d382602083016020860162003ffd565b95945050505050565b604081526000620042f1604083018562003a40565b6020838203818501528185518084528284019150828160051b85010183880160005b838110156200434557601f198784030185526200433283835162004023565b9486019492509085019060010162004313565b50909998505050505050505050565b85815284602082015260a0604082015260006200437560a083018662003a40565b90508360608301526001600160a01b03831660808301529695505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008251620043f581846020870162003ffd565b919091019291505056fe60c0604052600060065534801561001557600080fd5b506040516116663803806116668339810160408190526100349161009b565b61003d3361004b565b60a0919091526080526100bf565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100ae57600080fd5b505080516020909101519092909150565b60805160a05161154a61011c6000396000818161027f0152610768015260008181610243015281816103aa015281816103dc015281816104150152818161044e0152818161089b0152818161093e01526109e5015261154a6000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063cc5ef00911610071578063cc5ef009146102a1578063cd5e3837146102a9578063ce7c2ac2146102bc578063d73fe0aa146102cf578063f2fde38b146102d757600080fd5b80638da5cb5b146102255780639cb8a26a14610236578063ac5553ce1461023e578063b0ef817914610265578063c27040241461027a57600080fd5b80634e3874a0116100f45780634e3874a0146101cc5780635aa68ac0146101e2578063670d14b2146101f7578063715018a61461020a5780637fd283461461021257600080fd5b80630ea6564814610131578063221f95111461015a57806335c1d3491461017557806337f8d5ff146101a057806348cd4cb1146101b5575b600080fd5b61014461013f36600461105a565b6102ea565b60405161015191906110d0565b60405180910390f35b610162610384565b60405160009190910b8152602001610151565b6101886101833660046110e3565b61048b565b6040516001600160a01b039091168152602001610151565b6101b36101ae366004611148565b6104b5565b005b6101be60065481565b604051908152602001610151565b6101d461060a565b60405161015192919061120c565b6101ea61078f565b604051610151919061122d565b61014461020536600461105a565b6107f1565b6101b361080a565b6101b361022036600461127a565b61081e565b6000546001600160a01b0316610188565b6101b3610ae1565b6101be7f000000000000000000000000000000000000000000000000000000000000000081565b61026d610af7565b60405161015191906112ec565b6101be7f000000000000000000000000000000000000000000000000000000000000000081565b61026d610c55565b6101446102b736600461105a565b610dad565b6101446102ca36600461105a565b610dc6565b61026d610ddf565b6101b36102e536600461105a565b610f37565b60036020526000908152604090208054610303906112ff565b80601f016020809104026020016040519081016040528092919081815260200182805461032f906112ff565b801561037c5780601f106103515761010080835404028352916020019161037c565b820191906000526020600020905b81548152906001019060200180831161035f57829003601f168201915b505050505081565b60006006546000036103965750600090565b6000600654436103a69190611349565b90507f000000000000000000000000000000000000000000000000000000000000000081116103d757600191505090565b6104027f00000000000000000000000000000000000000000000000000000000000000006002611362565b811161041057600291505090565b61043b7f00000000000000000000000000000000000000000000000000000000000000006003611362565b811161044957600391505090565b6104747f00000000000000000000000000000000000000000000000000000000000000006004611362565b811161048257600491505090565b60001991505090565b6005818154811061049b57600080fd5b6000918252602090912001546001600160a01b0316905081565b6006541561050a5760405162461bcd60e51b815260206004820152601760248201527f444b472068617320616c7265616479207374617274656400000000000000000060448201526064015b60405180910390fd5b610512610fb0565b60005b838110156105ff57600585858381811061053157610531611379565b9050602002016020810190610546919061105a565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b0390921691909117905582828281811061058a5761058a611379565b905060200281019061059c919061138f565b600160008888868181106105b2576105b2611379565b90506020020160208101906105c7919061105a565b6001600160a01b031681526020810191909152604001600020916105ec91908361143a565b50806105f7816114fb565b915050610515565b505043600655505050565b60006060600060058054905067ffffffffffffffff81111561062e5761062e6113d6565b60405190808252806020026020018201604052801561066157816020015b606081526020019060019003908161064c5790505b50905060005b60055481101561076557600160006005838154811061068857610688611379565b60009182526020808320909101546001600160a01b03168352820192909252604001902080546106b7906112ff565b80601f01602080910402602001604051908101604052809291908181526020018280546106e3906112ff565b80156107305780601f1061070557610100808354040283529160200191610730565b820191906000526020600020905b81548152906001019060200180831161071357829003601f168201915b505050505082828151811061074757610747611379565b6020026020010181905250808061075d906114fb565b915050610667565b507f0000000000000000000000000000000000000000000000000000000000000000939092509050565b606060058054806020026020016040519081016040528092919081815260200182805480156107e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116107c9575b5050505050905090565b60016020526000908152604090208054610303906112ff565b610812610fb0565b61081c600061100a565b565b3360009081526001602052604081208054610838906112ff565b9050116108875760405162461bcd60e51b815260206004820152601b60248201527f796f7520617265206e6f7420612067726f7570206d656d6265722100000000006044820152606401610501565b6000600654436108979190611349565b90507f000000000000000000000000000000000000000000000000000000000000000081116109395733600090815260026020526040902080546108da906112ff565b1590506109195760405162461bcd60e51b815260206004820152600d60248201526c1cda185c9948195e1a5cdd1959609a1b6044820152606401610501565b33600090815260026020526040902061093383858361143a565b50505050565b6109647f00000000000000000000000000000000000000000000000000000000000000006002611362565b81116109e0573360009081526003602052604090208054610984906112ff565b1590506109c65760405162461bcd60e51b815260206004820152601060248201526f1c995cdc1bdb9cd948195e1a5cdd195960821b6044820152606401610501565b33600090815260036020526040902061093383858361143a565b610a0b7f00000000000000000000000000000000000000000000000000000000000000006003611362565b8111610a94573360009081526004602052604090208054610a2b906112ff565b159050610a7a5760405162461bcd60e51b815260206004820152601560248201527f6a757374696669636174696f6e206578697374656400000000000000000000006044820152606401610501565b33600090815260046020526040902061093383858361143a565b60405162461bcd60e51b815260206004820152601560248201527f444b47205075626c6973682068617320656e64656400000000000000000000006044820152606401610501565b505050565b610ae9610fb0565b6000546001600160a01b0316ff5b60055460609060009067ffffffffffffffff811115610b1857610b186113d6565b604051908082528060200260200182016040528015610b4b57816020015b6060815260200190600190039081610b365790505b50905060005b600554811015610c4f576004600060058381548110610b7257610b72611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610ba1906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610bcd906112ff565b8015610c1a5780601f10610bef57610100808354040283529160200191610c1a565b820191906000526020600020905b815481529060010190602001808311610bfd57829003601f168201915b5050505050828281518110610c3157610c31611379565b60200260200101819052508080610c47906114fb565b915050610b51565b50919050565b60055460609060009067ffffffffffffffff811115610c7657610c766113d6565b604051908082528060200260200182016040528015610ca957816020015b6060815260200190600190039081610c945790505b50905060005b600554811015610c4f576003600060058381548110610cd057610cd0611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610cff906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2b906112ff565b8015610d785780601f10610d4d57610100808354040283529160200191610d78565b820191906000526020600020905b815481529060010190602001808311610d5b57829003601f168201915b5050505050828281518110610d8f57610d8f611379565b60200260200101819052508080610da5906114fb565b915050610caf565b60046020526000908152604090208054610303906112ff565b60026020526000908152604090208054610303906112ff565b60055460609060009067ffffffffffffffff811115610e0057610e006113d6565b604051908082528060200260200182016040528015610e3357816020015b6060815260200190600190039081610e1e5790505b50905060005b600554811015610c4f576002600060058381548110610e5a57610e5a611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610e89906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb5906112ff565b8015610f025780601f10610ed757610100808354040283529160200191610f02565b820191906000526020600020905b815481529060010190602001808311610ee557829003601f168201915b5050505050828281518110610f1957610f19611379565b60200260200101819052508080610f2f906114fb565b915050610e39565b610f3f610fb0565b6001600160a01b038116610fa45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b610fad8161100a565b50565b6000546001600160a01b0316331461081c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610501565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561106c57600080fd5b81356001600160a01b038116811461108357600080fd5b9392505050565b6000815180845260005b818110156110b057602081850181015186830182015201611094565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000611083602083018461108a565b6000602082840312156110f557600080fd5b5035919050565b60008083601f84011261110e57600080fd5b50813567ffffffffffffffff81111561112657600080fd5b6020830191508360208260051b850101111561114157600080fd5b9250929050565b6000806000806040858703121561115e57600080fd5b843567ffffffffffffffff8082111561117657600080fd5b611182888389016110fc565b9096509450602087013591508082111561119b57600080fd5b506111a8878288016110fc565b95989497509550505050565b600082825180855260208086019550808260051b84010181860160005b848110156111ff57601f198684030189526111ed83835161108a565b988401989250908301906001016111d1565b5090979650505050505050565b82815260406020820152600061122560408301846111b4565b949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561126e5783516001600160a01b031683529284019291840191600101611249565b50909695505050505050565b6000806020838503121561128d57600080fd5b823567ffffffffffffffff808211156112a557600080fd5b818501915085601f8301126112b957600080fd5b8135818111156112c857600080fd5b8660208285010111156112da57600080fd5b60209290920196919550909350505050565b60208152600061108360208301846111b4565b600181811c9082168061131357607f821691505b602082108103610c4f57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561135c5761135c611333565b92915050565b808202811582820484141761135c5761135c611333565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113a657600080fd5b83018035915067ffffffffffffffff8211156113c157600080fd5b60200191503681900382131561114157600080fd5b634e487b7160e01b600052604160045260246000fd5b601f821115610adc57600081815260208120601f850160051c810160208610156114135750805b601f850160051c820191505b818110156114325782815560010161141f565b505050505050565b67ffffffffffffffff831115611452576114526113d6565b6114668361146083546112ff565b836113ec565b6000601f84116001811461149a57600085156114825750838201355b600019600387901b1c1916600186901b1783556114f4565b600083815260209020601f19861690835b828110156114cb57868501358255602094850194600190920191016114ab565b50868210156114e85760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60006001820161150d5761150d611333565b506001019056fea2646970667358221220fa05377607ecc6548d8101a54019d147738c74cac6c9434b650cbf8f1260a61f64736f6c63430008120033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122044a029635051ab03c46b7869f8fa93d82f221e16634fc6955c11862d454338d164736f6c63430008120033", + "sourceMap": "719:16101:100:-:0;;;1198:4:57;1155:48;;2775:53:100;;;;;;;;;-1:-1:-1;2799:22:100;:20;:22::i;:::-;719:16101;;5939:280:56;6007:13;;;;;;;6006:14;5998:66;;;;-1:-1:-1;;;5998:66:56;;216:2:148;5998:66:56;;;198:21:148;255:2;235:18;;;228:30;294:34;274:18;;;267:62;-1:-1:-1;;;345:18:148;;;338:37;392:19;;5998:66:56;;;;;;;;6078:12;;6094:15;6078:12;;;:31;6074:139;;6125:12;:30;;-1:-1:-1;;6125:30:56;6140:15;6125:30;;;;;;6174:28;;564:36:148;;;6174:28:56;;552:2:148;537:18;6174:28:56;;;;;;;6074:139;5939:280::o;422:184:148:-;719:16101:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "linkReferences": { + "src/libraries/BLS.sol": { + "BLS": [ + { "start": 7475, "length": 20 }, + { "start": 7601, "length": 20 }, + { "start": 7764, "length": 20 }, + { "start": 7890, "length": 20 } + ] + }, + "src/libraries/GroupLib.sol": { + "GroupLib": [ + { "start": 2076, "length": 20 }, + { "start": 2793, "length": 20 }, + { "start": 3446, "length": 20 }, + { "start": 3661, "length": 20 }, + { "start": 4108, "length": 20 }, + { "start": 4976, "length": 20 }, + { "start": 7253, "length": 20 }, + { "start": 8077, "length": 20 }, + { "start": 8261, "length": 20 }, + { "start": 8779, "length": 20 }, + { "start": 9169, "length": 20 }, + { "start": 9586, "length": 20 }, + { "start": 9913, "length": 20 } + ] + } + } + }, + "deployedBytecode": { + "object": "0x608060405260043610620001c35760003560e01c80638da5cb5b11620000f3578063e37eb96c1162000095578063f2fde38b116200006c578063f2fde38b146200056c578063f3df08021462000591578063f49e0ba914620005b6578063fe4b84df14620005f257600080fd5b8063e37eb96c14620004fd578063ed157c3f1462000522578063f1d49f6b146200054757600080fd5b8063c2db900b11620000ca578063c2db900b1462000426578063ceb60654146200045c578063d11b8e68146200049057600080fd5b80638da5cb5b14620003ba578063914eb34d14620003da578063b330a0fd14620003ff57600080fd5b806342424d6f116200016957806351a2b9a0116200014057806351a2b9a0146200035c57806352d1902d1462000373578063715018a6146200038b5780637ee49cfd14620003a357600080fd5b806342424d6f14620002be5780634d79a89314620003115780634f1ef286146200034557600080fd5b806335fe4a3f116200019e57806335fe4a3f14620002395780633659cfe6146200025e5780633b6c00b0146200028357600080fd5b806306545a9314620001c85780630ad98f6a14620001ed5780630bf9c5c61462000214575b600080fd5b348015620001d557600080fd5b5060d0545b6040519081526020015b60405180910390f35b348015620001fa57600080fd5b50620002126200020c36600462003658565b62000617565b005b3480156200022157600080fd5b50620002126200023336600462003687565b620006af565b3480156200024657600080fd5b506200021262000258366004620036aa565b62000c01565b3480156200026b57600080fd5b50620002126200027d366004620036aa565b62000dd8565b3480156200029057600080fd5b50620002a8620002a2366004620036aa565b62000ec3565b60408051928352602083019190915201620001e4565b348015620002cb57600080fd5b50620002f8620002dd366004620036ca565b600090815260ce60205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001620001e4565b3480156200031e57600080fd5b50620003366200033036600462003687565b62000f56565b604051620001e491906200372a565b620002126200035636600462003837565b62000ff3565b3480156200036957600080fd5b5060d554620001da565b3480156200038057600080fd5b50620001da620010cf565b3480156200039857600080fd5b506200021262001185565b348015620003b057600080fd5b5060cf54620001da565b348015620003c757600080fd5b506097546001600160a01b0316620002f8565b348015620003e757600080fd5b5062000212620003f93660046200392c565b6200119d565b3480156200040c57600080fd5b506200041762001238565b604051620001e491906200397e565b3480156200043357600080fd5b506200044b62000445366004620039c4565b620012bb565b6040519015158152602001620001e4565b3480156200046957600080fd5b50620004816200047b366004620036ca565b62001687565b604051620001e4919062003b24565b3480156200049d57600080fd5b5060c95460ca5460cb5460d45460cc5460d35460d25460cd54604080516001600160a01b03998a168152989097166020890152958701949094526060860192909252608085015260a084015260c083015260e082015261010001620001e4565b3480156200050a57600080fd5b50620002126200051c36600462003be2565b620019a5565b3480156200052f57600080fd5b50620001da62000541366004620036aa565b620023f0565b3480156200055457600080fd5b50620002126200056636600462003cb9565b62002500565b3480156200057957600080fd5b50620002126200058b366004620036aa565b62002663565b3480156200059e57600080fd5b5062000212620005b0366004620036ca565b620026df565b348015620005c357600080fd5b50620002a8620005d5366004620036ca565b600090815260d16020526040902060038101546002909101549091565b348015620005ff57600080fd5b506200021262000611366004620036ca565b62002710565b60c9546001600160a01b031633146200064357604051630e2c730d60e41b815260040160405180910390fd5b60ca5460405163056cc7b560e11b81526001600160a01b0384811660048301526024820184905290911690630ad98f6a90604401600060405180830381600087803b1580156200069257600080fd5b505af1158015620006a7573d6000803e3d6000fd5b505050505050565b60d0548210620006da57604051637f6efcb560e11b8152600481018390526024015b60405180910390fd5b6040516358914d0360e01b815260cf60048201526024810183905233604482015273__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562000738573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200075e919062003d29565b19620007875760405163eb51f5f960e01b815260048101839052336024820152604401620006d1565b600082815260d16020526040902060018101548214620007d257600181015460405163048b63c360e11b815260048101859052602481018490526044810191909152606401620006d1565b600083815260ce60205260409020546001600160a01b03166200080c57604051635291bbcf60e01b815260048101849052602401620006d1565b600083815260ce602090815260409182902054825163221f951160e01b815292516001600160a01b0390911692839263221f9511926004808401938290030181865afa15801562000861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000887919062003d43565b60000b600019146200091f5783816001600160a01b031663221f95116040518163ffffffff1660e01b8152600401602060405180830381865afa158015620008d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008f9919062003d43565b60405163f7c06f9160e01b8152600481019290925260000b6024820152604401620006d1565b806001600160a01b0316639cb8a26a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200095b57600080fd5b505af115801562000970573d6000803e3d6000fd5b505050600085815260ce6020526040902080546001600160a01b031916905550600782015460ff1662000b455760d554604051630295316d60e51b815260cf6004820152602481018690526044810191909152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__906352a62da090606401600060405180830381865af415801562000a05573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000a2f919081019062003e37565b9150915060005b825181101562000af75760c95483516001600160a01b0390911690638ed470089085908490811062000a6c5762000a6c62003e98565b602090810291909101015160cb546040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260006044820152606401600060405180830381600087803b15801562000ac857600080fd5b505af115801562000add573d6000803e3d6000fd5b50505050808062000aee9062003ec4565b91505062000a36565b5060005b815181101562000b415762000b2c82828151811062000b1e5762000b1e62003e98565b60200260200101516200282f565b8062000b388162003ec4565b91505062000afb565b5050505b60408051600180825281830190925260009160208083019080368337019050509050338160008151811062000b7e5762000b7e62003e98565b6001600160a01b03928316602091820292909201015260c95460cd5460405163914eb34d60e01b8152919092169163914eb34d9162000bc69185916000919060040162003ee0565b600060405180830381600087803b15801562000be157600080fd5b505af115801562000bf6573d6000803e3d6000fd5b505050505050505050565b60c9546001600160a01b0316331462000c2d57604051630e2c730d60e41b815260040160405180910390fd5b60405163787c576760e01b815260cf60048201526001600160a01b0382166024820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__9063787c5767906044016040805180830381865af415801562000c91573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000cb7919062003f07565b91509150816000191462000dd357600082815260ce60205260409020546001600160a01b03161562000cfc5760405163cccf9bf160e01b815260040160405180910390fd5b60d55460405163cd21da9960e01b815260cf60048201526024810184905260448101839052606481019190915260009073__$99f6e31d9157e72684c1fb13c20fb01510$__9063cd21da9990608401600060405180830381865af415801562000d69573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000d93919081019062003f2c565b905060005b815181101562000dd05762000dbb82828151811062000b1e5762000b1e62003e98565b8062000dc78162003ec4565b91505062000d98565b50505b505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300362000e235760405162461bcd60e51b8152600401620006d19062003f65565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031662000e6e60008051602062005a66833981519152546001600160a01b031690565b6001600160a01b03161462000e975760405162461bcd60e51b8152600401620006d19062003fb1565b62000ea28162002e66565b6040805160008082526020820190925262000ec09183919062002e70565b50565b60405163787c576760e01b815260cf60048201526001600160a01b0382166024820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__9063787c5767906044016040805180830381865af415801562000f27573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f4d919062003f07565b91509150915091565b62000f606200344e565b600083815260d16020526040902060040180548390811062000f865762000f8662003e98565b6000918252602091829020604080518082018252600590930290910180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b81548152602001906001019080831162000fcd5750505050508152505090505b92915050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036200103e5760405162461bcd60e51b8152600401620006d19062003f65565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200108960008051602062005a66833981519152546001600160a01b031690565b6001600160a01b031614620010b25760405162461bcd60e51b8152600401620006d19062003fb1565b620010bd8262002e66565b620010cb8282600162002e70565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620011715760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401620006d1565b5060008051602062005a6683398151915290565b6200118f62002fe8565b6200119b600062003044565b565b60ca546001600160a01b03163314620011c95760405163469666c560e01b815260040160405180910390fd5b60c95460405163914eb34d60e01b81526001600160a01b039091169063914eb34d90620011ff9086908690869060040162003ee0565b600060405180830381600087803b1580156200121a57600080fd5b505af11580156200122f573d6000803e3d6000fd5b50505050505050565b604051631c2da66560e31b815260cf600482015260609073__$99f6e31d9157e72684c1fb13c20fb01510$__9063e16d332890602401600060405180830381865af41580156200128c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620012b6919081019062003f2c565b905090565b600082815260d160209081526040808320815161012081018352815481526001820154818501526002820154818401526003820154606082015260048201805484518187028101870190955280855286959294608086019390929190879084015b82821015620013985760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b8154815260200190600101908083116200136b57505050505081525050815260200190600101906200131c565b50505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015620013fb57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620013dc575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b8282101562001579578382906000526020600020906007020160405180604001604052908160008201805480602002602001604051908101604052809291908181526020018280548015620014a857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162001489575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b815481526020019060010190808311620014e45750505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200155c57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200153d575b505050505081525050815250508152602001906001019062001429565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b815481526020019060010190808311620015ac57505050505081525050905060005b8160800151518110156200167c57836001600160a01b031682608001518281518110620015ff57620015ff62003e98565b6020026020010151600001516001600160a01b03160362001667578160800151818151811062001633576200163362003e98565b60200260200101516020015160006004811062001654576200165462003e98565b6020020151600014159250505062000fed565b80620016738162003ec4565b915050620015ce565b506000949350505050565b6200169162003478565b600082815260d1602090815260408083208151610120810183528154815260018201548185015260028201548184015260038201546060820152600482018054845181870281018701909552808552919592946080870194939192919084015b828210156200176d5760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311620017405750505050508152505081526020019060010190620016f1565b50505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015620017d057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620017b1575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156200194e5783829060005260206000209060070201604051806040016040529081600082018054806020026020016040519081016040528092919081815260200182805480156200187d57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200185e575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b815481526020019060010190808311620018b95750505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200193157602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162001912575b5050505050815250508152505081526020019060010190620017fe565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b81548152602001906001019080831162001981575050505050815250509050919050565b60d054815110620019d0578051604051637f6efcb560e11b81526004810191909152602401620006d1565b8051600090815260ce60205260409020546001600160a01b031662001a0f578051604051635291bbcf60e01b81526004810191909152602401620006d1565b8051600090815260ce602090815260409182902054825163221f951160e01b815292516001600160a01b0390911692839263221f9511926004808401938290030181865afa15801562001a66573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a8c919062003d43565b60000b1962001ab55781516040516343609fe160e01b81526004810191909152602401620006d1565b8151600090815260d16020908152604090912060018101549184015190911462001b105782516020840151600183015460405163048b63c360e11b8152600481019390935260248301919091526044820152606401620006d1565b82516040516358914d0360e01b815260cf6004820152602481019190915233604482015273__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562001b71573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001b97919062003d29565b1962001bc357825160405163eb51f5f960e01b81526004810191909152336024820152604401620006d1565b825162001bd19033620012bb565b1562001bfd57825160405163173ca10960e31b81526004810191909152336024820152604401620006d1565b60608301516040516316f6db8160e01b815260009173__$34d23ddaee48904c6c566425acbfa0fc0e$__916316f6db819162001c3c9160040162004051565b608060405180830381865af415801562001c5a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001c80919062004066565b604051636fda2c7960e01b815290915073__$34d23ddaee48904c6c566425acbfa0fc0e$__90636fda2c799062001cbc908490600401620040ec565b602060405180830381865af415801562001cda573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001d00919062004112565b62001d1e57604051631886185760e01b815260040160405180910390fd5b60408085015190516316f6db8160e01b815260009173__$34d23ddaee48904c6c566425acbfa0fc0e$__916316f6db819162001d5d9160040162004051565b608060405180830381865af415801562001d7b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001da1919062004066565b604051636fda2c7960e01b815290915073__$34d23ddaee48904c6c566425acbfa0fc0e$__90636fda2c799062001ddd908490600401620040ec565b602060405180830381865af415801562001dfb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001e21919062004112565b62001e3f5760405163145a1fdd60e31b815260040160405180910390fd5b84516040516358914d0360e01b815260cf6004808301919091526024820192909252336044820152839185019073__$99f6e31d9157e72684c1fb13c20fb01510$__906358914d0390606401602060405180830381865af415801562001ea9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ecf919062003d29565b8154811062001ee25762001ee262003e98565b906000526020600020906005020160010190600462001f03929190620034c8565b50600783015460ff1662000dd05760005b856080015151811015620020f95760cf73__$99f6e31d9157e72684c1fb13c20fb01510$__6358914d03909188600001518960800151858151811062001f5e5762001f5e62003e98565b60200260200101516040518463ffffffff1660e01b815260040162001f9f9392919092835260208301919091526001600160a01b0316604082015260600190565b602060405180830381865af415801562001fbd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001fe3919062003d29565b196200203b578551608087015180518390811062002005576200200562003e98565b602002602001015160405163eb51f5f960e01b8152600401620006d19291909182526001600160a01b0316602082015260400190565b60006200204a82600162004130565b90505b866080015151811015620020e3578660800151818151811062002074576200207462003e98565b60200260200101516001600160a01b0316876080015183815181106200209e576200209e62003e98565b60200260200101516001600160a01b031603620020ce576040516342381c9560e01b815260040160405180910390fd5b80620020da8162003ec4565b9150506200204d565b5080620020f08162003ec4565b91505062001f14565b50604080516060810182526020808801518252810183905260808701518183015286519151636aba6eeb60e11b8152909173__$99f6e31d9157e72684c1fb13c20fb01510$__9163d574ddd6916200215a9160cf9190869060040162004146565b602060405180830381865af415801562002178573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200219e919062004112565b6200228557604080516001818301818152608083019093526000928291606083016020803683375050508152602001839052805180519192503391600090620021eb57620021eb62003e98565b6001600160a01b0390921660209283029190910182015260068601805460018101825560009182529082902083518051859460079094029092019262002237928492909101906200350b565b5060208281015180516001840190815591810151909190620022609060028501906004620034c8565b50604082015180516200227e9160058401916020909101906200350b565b5050505050505b855160d55460405163449cf2fd60e11b815260cf600482015260248101929092526044820152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__90638939e5fa90606401600060405180830381865af4158015620022ed573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620023179190810190620041d1565b915091508115620023e65760005b815181101562000bf65760c95482516001600160a01b0390911690638ed47008908490849081106200235b576200235b62003e98565b602090810291909101015160cb546040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260006044820152606401600060405180830381600087803b158015620023b757600080fd5b505af1158015620023cc573d6000803e3d6000fd5b505050508080620023dd9062003ec4565b91505062002325565b5050505050505050565b60c9546000906001600160a01b031633146200241f57604051630e2c730d60e41b815260040160405180910390fd5b60d554604051629bf68360e11b815260cf60048201526001600160a01b03841660248201526044810191909152600090819073__$99f6e31d9157e72684c1fb13c20fb01510$__90630137ed0690606401600060405180830381865af41580156200248e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620024b891908101906200421b565b9150915060005b8151811015620024f757620024e282828151811062000b1e5762000b1e62003e98565b80620024ee8162003ec4565b915050620024bf565b50909392505050565b6200250a62002fe8565b6040805160a0810182526001600160a01b038a8116808352908a16602083018190528284018a905260608301889052608090920184905260c980546001600160a01b0319908116909217905560ca8054909116909117905560cb87905560cc85905560cd829055516301a79f6360e71b815260cf600482015260248101839052604481018490526064810186905273__$99f6e31d9157e72684c1fb13c20fb01510$__9063d3cfb1809060840160006040518083038186803b158015620025d057600080fd5b505af4158015620025e5573d6000803e3d6000fd5b5050604080516001600160a01b03808d1682528b166020820152908101899052606081018890526080810187905260a0810186905260c0810185905260e081018490527ff95156a904d33c289d45bd80fdb27f108976d7a2de754073eb7506cf618779ad925061010001905060405180910390a15050505050505050565b6200266d62002fe8565b6001600160a01b038116620026d45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620006d1565b62000ec08162003044565b60ca546001600160a01b031633146200270b5760405163469666c560e01b815260040160405180910390fd5b60d555565b600054610100900460ff1615808015620027315750600054600160ff909116105b806200274d5750303b1580156200274d575060005460ff166001145b620027b25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620006d1565b6000805460ff191660011790558015620027d6576000805461ff0019166101001790555b60d5829055620027e562003096565b8015620010cb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6200283c60cf82620030ca565b600081815260d1602090815260408083208151610120810183528154815260018201548185015260028201548184015260038201546060820152600482018054845181870281018701909552808552919492936080860193909290879084015b82821015620029185760008481526020908190206040805180820182526005860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311620028eb57505050505081525050815260200190600101906200289c565b505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200297b57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200295c575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b8282101562002af957838290600052602060002090600702016040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801562002a2857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162002a09575b50505091835250506040805160608101825260018401805482528251608081019384905260209485019492939192840191600287019060049082845b81548152602001906001019080831162002a6457505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801562002adc57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162002abd575b5050505050815250508152505081526020019060010190620029a9565b50505090825250600782015460ff1615156020820152604080516080810182529101906008830160048282826020028201915b81548152602001906001019080831162002b2c5750505050508152505090506000816060015160c96003015460405162002b669062003563565b9182526020820152604001604051809103906000f08015801562002b8e573d6000803e3d6000fd5b50600084815260ce602052604080822080546001600160a01b0319166001600160a01b0385161790558401519192509067ffffffffffffffff81111562002bd95762002bd96200373a565b60405190808252806020026020018201604052801562002c03578160200160208202803683370190505b5090506000836040015167ffffffffffffffff81111562002c285762002c286200373a565b60405190808252806020026020018201604052801562002c5d57816020015b606081526020019060019003908162002c475790505b50905060005b846040015181101562002da1578460800151818151811062002c895762002c8962003e98565b60200260200101516000015183828151811062002caa5762002caa62003e98565b6001600160a01b03928316602091820292909201015260c9546080870151805160009392909216916315dac9b291908590811062002cec5762002cec62003e98565b6020908102919091010151516040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381865afa15801562002d3d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262002d6791908101906200425c565b90508083838151811062002d7f5762002d7f62003e98565b602002602001018190525050808062002d989062003ec4565b91505062002c63565b506040516337f8d5ff60e01b81526001600160a01b038416906337f8d5ff9062002dd29085908590600401620042dc565b600060405180830381600087803b15801562002ded57600080fd5b505af115801562002e02573d6000803e3d6000fd5b505050508360200151846000015160cf600001547fbbd25d64683f157b2e3544d3d6430e14102db1e49592cf4dcaf827e2ded517ee8760400151886060015187438a60405162002e5795949392919062004354565b60405180910390a45050505050565b62000ec062002fe8565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562002ea65762000dd383620031ab565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801562002f03575060408051601f3d908101601f1916820190925262002f009181019062003d29565b60015b62002f685760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401620006d1565b60008051602062005a66833981519152811462002fda5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401620006d1565b5062000dd38383836200324a565b6097546001600160a01b031633146200119b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006d1565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620030c05760405162461bcd60e51b8152600401620006d19062004396565b6200119b62003275565b8154826000620030da8362003ec4565b9091555050600081815260028301602052604081206001810180549192620031028362003ec4565b909155505060078101805460ff191690556200312360058201600062003571565b6200313360068201600062003591565b60005b6004820154811015620031a5578160040181815481106200315b576200315b62003e98565b906000526020600020906005020160010160006200319091905060008155600101600081556001016000815560010160009055565b806200319c8162003ec4565b91505062003136565b50505050565b6001600160a01b0381163b6200321a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620006d1565b60008051602062005a6683398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6200325583620032aa565b600082511180620032635750805b1562000dd357620031a58383620032ec565b600054610100900460ff166200329f5760405162461bcd60e51b8152600401620006d19062004396565b6200119b3362003044565b620032b581620031ab565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062003314838360405180606001604052806027815260200162005a86602791396200331b565b9392505050565b6060600080856001600160a01b0316856040516200333a9190620043e1565b600060405180830381855af49150503d806000811462003377576040519150601f19603f3d011682016040523d82523d6000602084013e6200337c565b606091505b50915091506200338f8683838762003399565b9695505050505050565b606083156200340d57825160000362003405576001600160a01b0385163b620034055760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620006d1565b508162003419565b62003419838362003421565b949350505050565b815115620034325781518083602001fd5b8060405162461bcd60e51b8152600401620006d1919062004051565b604051806040016040528060006001600160a01b0316815260200162003473620035b4565b905290565b6040518061012001604052806000815260200160008152602001600081526020016000815260200160608152602001606081526020016060815260200160001515815260200162003473620035b4565b8260048101928215620034f9579160200282015b82811115620034f9578251825591602001919060010190620034dc565b5062003507929150620035d2565b5090565b828054828255906000526020600020908101928215620034f9579160200282015b82811115620034f957825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200352c565b611666806200440083390190565b508054600082559060005260206000209081019062000ec09190620035d2565b508054600082556007029060005260206000209081019062000ec09190620035e9565b60405180608001604052806004906020820280368337509192915050565b5b80821115620035075760008155600101620035d3565b808211156200350757600062003600828262003571565b60006001830181815560028401829055600384018290556004840182905560058401829055906200363660058301600062003571565b505050600701620035e9565b6001600160a01b038116811462000ec057600080fd5b600080604083850312156200366c57600080fd5b8235620036798162003642565b946020939093013593505050565b600080604083850312156200369b57600080fd5b50508035926020909101359150565b600060208284031215620036bd57600080fd5b8135620033148162003642565b600060208284031215620036dd57600080fd5b5035919050565b8060005b6004811015620031a5578151845260209384019390910190600101620036e8565b6001600160a01b038151168252602081015162000dd36020840182620036e4565b60a0810162000fed828462003709565b634e487b7160e01b600052604160045260246000fd5b60405160a0810167ffffffffffffffff811182821017156200377657620037766200373a565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715620037a857620037a86200373a565b604052919050565b600067ffffffffffffffff821115620037cd57620037cd6200373a565b50601f01601f191660200190565b600082601f830112620037ed57600080fd5b813562003804620037fe82620037b0565b6200377c565b8181528460208386010111156200381a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156200384b57600080fd5b8235620038588162003642565b9150602083013567ffffffffffffffff8111156200387557600080fd5b6200388385828601620037db565b9150509250929050565b600067ffffffffffffffff821115620038aa57620038aa6200373a565b5060051b60200190565b600082601f830112620038c657600080fd5b81356020620038d9620037fe836200388d565b82815260059290921b84018101918181019086841115620038f957600080fd5b8286015b8481101562003921578035620039138162003642565b8352918301918301620038fd565b509695505050505050565b6000806000606084860312156200394257600080fd5b833567ffffffffffffffff8111156200395a57600080fd5b6200396886828701620038b4565b9660208601359650604090950135949350505050565b6020808252825182820181905260009190848201906040850190845b81811015620039b8578351835292840192918401916001016200399a565b50909695505050505050565b60008060408385031215620039d857600080fd5b823591506020830135620039ec8162003642565b809150509250929050565b600081518084526020808501945080840160005b8381101562003a355762003a2187835162003709565b60a096909601959082019060010162003a0b565b509495945050505050565b600081518084526020808501945080840160005b8381101562003a355781516001600160a01b03168752958201959082019060010162003a54565b600081518084526020808501808196508360051b8101915082860160005b8581101562003b1757828403895281516040815181875262003abe8288018262003a40565b90508783015192508681038888015260c0835182528884015162003ae58a840182620036e4565b508284015193508060a083015262003b008183018562003a40565b9c89019c9750505092860192505060010162003a99565b5091979650505050505050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015161018060a084015262003b6c6101a0840182620039f7565b905060a0840151601f19808584030160c086015262003b8c838362003a40565b925060c08601519150808584030160e08601525062003bac828262003a7b565b91505060e084015161010062003bc58186018315159052565b850151905062003bda610120850182620036e4565b509392505050565b60006020828403121562003bf557600080fd5b813567ffffffffffffffff8082111562003c0e57600080fd5b9083019060a0828603121562003c2357600080fd5b62003c2d62003750565b823581526020830135602082015260408301358281111562003c4e57600080fd5b62003c5c87828601620037db565b60408301525060608301358281111562003c7557600080fd5b62003c8387828601620037db565b60608301525060808301358281111562003c9c57600080fd5b62003caa87828601620038b4565b60808301525095945050505050565b600080600080600080600080610100898b03121562003cd757600080fd5b883562003ce48162003642565b9750602089013562003cf68162003642565b979a9799505050506040860135956060810135956080820135955060a0820135945060c0820135935060e0909101359150565b60006020828403121562003d3c57600080fd5b5051919050565b60006020828403121562003d5657600080fd5b81518060000b81146200331457600080fd5b600082601f83011262003d7a57600080fd5b8151602062003d8d620037fe836200388d565b82815260059290921b8401810191818101908684111562003dad57600080fd5b8286015b848110156200392157805162003dc78162003642565b835291830191830162003db1565b600082601f83011262003de757600080fd5b8151602062003dfa620037fe836200388d565b82815260059290921b8401810191818101908684111562003e1a57600080fd5b8286015b8481101562003921578051835291830191830162003e1e565b6000806040838503121562003e4b57600080fd5b825167ffffffffffffffff8082111562003e6457600080fd5b62003e728683870162003d68565b9350602085015191508082111562003e8957600080fd5b50620038838582860162003dd5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162003ed95762003ed962003eae565b5060010190565b60608152600062003ef5606083018662003a40565b60208301949094525060400152919050565b6000806040838503121562003f1b57600080fd5b505080516020909101519092909150565b60006020828403121562003f3f57600080fd5b815167ffffffffffffffff81111562003f5757600080fd5b620034198482850162003dd5565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60005b838110156200401a57818101518382015260200162004000565b50506000910152565b600081518084526200403d81602086016020860162003ffd565b601f01601f19169290920160200192915050565b60208152600062003314602083018462004023565b6000608082840312156200407957600080fd5b82601f8301126200408957600080fd5b6040516080810181811067ffffffffffffffff82111715620040af57620040af6200373a565b604052806080840185811115620040c557600080fd5b845b81811015620040e1578051835260209283019201620040c7565b509195945050505050565b6080810162000fed8284620036e4565b805180151581146200410d57600080fd5b919050565b6000602082840312156200412557600080fd5b6200331482620040fc565b8082018082111562000fed5762000fed62003eae565b8381526000602084818401526060604084015261012083018451606085015281850151620041786080860182620036e4565b50604085015160c06101008601528051918290528201906000906101408601905b80831015620041c45783516001600160a01b0316825292840192600192909201919084019062004199565b5098975050505050505050565b60008060408385031215620041e557600080fd5b620041f083620040fc565b9150602083015167ffffffffffffffff8111156200420d57600080fd5b620038838582860162003d68565b600080604083850312156200422f57600080fd5b82519150602083015167ffffffffffffffff8111156200424e57600080fd5b620038838582860162003dd5565b6000602082840312156200426f57600080fd5b815167ffffffffffffffff8111156200428757600080fd5b8201601f810184136200429957600080fd5b8051620042aa620037fe82620037b0565b818152856020838501011115620042c057600080fd5b620042d382602083016020860162003ffd565b95945050505050565b604081526000620042f1604083018562003a40565b6020838203818501528185518084528284019150828160051b85010183880160005b838110156200434557601f198784030185526200433283835162004023565b9486019492509085019060010162004313565b50909998505050505050505050565b85815284602082015260a0604082015260006200437560a083018662003a40565b90508360608301526001600160a01b03831660808301529695505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008251620043f581846020870162003ffd565b919091019291505056fe60c0604052600060065534801561001557600080fd5b506040516116663803806116668339810160408190526100349161009b565b61003d3361004b565b60a0919091526080526100bf565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100ae57600080fd5b505080516020909101519092909150565b60805160a05161154a61011c6000396000818161027f0152610768015260008181610243015281816103aa015281816103dc015281816104150152818161044e0152818161089b0152818161093e01526109e5015261154a6000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063cc5ef00911610071578063cc5ef009146102a1578063cd5e3837146102a9578063ce7c2ac2146102bc578063d73fe0aa146102cf578063f2fde38b146102d757600080fd5b80638da5cb5b146102255780639cb8a26a14610236578063ac5553ce1461023e578063b0ef817914610265578063c27040241461027a57600080fd5b80634e3874a0116100f45780634e3874a0146101cc5780635aa68ac0146101e2578063670d14b2146101f7578063715018a61461020a5780637fd283461461021257600080fd5b80630ea6564814610131578063221f95111461015a57806335c1d3491461017557806337f8d5ff146101a057806348cd4cb1146101b5575b600080fd5b61014461013f36600461105a565b6102ea565b60405161015191906110d0565b60405180910390f35b610162610384565b60405160009190910b8152602001610151565b6101886101833660046110e3565b61048b565b6040516001600160a01b039091168152602001610151565b6101b36101ae366004611148565b6104b5565b005b6101be60065481565b604051908152602001610151565b6101d461060a565b60405161015192919061120c565b6101ea61078f565b604051610151919061122d565b61014461020536600461105a565b6107f1565b6101b361080a565b6101b361022036600461127a565b61081e565b6000546001600160a01b0316610188565b6101b3610ae1565b6101be7f000000000000000000000000000000000000000000000000000000000000000081565b61026d610af7565b60405161015191906112ec565b6101be7f000000000000000000000000000000000000000000000000000000000000000081565b61026d610c55565b6101446102b736600461105a565b610dad565b6101446102ca36600461105a565b610dc6565b61026d610ddf565b6101b36102e536600461105a565b610f37565b60036020526000908152604090208054610303906112ff565b80601f016020809104026020016040519081016040528092919081815260200182805461032f906112ff565b801561037c5780601f106103515761010080835404028352916020019161037c565b820191906000526020600020905b81548152906001019060200180831161035f57829003601f168201915b505050505081565b60006006546000036103965750600090565b6000600654436103a69190611349565b90507f000000000000000000000000000000000000000000000000000000000000000081116103d757600191505090565b6104027f00000000000000000000000000000000000000000000000000000000000000006002611362565b811161041057600291505090565b61043b7f00000000000000000000000000000000000000000000000000000000000000006003611362565b811161044957600391505090565b6104747f00000000000000000000000000000000000000000000000000000000000000006004611362565b811161048257600491505090565b60001991505090565b6005818154811061049b57600080fd5b6000918252602090912001546001600160a01b0316905081565b6006541561050a5760405162461bcd60e51b815260206004820152601760248201527f444b472068617320616c7265616479207374617274656400000000000000000060448201526064015b60405180910390fd5b610512610fb0565b60005b838110156105ff57600585858381811061053157610531611379565b9050602002016020810190610546919061105a565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b0390921691909117905582828281811061058a5761058a611379565b905060200281019061059c919061138f565b600160008888868181106105b2576105b2611379565b90506020020160208101906105c7919061105a565b6001600160a01b031681526020810191909152604001600020916105ec91908361143a565b50806105f7816114fb565b915050610515565b505043600655505050565b60006060600060058054905067ffffffffffffffff81111561062e5761062e6113d6565b60405190808252806020026020018201604052801561066157816020015b606081526020019060019003908161064c5790505b50905060005b60055481101561076557600160006005838154811061068857610688611379565b60009182526020808320909101546001600160a01b03168352820192909252604001902080546106b7906112ff565b80601f01602080910402602001604051908101604052809291908181526020018280546106e3906112ff565b80156107305780601f1061070557610100808354040283529160200191610730565b820191906000526020600020905b81548152906001019060200180831161071357829003601f168201915b505050505082828151811061074757610747611379565b6020026020010181905250808061075d906114fb565b915050610667565b507f0000000000000000000000000000000000000000000000000000000000000000939092509050565b606060058054806020026020016040519081016040528092919081815260200182805480156107e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116107c9575b5050505050905090565b60016020526000908152604090208054610303906112ff565b610812610fb0565b61081c600061100a565b565b3360009081526001602052604081208054610838906112ff565b9050116108875760405162461bcd60e51b815260206004820152601b60248201527f796f7520617265206e6f7420612067726f7570206d656d6265722100000000006044820152606401610501565b6000600654436108979190611349565b90507f000000000000000000000000000000000000000000000000000000000000000081116109395733600090815260026020526040902080546108da906112ff565b1590506109195760405162461bcd60e51b815260206004820152600d60248201526c1cda185c9948195e1a5cdd1959609a1b6044820152606401610501565b33600090815260026020526040902061093383858361143a565b50505050565b6109647f00000000000000000000000000000000000000000000000000000000000000006002611362565b81116109e0573360009081526003602052604090208054610984906112ff565b1590506109c65760405162461bcd60e51b815260206004820152601060248201526f1c995cdc1bdb9cd948195e1a5cdd195960821b6044820152606401610501565b33600090815260036020526040902061093383858361143a565b610a0b7f00000000000000000000000000000000000000000000000000000000000000006003611362565b8111610a94573360009081526004602052604090208054610a2b906112ff565b159050610a7a5760405162461bcd60e51b815260206004820152601560248201527f6a757374696669636174696f6e206578697374656400000000000000000000006044820152606401610501565b33600090815260046020526040902061093383858361143a565b60405162461bcd60e51b815260206004820152601560248201527f444b47205075626c6973682068617320656e64656400000000000000000000006044820152606401610501565b505050565b610ae9610fb0565b6000546001600160a01b0316ff5b60055460609060009067ffffffffffffffff811115610b1857610b186113d6565b604051908082528060200260200182016040528015610b4b57816020015b6060815260200190600190039081610b365790505b50905060005b600554811015610c4f576004600060058381548110610b7257610b72611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610ba1906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610bcd906112ff565b8015610c1a5780601f10610bef57610100808354040283529160200191610c1a565b820191906000526020600020905b815481529060010190602001808311610bfd57829003601f168201915b5050505050828281518110610c3157610c31611379565b60200260200101819052508080610c47906114fb565b915050610b51565b50919050565b60055460609060009067ffffffffffffffff811115610c7657610c766113d6565b604051908082528060200260200182016040528015610ca957816020015b6060815260200190600190039081610c945790505b50905060005b600554811015610c4f576003600060058381548110610cd057610cd0611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610cff906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2b906112ff565b8015610d785780601f10610d4d57610100808354040283529160200191610d78565b820191906000526020600020905b815481529060010190602001808311610d5b57829003601f168201915b5050505050828281518110610d8f57610d8f611379565b60200260200101819052508080610da5906114fb565b915050610caf565b60046020526000908152604090208054610303906112ff565b60026020526000908152604090208054610303906112ff565b60055460609060009067ffffffffffffffff811115610e0057610e006113d6565b604051908082528060200260200182016040528015610e3357816020015b6060815260200190600190039081610e1e5790505b50905060005b600554811015610c4f576002600060058381548110610e5a57610e5a611379565b60009182526020808320909101546001600160a01b0316835282019290925260400190208054610e89906112ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb5906112ff565b8015610f025780601f10610ed757610100808354040283529160200191610f02565b820191906000526020600020905b815481529060010190602001808311610ee557829003601f168201915b5050505050828281518110610f1957610f19611379565b60200260200101819052508080610f2f906114fb565b915050610e39565b610f3f610fb0565b6001600160a01b038116610fa45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b610fad8161100a565b50565b6000546001600160a01b0316331461081c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610501565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561106c57600080fd5b81356001600160a01b038116811461108357600080fd5b9392505050565b6000815180845260005b818110156110b057602081850181015186830182015201611094565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000611083602083018461108a565b6000602082840312156110f557600080fd5b5035919050565b60008083601f84011261110e57600080fd5b50813567ffffffffffffffff81111561112657600080fd5b6020830191508360208260051b850101111561114157600080fd5b9250929050565b6000806000806040858703121561115e57600080fd5b843567ffffffffffffffff8082111561117657600080fd5b611182888389016110fc565b9096509450602087013591508082111561119b57600080fd5b506111a8878288016110fc565b95989497509550505050565b600082825180855260208086019550808260051b84010181860160005b848110156111ff57601f198684030189526111ed83835161108a565b988401989250908301906001016111d1565b5090979650505050505050565b82815260406020820152600061122560408301846111b4565b949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561126e5783516001600160a01b031683529284019291840191600101611249565b50909695505050505050565b6000806020838503121561128d57600080fd5b823567ffffffffffffffff808211156112a557600080fd5b818501915085601f8301126112b957600080fd5b8135818111156112c857600080fd5b8660208285010111156112da57600080fd5b60209290920196919550909350505050565b60208152600061108360208301846111b4565b600181811c9082168061131357607f821691505b602082108103610c4f57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561135c5761135c611333565b92915050565b808202811582820484141761135c5761135c611333565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113a657600080fd5b83018035915067ffffffffffffffff8211156113c157600080fd5b60200191503681900382131561114157600080fd5b634e487b7160e01b600052604160045260246000fd5b601f821115610adc57600081815260208120601f850160051c810160208610156114135750805b601f850160051c820191505b818110156114325782815560010161141f565b505050505050565b67ffffffffffffffff831115611452576114526113d6565b6114668361146083546112ff565b836113ec565b6000601f84116001811461149a57600085156114825750838201355b600019600387901b1c1916600186901b1783556114f4565b600083815260209020601f19861690835b828110156114cb57868501358255602094850194600190920191016114ab565b50868210156114e85760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60006001820161150d5761150d611333565b506001019056fea2646970667358221220fa05377607ecc6548d8101a54019d147738c74cac6c9434b650cbf8f1260a61f64736f6c63430008120033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122044a029635051ab03c46b7869f8fa93d82f221e16634fc6955c11862d454338d164736f6c63430008120033", + "sourceMap": "719:16101:100:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13929:124;;;;;;;;;;-1:-1:-1;14025:21:100;;13929:124;;;160:25:148;;;148:2;133:18;13929:124:100;;;;;;;;12501:308;;;;;;;;;;-1:-1:-1;12501:308:100;;;;;:::i;:::-;;:::i;:::-;;9832:2097;;;;;;;;;;-1:-1:-1;9832:2097:100;;;;;:::i;:::-;;:::i;4951:788::-;;;;;;;;;;-1:-1:-1;4951:788:100;;;;;:::i;:::-;;:::i;3408:195:57:-;;;;;;;;;;-1:-1:-1;3408:195:57;;;;;:::i;:::-;;:::i;14662:189:100:-;;;;;;;;;;-1:-1:-1;14662:189:100;;;;;:::i;:::-;;:::i;:::-;;;;1350:25:148;;;1406:2;1391:18;;1384:34;;;;1323:18;14662:189:100;1180:244:148;14857:145:100;;;;;;;;;;-1:-1:-1;14857:145:100;;;;;:::i;:::-;14944:7;14970:25;;;:13;:25;;;;;;-1:-1:-1;;;;;14970:25:100;;14857:145;;;;-1:-1:-1;;;;;1778:55:148;;;1760:74;;1748:2;1733:18;14857:145:100;1614:226:148;14428:228:100;;;;;;;;;;-1:-1:-1;14428:228:100;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3922:220:57:-;;;;;;:::i;:::-;;:::i;15008:92:100:-;;;;;;;;;;-1:-1:-1;15082:11:100;;15008:92;;3027:131:57;;;;;;;;;;;;;:::i;2085:101:51:-;;;;;;;;;;;;;:::i;13826:97:100:-;;;;;;;;;;-1:-1:-1;13900:10:100;:16;13826:97;;1462:85:51;;;;;;;;;;-1:-1:-1;1534:6:51;;-1:-1:-1;;;;;1534:6:51;1462:85;;12165:330:100;;;;;;;;;;-1:-1:-1;12165:330:100;;;;;:::i;:::-;;:::i;13670:150::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;15192:451::-;;;;;;;;;;-1:-1:-1;15192:451:100;;;;;:::i;:::-;;:::i;:::-;;;7294:14:148;;7287:22;7269:41;;7257:2;7242:18;15192:451:100;7129:187:148;14059:148:100;;;;;;;;;;-1:-1:-1;14059:148:100;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;12815:849::-;;;;;;;;;;-1:-1:-1;13295:7:100;:35;13344:30;;13388:37;;13439:36;;13489:31;;13534:27;;13575:30;;13619:28;;12815:849;;;-1:-1:-1;;;;;13295:35:100;;;11301:34:148;;13344:30:100;;;;11366:2:148;11351:18;;11344:43;11403:18;;;11396:34;;;;11461:2;11446:18;;11439:34;;;;11504:3;11489:19;;11482:35;11548:3;11533:19;;11526:35;11592:3;11577:19;;11570:35;11636:3;11621:19;;11614:35;11227:3;11212:19;12815:849:100;10897:758:148;5745:4081:100;;;;;;;;;;-1:-1:-1;5745:4081:100;;;;;:::i;:::-;;:::i;4439:506::-;;;;;;;;;;-1:-1:-1;4439:506:100;;;;;:::i;:::-;;:::i;3154:1218::-;;;;;;;;;;-1:-1:-1;3154:1218:100;;;;;:::i;:::-;;:::i;2335:198:51:-;;;;;;;;;;-1:-1:-1;2335:198:51;;;;;:::i;:::-;;:::i;11935:224:100:-;;;;;;;;;;-1:-1:-1;11935:224:100;;;;;:::i;:::-;;:::i;14213:209::-;;;;;;;;;;-1:-1:-1;14213:209:100;;;;;:::i;:::-;14303:7;14339:29;;;:17;:29;;;;;:39;;;;:17;14380:34;;;;14339:39;;14213:209;2834:127;;;;;;;;;;-1:-1:-1;2834:127:100;;;;;:::i;:::-;;:::i;12501:308::-;12623:7;:35;-1:-1:-1;;;;;12623:35:100;12609:10;:49;12605:110;;12681:23;;-1:-1:-1;;;12681:23:100;;;;;;;;;;;12605:110;12733:30;;12724:78;;-1:-1:-1;;;12724:78:100;;-1:-1:-1;;;;;14007:55:148;;;12724:78:100;;;13989:74:148;14079:18;;;14072:34;;;12733:30:100;;;;12724:56;;13962:18:148;;12724:78:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12501:308;;:::o;9832:2097::-;9955:21;;9941:35;;9937:98;;9999:25;;-1:-1:-1;;;9999:25:100;;;;;160::148;;;133:18;;9999:25:100;;;;;;;;9937:98;10093:58;;-1:-1:-1;;;10093:58:100;;:10;:58;;;14356:25:148;14397:18;;;14390:34;;;10140:10:100;14440:18:148;;;14433:83;10093:34:100;;;;14329:18:148;;10093:58:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:64;10089:140;;10180:38;;-1:-1:-1;;;10180:38:100;;;;;14889:25:148;;;10207:10:100;14930:18:148;;;14923:83;14862:18;;10180:38:100;14715:297:148;10089:140:100;10272:15;10290:29;;;:17;:29;;;;;10347:7;;;;10333:21;;10329:105;;10415:7;;;;10377:46;;-1:-1:-1;;;10377:46:100;;;;;15219:25:148;;;15260:18;;;15253:34;;;15303:18;;;15296:34;;;;15192:18;;10377:46:100;15017:319:148;10329:105:100;10523:1;10486:25;;;:13;:25;;;;;;-1:-1:-1;;;;;10486:25:100;10482:108;;10548:31;;-1:-1:-1;;;10548:31:100;;;;;160:25:148;;;133:18;;10548:31:100;14:177:148;10482:108:100;10647:24;10687:25;;;:13;:25;;;;;;;;;;10727:21;;-1:-1:-1;;;10727:21:100;;;;-1:-1:-1;;;;;10687:25:100;;;;;;10727:19;;:21;;;;;;;;;;10687:25;10727:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:27;;-1:-1:-1;;10727:27:100;10723:118;;10796:10;10808:11;-1:-1:-1;;;;;10808:19:100;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10777:53;;-1:-1:-1;;;10777:53:100;;;;;15790:25:148;;;;-1:-1:-1;15851:21:148;15831:18;;;15824:49;15763:18;;10777:53:100;15622:257:148;10723:118:100;10881:11;-1:-1:-1;;;;;10881:24:100;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10983:1:100;10947:25;;;:13;:25;;;;;:38;;-1:-1:-1;;;;;;10947:38:100;;;-1:-1:-1;11036:36:100;;;;;;11031:638;;11234:11;;11184:62;;-1:-1:-1;;;11184:62:100;;:10;:62;;;15219:25:148;15260:18;;;15253:34;;;15303:18;;;15296:34;;;;11089:33:100;;;;11184:37;;;;15192:18:148;;11184:62:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11184:62:100;;;;;;;;;;;;:::i;:::-;11088:158;;;;11266:9;11261:248;11285:16;:23;11281:1;:27;11261:248;;;11347:7;:35;11415:19;;-1:-1:-1;;;;;11347:35:100;;;;11333:60;;11415:16;;11432:1;;11415:19;;;;;;:::i;:::-;;;;;;;;;;;11436:37;;11333:161;;-1:-1:-1;;;;;;11333:161:100;;;;;;;-1:-1:-1;;;;;18627:55:148;;;11333:161:100;;;18609:74:148;18699:18;;;18692:34;11475:1:100;18742:18:148;;;18735:34;18582:18;;11333:161:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11310:3;;;;;:::i;:::-;;;;11261:248;;;;11527:9;11522:137;11546:23;:30;11542:1;:34;11522:137;;;11601:43;11617:23;11641:1;11617:26;;;;;;;;:::i;:::-;;;;;;;11601:15;:43::i;:::-;11578:3;;;;:::i;:::-;;;;11522:137;;;;11074:595;;11031:638;11753:16;;;11767:1;11753:16;;;;;;;;;11722:28;;11753:16;;;;;;;;;;;-1:-1:-1;11753:16:100;11722:47;;11796:10;11779:11;11791:1;11779:14;;;;;;;;:::i;:::-;-1:-1:-1;;;;;11779:27:100;;;:14;;;;;;;;;:27;11830:7;:35;11893:28;;11816:106;;-1:-1:-1;;;11816:106:100;;11830:35;;;;;11816:60;;:106;;11877:11;;11830:35;;11893:28;;11816:106;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9927:2002;;;9832:2097;;:::o;4951:788::-;5052:7;:35;-1:-1:-1;;;;;5052:35:100;5038:10;:49;5034:110;;5110:23;;-1:-1:-1;;;5110:23:100;;;;;;;;;;;5034:110;5196:58;;-1:-1:-1;;;5196:58:100;;:10;:58;;;14889:25:148;-1:-1:-1;;;;;14950:55:148;;14930:18;;;14923:83;5155:17:100;;;;5196:43;;;;14862:18:148;;5196:58:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5154:100;;;;5269:10;-1:-1:-1;;5269:16:100;5265:468;;5351:1;5305:34;;;:13;:34;;;;;;-1:-1:-1;;;;;5305:34:100;:48;5301:121;;5380:27;;-1:-1:-1;;;5380:27:100;;;;;;;;;;;5301:121;5559:11;;5495:76;;-1:-1:-1;;;5495:76:100;;:10;:76;;;20323:25:148;20364:18;;;20357:34;;;20407:18;;;20400:34;;;20450:18;;;20443:34;;;;5436:40:100;;5495:20;;;;20295:19:148;;5495:76:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5495:76:100;;;;;;;;;;;;:::i;:::-;5436:135;;5591:9;5586:137;5610:23;:30;5606:1;:34;5586:137;;;5665:43;5681:23;5705:1;5681:26;;;;;;;;:::i;5665:43::-;5642:3;;;;:::i;:::-;;;;5586:137;;;;5287:446;5265:468;5024:715;;4951:788;:::o;3408:195:57:-;-1:-1:-1;;;;;1764:6:57;1747:23;1755:4;1747:23;1739:80;;;;-1:-1:-1;;;1739:80:57;;;;;;;:::i;:::-;1861:6;-1:-1:-1;;;;;1837:30:57;:20;-1:-1:-1;;;;;;;;;;;1557:65:54;-1:-1:-1;;;;;1557:65:54;;1478:151;1837:20:57;-1:-1:-1;;;;;1837:30:57;;1829:87;;;;-1:-1:-1;;;1829:87:57;;;;;;;:::i;:::-;3489:36:::1;3507:17;3489;:36::i;:::-;3576:12;::::0;;3586:1:::1;3576:12:::0;;;::::1;::::0;::::1;::::0;;;3535:61:::1;::::0;3557:17;;3576:12;3535:21:::1;:61::i;:::-;3408:195:::0;:::o;14662:189:100:-;14788:56;;-1:-1:-1;;;14788:56:100;;:10;:56;;;14889:25:148;-1:-1:-1;;;;;14950:55:148;;14930:18;;;14923:83;14755:6:100;;;;14788:43;;;;14862:18:148;;14788:56:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;14781:63;;;;14662:189;;;:::o;14428:228::-;14563:13;;:::i;:::-;14599:29;;;;:17;:29;;;;;:37;;:50;;14637:11;;14599:50;;;;;;:::i;:::-;;;;;;;;;;14592:57;;;;;;;;14599:50;;;;;;;14592:57;;-1:-1:-1;;;;;14592:57:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14428:228;;;;;:::o;3922:220:57:-;-1:-1:-1;;;;;1764:6:57;1747:23;1755:4;1747:23;1739:80;;;;-1:-1:-1;;;1739:80:57;;;;;;;:::i;:::-;1861:6;-1:-1:-1;;;;;1837:30:57;:20;-1:-1:-1;;;;;;;;;;;1557:65:54;-1:-1:-1;;;;;1557:65:54;;1478:151;1837:20:57;-1:-1:-1;;;;;1837:30:57;;1829:87;;;;-1:-1:-1;;;1829:87:57;;;;;;;:::i;:::-;4037:36:::1;4055:17;4037;:36::i;:::-;4083:52;4105:17;4124:4;4130;4083:21;:52::i;:::-;3922:220:::0;;:::o;3027:131::-;3105:7;2190:4;-1:-1:-1;;;;;2199:6:57;2182:23;;2174:92;;;;-1:-1:-1;;;2174:92:57;;21884:2:148;2174:92:57;;;21866:21:148;21923:2;21903:18;;;21896:30;21962:34;21942:18;;;21935:62;22033:26;22013:18;;;22006:54;22077:19;;2174:92:57;21682:420:148;2174:92:57;-1:-1:-1;;;;;;;;;;;;3027:131:57;:::o;2085:101:51:-;1355:13;:11;:13::i;:::-;2149:30:::1;2176:1;2149:18;:30::i;:::-;2085:101::o:0;12165:330:100:-;12306:30;;-1:-1:-1;;;;;12306:30:100;12292:10;:44;12288:100;;12359:18;;-1:-1:-1;;;12359:18:100;;;;;;;;;;;12288:100;12412:7;:35;12398:90;;-1:-1:-1;;;12398:90:100;;-1:-1:-1;;;;;12412:35:100;;;;12398:60;;:90;;12459:5;;12466:9;;12477:10;;12398:90;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12165:330;;;:::o;13670:150::-;13780:33;;-1:-1:-1;;;13780:33:100;;:10;:33;;;160:25:148;13745:16:100;;13780:31;;;;133:18:148;;13780:33:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;13780:33:100;;;;;;;;;;;;:::i;:::-;13773:40;;13670:150;:::o;15192:451::-;15342:4;15379:29;;;:17;:29;;;;;;;;15362:46;;;;;;;;;;;;;;;;;;;15379:17;15362:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15342:4;;15362:46;;;;;;;;;;15342:4;;15362:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15362:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15362:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15362:46:100;;;;;;;;;;;;;;;;-1:-1:-1;;;15362:46:100;;;-1:-1:-1;;15362:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15362:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15362:46:100;;;-1:-1:-1;15362:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15423:9;15418:197;15442:1;:9;;;:16;15438:1;:20;15418:197;;;15513:13;-1:-1:-1;;;;;15483:43:100;:1;:9;;;15493:1;15483:12;;;;;;;;:::i;:::-;;;;;;;:26;;;-1:-1:-1;;;;;15483:43:100;;15479:126;;15553:1;:9;;;15563:1;15553:12;;;;;;;;:::i;:::-;;;;;;;:29;;;15583:1;15553:32;;;;;;;:::i;:::-;;;;;15589:1;15553:37;;15546:44;;;;;;15479:126;15460:3;;;;:::i;:::-;;;;15418:197;;;-1:-1:-1;15631:5:100;;15192:451;-1:-1:-1;;;;15192:451:100:o;14059:148::-;14140:12;;:::i;:::-;14171:29;;;;:17;:29;;;;;;;;14164:36;;;;;;;;;;;;;;;;;;;14171:17;14164:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14171:29;;14164:36;;;;;;;;14171:29;14164:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14164:36:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14164:36:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14164:36:100;;;;;;;;;;;;;;;;-1:-1:-1;;;14164:36:100;;;-1:-1:-1;;14164:36:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14164:36:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;14164:36:100;;;-1:-1:-1;14164:36:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14059:148;;;:::o;5745:4081::-;5861:21;;5840:17;;:42;5836:112;;5919:17;;5905:32;;-1:-1:-1;;;5905:32:100;;;;;160:25:148;;;;133:18;;5905:32:100;14:177:148;5836:112:100;6014:17;;6044:1;6000:32;;;:13;:32;;;;;;-1:-1:-1;;;;;6000:32:100;5996:122;;6089:17;;6069:38;;-1:-1:-1;;;6069:38:100;;;;;160:25:148;;;;133:18;;6069:38:100;14:177:148;5996:122:100;6225:17;;6171:24;6211:32;;;:13;:32;;;;;;;;;;6258:21;;-1:-1:-1;;;6258:21:100;;;;-1:-1:-1;;;;;6211:32:100;;;;;;6258:19;;:21;;;;;;;;;;6211:32;6258:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:27;;;6254:100;;6325:17;;6308:35;;-1:-1:-1;;;6308:35:100;;;;;160:25:148;;;;133:18;;6308:35:100;14:177:148;6254:100:100;6498:17;;6462:15;6480:36;;;:17;:36;;;;;;;;6551:7;;;;6530:17;;;;6480:36;;6530:28;6526:126;;6595:17;;6614;;;;6633:7;;;;6581:60;;-1:-1:-1;;;6581:60:100;;;;;15219:25:148;;;;15260:18;;;15253:34;;;;15303:18;;;15296:34;15192:18;;6581:60:100;15017:319:148;6526:126:100;6701:17;;6666:65;;-1:-1:-1;;;6666:65:100;;:10;:65;;;14356:25:148;14397:18;;;14390:34;;;;6720:10:100;14440:18:148;;;14433:83;6666:34:100;;;;14329:18:148;;6666:65:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;6662:154;;6775:17;;6760:45;;-1:-1:-1;;;6760:45:100;;;;;14889:25:148;;;;6794:10:100;14930:18:148;;;14923:83;14862:18;;6760:45:100;14715:297:148;6662:154:100;6921:17;;6898:53;;6940:10;6898:22;:53::i;:::-;6894:149;;;7002:17;;6974:58;;-1:-1:-1;;;6974:58:100;;;;;14889:25:148;;;;7021:10:100;14930:18:148;;;14923:83;14862:18;;6974:58:100;14715:297:148;6894:149:100;7203:23;;;;7180:47;;-1:-1:-1;;;7180:47:100;;7143:34;;7180:3;;:22;;:47;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7242:38;;-1:-1:-1;;;7242:38:100;;7143:84;;-1:-1:-1;7242:3:100;;:20;;:38;;7143:84;;7242:38;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7237:106;;7303:29;;-1:-1:-1;;;7303:29:100;;;;;;;;;;;7237:106;7406:16;;;;;7383:40;;-1:-1:-1;;;7383:40:100;;7353:27;;7383:3;;:22;;:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7438:31;;-1:-1:-1;;;7438:31:100;;7353:70;;-1:-1:-1;7438:3:100;;:20;;:31;;7353:70;;7438:31;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7433:92;;7492:22;;-1:-1:-1;;;7492:22:100;;;;;;;;;;;7433:92;7715:17;;7680:65;;-1:-1:-1;;;7680:65:100;;:10;7662:9;7680:65;;;14356:25:148;;;;14397:18;;;14390:34;;;;7734:10:100;14440:18:148;;;14433:83;7779:16:100;;7662:9;;;7680:34;;;;14329:18:148;;7680:65:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7662:85;;;;;;;;:::i;:::-;;;;;;;;;;;:102;;:133;;;;;;;:::i;:::-;-1:-1:-1;7953:36:100;;;;;;7948:1872;;8061:9;8056:569;8080:6;:24;;;:31;8076:1;:35;8056:569;;;8140:10;:34;;;;8175:6;:17;;;8194:6;:24;;;8219:1;8194:27;;;;;;;;:::i;:::-;;;;;;;8140:82;;;;;;;;;;;;;;;;14356:25:148;;;14412:2;14397:18;;14390:34;;;;-1:-1:-1;;;;;14460:55:148;14455:2;14440:18;;14433:83;14344:2;14329:18;;14117:405;8140:82:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:88;8136:204;;8274:17;;8293:24;;;;:27;;8318:1;;8293:27;;;;;;:::i;:::-;;;;;;;8259:62;;-1:-1:-1;;;8259:62:100;;;;;;;;14889:25:148;;;-1:-1:-1;;;;;14950:55:148;14945:2;14930:18;;14923:83;14877:2;14862:18;;14715:297;8136:204:100;8362:9;8374:5;:1;8378;8374:5;:::i;:::-;8362:17;;8357:254;8385:6;:24;;;:31;8381:1;:35;8357:254;;;8480:6;:24;;;8505:1;8480:27;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;8449:58:100;:6;:24;;;8474:1;8449:27;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;8449:58:100;;8445:148;;8542:28;;-1:-1:-1;;;8542:28:100;;;;;;;;;;;8445:148;8418:3;;;;:::i;:::-;;;;8357:254;;;-1:-1:-1;8113:3:100;;;;:::i;:::-;;;;8056:569;;;-1:-1:-1;8725:174:100;;;;;;;;8768:17;;;;;8725:174;;;;;;;8860:24;;;;8725:174;;;;8958:17;;8919:71;;-1:-1:-1;;;8919:71:100;;8725:174;;8919:38;;;;:71;;:10;;8958:17;8725:174;;8919:71;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8914:351;;9063:74;;;9133:1;9063:74;;;9119:16;;;;;;;;;-1:-1:-1;;9063:74:100;;9119:16;;;;;;;;-1:-1:-1;;;9063:74:100;;;;;;;9156:25;;:28;;9010:127;;-1:-1:-1;9187:10:100;;-1:-1:-1;;9156:28:100;;;;:::i;:::-;-1:-1:-1;;;;;9156:41:100;;;:28;;;;;;;;;;:41;9215:17;;;:35;;;;;;;-1:-1:-1;9215:35:100;;;;;;;;;;;9238:11;;9215:35;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;9215:35:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;9215:35:100;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;8992:273;8914:351;9374:17;;9393:11;;9348:57;;-1:-1:-1;;;9348:57:100;;:10;:57;;;15219:25:148;15260:18;;;15253:34;;;;15303:18;;;15296:34;9280:12:100;;;;9348:25;;;;15192:18:148;;9348:57:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9348:57:100;;;;;;;;;;;;:::i;:::-;9279:126;;;;9424:7;9420:390;;;9535:9;9530:266;9554:17;:24;9550:1;:28;9530:266;;;9621:7;:35;9693:20;;-1:-1:-1;;;;;9621:35:100;;;;9607:60;;9693:17;;9711:1;;9693:20;;;;;;:::i;:::-;;;;;;;;;;;9715:37;;9607:170;;-1:-1:-1;;;;;;9607:170:100;;;;;;;-1:-1:-1;;;;;18627:55:148;;;9607:170:100;;;18609:74:148;18699:18;;;18692:34;9754:1:100;18742:18:148;;;18735:34;18582:18;;9607:170:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9580:3;;;;;:::i;:::-;;;;9530:266;;9420:390;7991:1829;;;5826:4000;;;;5745:4081;:::o;4439:506::-;4557:7;:35;4520:7;;-1:-1:-1;;;;;4557:35:100;4543:10;:49;4539:110;;4615:23;;-1:-1:-1;;;4615:23:100;;;;;;;;;;;4539:110;4759:11;;4724:47;;-1:-1:-1;;;4724:47:100;;:10;:47;;;27234:25:148;-1:-1:-1;;;;;27295:55:148;;27275:18;;;27268:83;27367:18;;;27360:34;;;;4660:18:100;;;;4724:19;;;;27207:18:148;;4724:47:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4724:47:100;;;;;;;;;;;;:::i;:::-;4659:112;;;;4787:9;4782:129;4806:23;:30;4802:1;:34;4782:129;;;4857:43;4873:23;4897:1;4873:26;;;;;;;;:::i;4857:43::-;4838:3;;;;:::i;:::-;;;;4782:129;;;-1:-1:-1;4928:10:100;;4439:506;-1:-1:-1;;;4439:506:100:o;3154:1218::-;1355:13:51;:11;:13::i;:::-;3580:350:100::1;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;3580:350:100;;::::1;::::0;;;;;::::1;;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;3570:7:::1;:360:::0;;-1:-1:-1;;;;;;3570:360:100;;::::1;::::0;;::::1;::::0;;;;;;;::::1;::::0;;::::1;::::0;;;;;;;;;;;;;;3941:86;-1:-1:-1;;;3941:86:100;;:10:::1;3570:360;3941:86:::0;::::1;20323:25:148::0;20364:18;;;20357:34;;;20407:18;;;20400:34;;;20450:18;;;20443:34;;;3941:20:100::1;::::0;::::1;::::0;20295:19:148;;3941:86:100::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;4043:322:100::1;::::0;;-1:-1:-1;;;;;11319:15:148;;;11301:34;;11371:15;;11366:2;11351:18;;11344:43;11403:18;;;11396:34;;;11461:2;11446:18;;11439:34;;;11504:3;11489:19;;11482:35;;;11548:3;11533:19;;11526:35;;;11592:3;11577:19;;11570:35;;;11636:3;11621:19;;11614:35;;;4043:322:100::1;::::0;-1:-1:-1;11227:3:148;11212:19;;-1:-1:-1;4043:322:100::1;;;;;;;3154:1218:::0;;;;;;;;:::o;2335:198:51:-;1355:13;:11;:13::i;:::-;-1:-1:-1;;;;;2423:22:51;::::1;2415:73;;;::::0;-1:-1:-1;;;2415:73:51;;28036:2:148;2415:73:51::1;::::0;::::1;28018:21:148::0;28075:2;28055:18;;;28048:30;28114:34;28094:18;;;28087:62;-1:-1:-1;;;28165:18:148;;;28158:36;28211:19;;2415:73:51::1;27834:402:148::0;2415:73:51::1;2498:28;2517:8;2498:18;:28::i;11935:224:100:-:0;12037:30;;-1:-1:-1;;;;;12037:30:100;12023:10;:44;12019:100;;12090:18;;-1:-1:-1;;;12090:18:100;;;;;;;;;;;12019:100;12128:11;:24;11935:224::o;2834:127::-;3279:19:56;3302:13;;;;;;3301:14;;3347:34;;;;-1:-1:-1;3365:12:56;;3380:1;3365:12;;;;:16;3347:34;3346:108;;;-1:-1:-1;3426:4:56;1713:19:58;:23;;;3387:66:56;;-1:-1:-1;3436:12:56;;;;;:17;3387:66;3325:201;;;;-1:-1:-1;;;3325:201:56;;28443:2:148;3325:201:56;;;28425:21:148;28482:2;28462:18;;;28455:30;28521:34;28501:18;;;28494:62;-1:-1:-1;;;28572:18:148;;;28565:44;28626:19;;3325:201:56;28241:410:148;3325:201:56;3536:12;:16;;-1:-1:-1;;3536:16:56;3551:1;3536:16;;;3562:65;;;;3596:13;:20;;-1:-1:-1;;3596:20:56;;;;;3562:65;2903:11:100::1;:24:::0;;;2938:16:::1;:14;:16::i;:::-;3651:14:56::0;3647:99;;;3697:5;3681:21;;-1:-1:-1;;3681:21:56;;;3721:14;;-1:-1:-1;28808:36:148;;3721:14:56;;28796:2:148;28781:18;3721:14:56;;;;;;;3269:483;2834:127:100;:::o;15708:1110::-;15772:40;:10;15801;15772:28;:40::i;:::-;15823:14;15840:29;;;:17;:29;;;;;;;;15823:46;;;;;;;;;;;;;;;;;;;15840:17;15823:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15840:29;;15823:46;;;;;;;:14;;:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15823:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15823:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15823:46:100;;;;;;;;;;;;;;;;-1:-1:-1;;;15823:46:100;;;-1:-1:-1;;15823:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15823:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15823:46:100;;;-1:-1:-1;15823:46:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15939:23;16002:1;:11;;;16015:7;:31;;;15986:61;;;;;:::i;:::-;1350:25:148;;;1406:2;1391:18;;1384:34;1338:2;1323:18;15986:61:100;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16057:25:100;;;;:13;:25;;;;;;:48;;-1:-1:-1;;;;;;16057:48:100;-1:-1:-1;;;;;16057:48:100;;;;;16194:6;;;16057:48;;-1:-1:-1;16057:25:100;16180:21;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16180:21:100;;16150:51;;16211:24;16250:1;:6;;;16238:19;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16211:46;;16273:9;16268:338;16292:1;:6;;;16288:1;:10;16268:338;;;16335:1;:9;;;16345:1;16335:12;;;;;;;;:::i;:::-;;;;;;;:26;;;16319:10;16330:1;16319:13;;;;;;;;:::i;:::-;-1:-1:-1;;;;;16319:42:100;;;:13;;;;;;;;;:42;16474:7;:35;16527:9;;;;:12;;16416:25;;16474:35;;;;;16460:66;;16527:9;16537:1;;16527:12;;;;;;:::i;:::-;;;;;;;;;;;:26;16460:94;;-1:-1:-1;;;;;;16460:94:100;;;;;;;-1:-1:-1;;;;;1778:55:148;;;16460:94:100;;;1760:74:148;1733:18;;16460:94:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16460:94:100;;;;;;;;;;;;:::i;:::-;16416:138;;16583:12;16568:9;16578:1;16568:12;;;;;;;;:::i;:::-;;;;;;:27;;;;16305:301;16300:3;;;;;:::i;:::-;;;;16268:338;;;-1:-1:-1;16616:45:100;;-1:-1:-1;;;16616:45:100;;-1:-1:-1;;;;;16616:22:100;;;;;:45;;16639:10;;16651:9;;16616:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16725:1;:7;;;16716:1;:7;;;16698:10;:16;;;16677:134;16734:1;:6;;;16742:1;:11;;;16755:10;16767:12;16789:11;16677:134;;;;;;;;;;:::i;:::-;;;;;;;;15762:1056;;;;15708:1110;:::o;3016:66::-;1355:13:51;:11;:13::i;2841:944:54:-;839:66;3257:59;;;3253:526;;;3332:37;3351:17;3332:18;:37::i;3253:526::-;3433:17;-1:-1:-1;;;;;3404:61:54;;:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3404:63:54;;;;;;;;-1:-1:-1;;3404:63:54;;;;;;;;;;;;:::i;:::-;;;3400:302;;3631:56;;-1:-1:-1;;;3631:56:54;;31471:2:148;3631:56:54;;;31453:21:148;31510:2;31490:18;;;31483:30;31549:34;31529:18;;;31522:62;-1:-1:-1;;;31600:18:148;;;31593:44;31654:19;;3631:56:54;31269:410:148;3400:302:54;-1:-1:-1;;;;;;;;;;;3517:28:54;;3509:82;;;;-1:-1:-1;;;3509:82:54;;31886:2:148;3509:82:54;;;31868:21:148;31925:2;31905:18;;;31898:30;31964:34;31944:18;;;31937:62;-1:-1:-1;;;32015:18:148;;;32008:39;32064:19;;3509:82:54;31684:405:148;3509:82:54;3468:138;3715:53;3733:17;3752:4;3758:9;3715:17;:53::i;1620:130:51:-;1534:6;;-1:-1:-1;;;;;1534:6:51;965:10:59;1683:23:51;1675:68;;;;-1:-1:-1;;;1675:68:51;;32296:2:148;1675:68:51;;;32278:21:148;;;32315:18;;;32308:30;32374:34;32354:18;;;32347:62;32426:18;;1675:68:51;32094:356:148;2687:187:51;2779:6;;;-1:-1:-1;;;;;2795:17:51;;;-1:-1:-1;;;;;;2795:17:51;;;;;;;2827:40;;2779:6;;;2795:17;2779:6;;2827:40;;2760:16;;2827:40;2750:124;2687:187;:::o;1024:95::-;5374:13:56;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:56;;;;;;;:::i;:::-;1086:26:51::1;:24;:26::i;8453:442:130:-:0;8548:17;;:9;:15;:17;;;:::i;:::-;;;;-1:-1:-1;;8575:27:130;8605:28;;;:16;;;:28;;;;;8643:7;;;:9;;8605:28;;8643:9;;;:::i;:::-;;;;-1:-1:-1;;8662:36:130;;;:44;;-1:-1:-1;;8662:44:130;;;8717:19;8724:12;;;8701:5;8717:19;:::i;:::-;8746:24;8753:17;;;;8746:24;:::i;:::-;8786:9;8781:108;8805:9;;;:16;8801:20;;8781:108;;;8849:1;:9;;8859:1;8849:12;;;;;;;;:::i;:::-;;;;;;;;;;;:29;;;8842:36;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;8842:36:130;8823:3;;;;:::i;:::-;;;;8781:108;;;;8538:357;8453:442;;:::o;1720:281:54:-;-1:-1:-1;;;;;1713:19:58;;;1793:106:54;;;;-1:-1:-1;;;1793:106:54;;33069:2:148;1793:106:54;;;33051:21:148;33108:2;33088:18;;;33081:30;33147:34;33127:18;;;33120:62;-1:-1:-1;;;33198:18:148;;;33191:43;33251:19;;1793:106:54;32867:409:148;1793:106:54;-1:-1:-1;;;;;;;;;;;1909:85:54;;-1:-1:-1;;;;;;1909:85:54;-1:-1:-1;;;;;1909:85:54;;;;;;;;;;1720:281::o;2393:276::-;2501:29;2512:17;2501:10;:29::i;:::-;2558:1;2544:4;:11;:15;:28;;;;2563:9;2544:28;2540:123;;;2588:64;2628:17;2647:4;2588:39;:64::i;1125:111:51:-;5374:13:56;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:56;;;;;;;:::i;:::-;1197:32:51::1;965:10:59::0;1197:18:51::1;:32::i;2107:152:54:-:0;2173:37;2192:17;2173:18;:37::i;:::-;2225:27;;-1:-1:-1;;;;;2225:27:54;;;;;;;;2107:152;:::o;6685:198:58:-;6768:12;6799:77;6820:6;6828:4;6799:77;;;;;;;;;;;;;;;;;:20;:77::i;:::-;6792:84;6685:198;-1:-1:-1;;;6685:198:58:o;7069:325::-;7210:12;7235;7249:23;7276:6;-1:-1:-1;;;;;7276:19:58;7296:4;7276:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7234:67;;;;7318:69;7345:6;7353:7;7362:10;7374:12;7318:26;:69::i;:::-;7311:76;7069:325;-1:-1:-1;;;;;;7069:325:58:o;7682:628::-;7862:12;7890:7;7886:418;;;7917:10;:17;7938:1;7917:22;7913:286;;-1:-1:-1;;;;;1713:19:58;;;8124:60;;;;-1:-1:-1;;;8124:60:58;;33775:2:148;8124:60:58;;;33757:21:148;33814:2;33794:18;;;33787:30;33853:31;33833:18;;;33826:59;33902:18;;8124:60:58;33573:353:148;8124:60:58;-1:-1:-1;8219:10:58;8212:17;;7886:418;8260:33;8268:10;8280:12;8260:7;:33::i;:::-;7682:628;;;;;;:::o;8832:540::-;8991:17;;:21;8987:379;;9219:10;9213:17;9275:15;9262:10;9258:2;9254:19;9247:44;8987:379;9342:12;9335:20;;-1:-1:-1;;;9335:20:58;;;;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;196:154:148;-1:-1:-1;;;;;275:5:148;271:54;264:5;261:65;251:93;;340:1;337;330:12;355:315;423:6;431;484:2;472:9;463:7;459:23;455:32;452:52;;;500:1;497;490:12;452:52;539:9;526:23;558:31;583:5;558:31;:::i;:::-;608:5;660:2;645:18;;;;632:32;;-1:-1:-1;;;355:315:148:o;675:248::-;743:6;751;804:2;792:9;783:7;779:23;775:32;772:52;;;820:1;817;810:12;772:52;-1:-1:-1;;843:23:148;;;913:2;898:18;;;885:32;;-1:-1:-1;675:248:148:o;928:247::-;987:6;1040:2;1028:9;1019:7;1015:23;1011:32;1008:52;;;1056:1;1053;1046:12;1008:52;1095:9;1082:23;1114:31;1139:5;1114:31;:::i;1429:180::-;1488:6;1541:2;1529:9;1520:7;1516:23;1512:32;1509:52;;;1557:1;1554;1547:12;1509:52;-1:-1:-1;1580:23:148;;1429:180;-1:-1:-1;1429:180:148:o;1845:326::-;1938:5;1961:1;1971:194;1985:4;1982:1;1979:11;1971:194;;;2044:13;;2032:26;;2081:4;2105:12;;;;2140:15;;;;2005:1;1998:9;1971:194;;2176:255;-1:-1:-1;;;;;2258:5:148;2252:12;2248:61;2243:3;2236:74;2356:4;2349:5;2345:16;2339:23;2371:54;2419:4;2414:3;2410:14;2396:12;2371:54;:::i;2436:246::-;2620:3;2605:19;;2633:43;2609:9;2658:6;2633:43;:::i;2687:127::-;2748:10;2743:3;2739:20;2736:1;2729:31;2779:4;2776:1;2769:15;2803:4;2800:1;2793:15;2819:253;2891:2;2885:9;2933:4;2921:17;;2968:18;2953:34;;2989:22;;;2950:62;2947:88;;;3015:18;;:::i;:::-;3051:2;3044:22;2819:253;:::o;3077:275::-;3148:2;3142:9;3213:2;3194:13;;-1:-1:-1;;3190:27:148;3178:40;;3248:18;3233:34;;3269:22;;;3230:62;3227:88;;;3295:18;;:::i;:::-;3331:2;3324:22;3077:275;;-1:-1:-1;3077:275:148:o;3357:186::-;3405:4;3438:18;3430:6;3427:30;3424:56;;;3460:18;;:::i;:::-;-1:-1:-1;3526:2:148;3505:15;-1:-1:-1;;3501:29:148;3532:4;3497:40;;3357:186::o;3548:462::-;3590:5;3643:3;3636:4;3628:6;3624:17;3620:27;3610:55;;3661:1;3658;3651:12;3610:55;3697:6;3684:20;3728:48;3744:31;3772:2;3744:31;:::i;:::-;3728:48;:::i;:::-;3801:2;3792:7;3785:19;3847:3;3840:4;3835:2;3827:6;3823:15;3819:26;3816:35;3813:55;;;3864:1;3861;3854:12;3813:55;3929:2;3922:4;3914:6;3910:17;3903:4;3894:7;3890:18;3877:55;3977:1;3952:16;;;3970:4;3948:27;3941:38;;;;3956:7;3548:462;-1:-1:-1;;;3548:462:148:o;4015:455::-;4092:6;4100;4153:2;4141:9;4132:7;4128:23;4124:32;4121:52;;;4169:1;4166;4159:12;4121:52;4208:9;4195:23;4227:31;4252:5;4227:31;:::i;:::-;4277:5;-1:-1:-1;4333:2:148;4318:18;;4305:32;4360:18;4349:30;;4346:50;;;4392:1;4389;4382:12;4346:50;4415:49;4456:7;4447:6;4436:9;4432:22;4415:49;:::i;:::-;4405:59;;;4015:455;;;;;:::o;4657:183::-;4717:4;4750:18;4742:6;4739:30;4736:56;;;4772:18;;:::i;:::-;-1:-1:-1;4817:1:148;4813:14;4829:4;4809:25;;4657:183::o;4845:737::-;4899:5;4952:3;4945:4;4937:6;4933:17;4929:27;4919:55;;4970:1;4967;4960:12;4919:55;5006:6;4993:20;5032:4;5056:60;5072:43;5112:2;5072:43;:::i;5056:60::-;5150:15;;;5236:1;5232:10;;;;5220:23;;5216:32;;;5181:12;;;;5260:15;;;5257:35;;;5288:1;5285;5278:12;5257:35;5324:2;5316:6;5312:15;5336:217;5352:6;5347:3;5344:15;5336:217;;;5432:3;5419:17;5449:31;5474:5;5449:31;:::i;:::-;5493:18;;5531:12;;;;5369;;5336:217;;;-1:-1:-1;5571:5:148;4845:737;-1:-1:-1;;;;;;4845:737:148:o;5587:484::-;5689:6;5697;5705;5758:2;5746:9;5737:7;5733:23;5729:32;5726:52;;;5774:1;5771;5764:12;5726:52;5814:9;5801:23;5847:18;5839:6;5836:30;5833:50;;;5879:1;5876;5869:12;5833:50;5902:61;5955:7;5946:6;5935:9;5931:22;5902:61;:::i;:::-;5892:71;6010:2;5995:18;;5982:32;;-1:-1:-1;6061:2:148;6046:18;;;6033:32;;5587:484;-1:-1:-1;;;;5587:484:148:o;6076:632::-;6247:2;6299:21;;;6369:13;;6272:18;;;6391:22;;;6218:4;;6247:2;6470:15;;;;6444:2;6429:18;;;6218:4;6513:169;6527:6;6524:1;6521:13;6513:169;;;6588:13;;6576:26;;6657:15;;;;6622:12;;;;6549:1;6542:9;6513:169;;;-1:-1:-1;6699:3:148;;6076:632;-1:-1:-1;;;;;;6076:632:148:o;6713:315::-;6781:6;6789;6842:2;6830:9;6821:7;6817:23;6813:32;6810:52;;;6858:1;6855;6848:12;6810:52;6894:9;6881:23;6871:33;;6954:2;6943:9;6939:18;6926:32;6967:31;6992:5;6967:31;:::i;:::-;7017:5;7007:15;;;6713:315;;;;;:::o;7321:461::-;7380:3;7418:5;7412:12;7445:6;7440:3;7433:19;7471:4;7500:2;7495:3;7491:12;7484:19;;7537:2;7530:5;7526:14;7558:1;7568:189;7582:6;7579:1;7576:13;7568:189;;;7631:44;7671:3;7662:6;7656:13;7631:44;:::i;:::-;7704:4;7695:14;;;;;7732:15;;;;7604:1;7597:9;7568:189;;;-1:-1:-1;7773:3:148;;7321:461;-1:-1:-1;;;;;7321:461:148:o;7787:484::-;7840:3;7878:5;7872:12;7905:6;7900:3;7893:19;7931:4;7960:2;7955:3;7951:12;7944:19;;7997:2;7990:5;7986:14;8018:1;8028:218;8042:6;8039:1;8036:13;8028:218;;;8107:13;;-1:-1:-1;;;;;8103:62:148;8091:75;;8186:12;;;;8221:15;;;;8064:1;8057:9;8028:218;;8276:1294;8340:3;8378:5;8372:12;8405:6;8400:3;8393:19;8431:4;8472:2;8467:3;8463:12;8497:11;8524;8517:18;;8574:6;8571:1;8567:14;8560:5;8556:26;8544:38;;8616:2;8609:5;8605:14;8637:1;8647:897;8661:6;8658:1;8655:13;8647:897;;;8732:5;8726:4;8722:16;8717:3;8710:29;8768:6;8762:13;8798:4;8841:2;8835:9;8870:2;8864:4;8857:16;8900:57;8953:2;8947:4;8943:13;8929:12;8900:57;:::i;:::-;8886:71;;9006:2;9002;8998:11;8992:18;8970:40;;9057:4;9049:6;9045:17;9040:2;9034:4;9030:13;9023:40;9086:4;9124:14;9118:21;9110:6;9103:37;9201:2;9185:14;9181:23;9175:30;9218:57;9271:2;9263:6;9259:15;9243:14;9218:57;:::i;:::-;;9336:2;9320:14;9316:23;9310:30;9288:52;;9379:2;9372:4;9364:6;9360:17;9353:29;9403:61;9460:2;9452:6;9448:15;9432:14;9403:61;:::i;:::-;9522:12;;;;9395:69;-1:-1:-1;;;9487:15:148;;;;-1:-1:-1;;8683:1:148;8676:9;8647:897;;;-1:-1:-1;9560:4:148;;8276:1294;-1:-1:-1;;;;;;;8276:1294:148:o;9575:1317::-;9752:2;9741:9;9734:21;9797:6;9791:13;9786:2;9775:9;9771:18;9764:41;9859:2;9851:6;9847:15;9841:22;9836:2;9825:9;9821:18;9814:50;9918:2;9910:6;9906:15;9900:22;9895:2;9884:9;9880:18;9873:50;9978:2;9970:6;9966:15;9960:22;9954:3;9943:9;9939:19;9932:51;9715:4;10030:3;10022:6;10018:16;10012:23;10072:6;10066:3;10055:9;10051:19;10044:35;10102:69;10166:3;10155:9;10151:19;10137:12;10102:69;:::i;:::-;10088:83;;10220:3;10212:6;10208:16;10202:23;10248:2;10244:7;10316:2;10304:9;10296:6;10292:22;10288:31;10282:3;10271:9;10267:19;10260:60;10343:52;10388:6;10372:14;10343:52;:::i;:::-;10329:66;;10444:3;10436:6;10432:16;10426:23;10404:45;;10514:2;10502:9;10494:6;10490:22;10486:31;10480:3;10469:9;10465:19;10458:60;;10541:63;10597:6;10581:14;10541:63;:::i;:::-;10527:77;;;10653:3;10645:6;10641:16;10635:23;10677:3;10689:51;10736:2;10725:9;10721:18;10705:14;7103:13;7096:21;7084:34;;7033:91;10689:51;10777:15;;10771:22;;-1:-1:-1;10802:61:148;10858:3;10843:19;;10771:22;10802:61;:::i;:::-;-1:-1:-1;10880:6:148;9575:1317;-1:-1:-1;;;9575:1317:148:o;11660:1091::-;11753:6;11806:2;11794:9;11785:7;11781:23;11777:32;11774:52;;;11822:1;11819;11812:12;11774:52;11862:9;11849:23;11891:18;11932:2;11924:6;11921:14;11918:34;;;11948:1;11945;11938:12;11918:34;11971:22;;;;12027:4;12009:16;;;12005:27;12002:47;;;12045:1;12042;12035:12;12002:47;12071:22;;:::i;:::-;12129:2;12116:16;12109:5;12102:31;12186:2;12182;12178:11;12165:25;12160:2;12153:5;12149:14;12142:49;12237:2;12233;12229:11;12216:25;12266:2;12256:8;12253:16;12250:36;;;12282:1;12279;12272:12;12250:36;12318:44;12354:7;12343:8;12339:2;12335:17;12318:44;:::i;:::-;12313:2;12306:5;12302:14;12295:68;;12409:2;12405;12401:11;12388:25;12438:2;12428:8;12425:16;12422:36;;;12454:1;12451;12444:12;12422:36;12490:44;12526:7;12515:8;12511:2;12507:17;12490:44;:::i;:::-;12485:2;12478:5;12474:14;12467:68;;12581:3;12577:2;12573:12;12560:26;12611:2;12601:8;12598:16;12595:36;;;12627:1;12624;12617:12;12595:36;12664:56;12712:7;12701:8;12697:2;12693:17;12664:56;:::i;:::-;12658:3;12647:15;;12640:81;-1:-1:-1;12651:5:148;11660:1091;-1:-1:-1;;;;;11660:1091:148:o;12756:801::-;12878:6;12886;12894;12902;12910;12918;12926;12934;12987:3;12975:9;12966:7;12962:23;12958:33;12955:53;;;13004:1;13001;12994:12;12955:53;13043:9;13030:23;13062:31;13087:5;13062:31;:::i;:::-;13112:5;-1:-1:-1;13169:2:148;13154:18;;13141:32;13182:33;13141:32;13182:33;:::i;:::-;12756:801;;13234:7;;-1:-1:-1;;;;13288:2:148;13273:18;;13260:32;;13339:2;13324:18;;13311:32;;13390:3;13375:19;;13362:33;;-1:-1:-1;13442:3:148;13427:19;;13414:33;;-1:-1:-1;13494:3:148;13479:19;;13466:33;;-1:-1:-1;13546:3:148;13531:19;;;13518:33;;-1:-1:-1;12756:801:148:o;14527:183::-;14596:6;14649:2;14637:9;14628:7;14624:23;14620:32;14617:52;;;14665:1;14662;14655:12;14617:52;-1:-1:-1;14688:16:148;;14527:183;-1:-1:-1;14527:183:148:o;15341:276::-;15408:6;15461:2;15449:9;15440:7;15436:23;15432:32;15429:52;;;15477:1;15474;15467:12;15429:52;15509:9;15503:16;15562:5;15559:1;15548:20;15541:5;15538:31;15528:59;;15583:1;15580;15573:12;16245:734;16310:5;16363:3;16356:4;16348:6;16344:17;16340:27;16330:55;;16381:1;16378;16371:12;16330:55;16410:6;16404:13;16436:4;16460:60;16476:43;16516:2;16476:43;:::i;16460:60::-;16554:15;;;16640:1;16636:10;;;;16624:23;;16620:32;;;16585:12;;;;16664:15;;;16661:35;;;16692:1;16689;16682:12;16661:35;16728:2;16720:6;16716:15;16740:210;16756:6;16751:3;16748:15;16740:210;;;16829:3;16823:10;16846:31;16871:5;16846:31;:::i;:::-;16890:18;;16928:12;;;;16773;;16740:210;;16984:659;17049:5;17102:3;17095:4;17087:6;17083:17;17079:27;17069:55;;17120:1;17117;17110:12;17069:55;17149:6;17143:13;17175:4;17199:60;17215:43;17255:2;17215:43;:::i;17199:60::-;17293:15;;;17379:1;17375:10;;;;17363:23;;17359:32;;;17324:12;;;;17403:15;;;17400:35;;;17431:1;17428;17421:12;17400:35;17467:2;17459:6;17455:15;17479:135;17495:6;17490:3;17487:15;17479:135;;;17561:10;;17549:23;;17592:12;;;;17512;;17479:135;;17648:614;17777:6;17785;17838:2;17826:9;17817:7;17813:23;17809:32;17806:52;;;17854:1;17851;17844:12;17806:52;17887:9;17881:16;17916:18;17957:2;17949:6;17946:14;17943:34;;;17973:1;17970;17963:12;17943:34;17996:72;18060:7;18051:6;18040:9;18036:22;17996:72;:::i;:::-;17986:82;;18114:2;18103:9;18099:18;18093:25;18077:41;;18143:2;18133:8;18130:16;18127:36;;;18159:1;18156;18149:12;18127:36;;18182:74;18248:7;18237:8;18226:9;18222:24;18182:74;:::i;18267:127::-;18328:10;18323:3;18319:20;18316:1;18309:31;18359:4;18356:1;18349:15;18383:4;18380:1;18373:15;18780:127;18841:10;18836:3;18832:20;18829:1;18822:31;18872:4;18869:1;18862:15;18896:4;18893:1;18886:15;18912:135;18951:3;18972:17;;;18969:43;;18992:18;;:::i;:::-;-1:-1:-1;19039:1:148;19028:13;;18912:135::o;19052:411::-;19295:2;19284:9;19277:21;19258:4;19315:56;19367:2;19356:9;19352:18;19344:6;19315:56;:::i;:::-;19402:2;19387:18;;19380:34;;;;-1:-1:-1;19445:2:148;19430:18;19423:34;19307:64;19052:411;-1:-1:-1;19052:411:148:o;19807:243::-;19884:6;19892;19945:2;19933:9;19924:7;19920:23;19916:32;19913:52;;;19961:1;19958;19951:12;19913:52;-1:-1:-1;;19984:16:148;;20040:2;20025:18;;;20019:25;19984:16;;20019:25;;-1:-1:-1;19807:243:148:o;20488:363::-;20583:6;20636:2;20624:9;20615:7;20611:23;20607:32;20604:52;;;20652:1;20649;20642:12;20604:52;20685:9;20679:16;20718:18;20710:6;20707:30;20704:50;;;20750:1;20747;20740:12;20704:50;20773:72;20837:7;20828:6;20817:9;20813:22;20773:72;:::i;20856:408::-;21058:2;21040:21;;;21097:2;21077:18;;;21070:30;21136:34;21131:2;21116:18;;21109:62;-1:-1:-1;;;21202:2:148;21187:18;;21180:42;21254:3;21239:19;;20856:408::o;21269:::-;21471:2;21453:21;;;21510:2;21490:18;;;21483:30;21549:34;21544:2;21529:18;;21522:62;-1:-1:-1;;;21615:2:148;21600:18;;21593:42;21667:3;21652:19;;21269:408::o;22734:250::-;22819:1;22829:113;22843:6;22840:1;22837:13;22829:113;;;22919:11;;;22913:18;22900:11;;;22893:39;22865:2;22858:10;22829:113;;;-1:-1:-1;;22976:1:148;22958:16;;22951:27;22734:250::o;22989:270::-;23030:3;23068:5;23062:12;23095:6;23090:3;23083:19;23111:76;23180:6;23173:4;23168:3;23164:14;23157:4;23150:5;23146:16;23111:76;:::i;:::-;23241:2;23220:15;-1:-1:-1;;23216:29:148;23207:39;;;;23248:4;23203:50;;22989:270;-1:-1:-1;;22989:270:148:o;23264:225::-;23419:2;23408:9;23401:21;23382:4;23439:44;23479:2;23468:9;23464:18;23456:6;23439:44;:::i;23494:765::-;23587:6;23640:3;23628:9;23619:7;23615:23;23611:33;23608:53;;;23657:1;23654;23647:12;23608:53;23706:7;23699:4;23688:9;23684:20;23680:34;23670:62;;23728:1;23725;23718:12;23670:62;23761:2;23755:9;23803:3;23795:6;23791:16;23873:6;23861:10;23858:22;23837:18;23825:10;23822:34;23819:62;23816:88;;;23884:18;;:::i;:::-;23920:2;23913:22;23955:6;23999:3;23984:19;;24015;;;24012:39;;;24047:1;24044;24037:12;24012:39;24071:9;24089:139;24105:6;24100:3;24097:15;24089:139;;;24173:10;;24161:23;;24213:4;24204:14;;;;24122;24089:139;;;-1:-1:-1;24247:6:148;;23494:765;-1:-1:-1;;;;;23494:765:148:o;24606:261::-;24794:3;24779:19;;24807:54;24783:9;24843:6;24807:54;:::i;24872:164::-;24948:13;;24997;;24990:21;24980:32;;24970:60;;25026:1;25023;25016:12;24970:60;24872:164;;;:::o;25041:202::-;25108:6;25161:2;25149:9;25140:7;25136:23;25132:32;25129:52;;;25177:1;25174;25167:12;25129:52;25200:37;25227:9;25200:37;:::i;25248:125::-;25313:9;;;25334:10;;;25331:36;;;25347:18;;:::i;25378:1165::-;25662:6;25651:9;25644:25;25625:4;25688:2;25726:6;25721:2;25710:9;25706:18;25699:34;25769:2;25764;25753:9;25749:18;25742:30;25810:3;25799:9;25795:19;25856:6;25850:13;25845:2;25834:9;25830:18;25823:41;25911:2;25903:6;25899:15;25893:22;25924:70;25989:3;25978:9;25974:19;25960:12;25924:70;:::i;:::-;-1:-1:-1;26043:2:148;26031:15;;26025:22;26084:4;26078:3;26063:19;;26056:33;26138:21;;26168:22;;;;26248:23;;;26289:1;;26221:3;26206:19;;;26299:218;26313:6;26310:1;26307:13;26299:218;;;26378:13;;-1:-1:-1;;;;;26374:62:148;26362:75;;26492:15;;;;26335:1;26328:9;;;;;26457:12;;;;26299:218;;;-1:-1:-1;26534:3:148;25378:1165;-1:-1:-1;;;;;;;;25378:1165:148:o;26548:442::-;26649:6;26657;26710:2;26698:9;26689:7;26685:23;26681:32;26678:52;;;26726:1;26723;26716:12;26678:52;26749:37;26776:9;26749:37;:::i;:::-;26739:47;;26830:2;26819:9;26815:18;26809:25;26857:18;26849:6;26846:30;26843:50;;;26889:1;26886;26879:12;26843:50;26912:72;26976:7;26967:6;26956:9;26952:22;26912:72;:::i;27405:424::-;27509:6;27517;27570:2;27558:9;27549:7;27545:23;27541:32;27538:52;;;27586:1;27583;27576:12;27538:52;27615:9;27609:16;27599:26;;27669:2;27658:9;27654:18;27648:25;27696:18;27688:6;27685:30;27682:50;;;27728:1;27725;27718:12;27682:50;27751:72;27815:7;27806:6;27795:9;27791:22;27751:72;:::i;28855:647::-;28934:6;28987:2;28975:9;28966:7;28962:23;28958:32;28955:52;;;29003:1;29000;28993:12;28955:52;29036:9;29030:16;29069:18;29061:6;29058:30;29055:50;;;29101:1;29098;29091:12;29055:50;29124:22;;29177:4;29169:13;;29165:27;-1:-1:-1;29155:55:148;;29206:1;29203;29196:12;29155:55;29235:2;29229:9;29260:48;29276:31;29304:2;29276:31;:::i;29260:48::-;29331:2;29324:5;29317:17;29371:7;29366:2;29361;29357;29353:11;29349:20;29346:33;29343:53;;;29392:1;29389;29382:12;29343:53;29405:67;29469:2;29464;29457:5;29453:14;29448:2;29444;29440:11;29405:67;:::i;:::-;29491:5;28855:647;-1:-1:-1;;;;;28855:647:148:o;29507:966::-;29782:2;29771:9;29764:21;29745:4;29808:56;29860:2;29849:9;29845:18;29837:6;29808:56;:::i;:::-;29883:2;29933:9;29925:6;29921:22;29916:2;29905:9;29901:18;29894:50;29964:6;29999;29993:13;30030:6;30022;30015:22;30065:2;30057:6;30053:15;30046:22;;30124:2;30114:6;30111:1;30107:14;30099:6;30095:27;30091:36;30162:2;30154:6;30150:15;30183:1;30193:251;30207:6;30204:1;30201:13;30193:251;;;30297:2;30293:7;30284:6;30276;30272:19;30268:33;30263:3;30256:46;30325:39;30357:6;30348;30342:13;30325:39;:::i;:::-;30422:12;;;;30315:49;-1:-1:-1;30387:15:148;;;;30229:1;30222:9;30193:251;;;-1:-1:-1;30461:6:148;;29507:966;-1:-1:-1;;;;;;;;;29507:966:148:o;30478:597::-;30769:6;30758:9;30751:25;30812:6;30807:2;30796:9;30792:18;30785:34;30855:3;30850:2;30839:9;30835:18;30828:31;30732:4;30876:57;30928:3;30917:9;30913:19;30905:6;30876:57;:::i;:::-;30868:65;;30969:6;30964:2;30953:9;30949:18;30942:34;-1:-1:-1;;;;;31017:6:148;31013:55;31007:3;30996:9;30992:19;30985:84;30478:597;;;;;;;;:::o;32455:407::-;32657:2;32639:21;;;32696:2;32676:18;;;32669:30;32735:34;32730:2;32715:18;;32708:62;-1:-1:-1;;;32801:2:148;32786:18;;32779:41;32852:3;32837:19;;32455:407::o;33281:287::-;33410:3;33448:6;33442:13;33464:66;33523:6;33518:3;33511:4;33503:6;33499:17;33464:66;:::i;:::-;33546:16;;;;;33281:287;-1:-1:-1;;33281:287:148:o", + "linkReferences": { + "src/libraries/BLS.sol": { + "BLS": [ + { "start": 7188, "length": 20 }, + { "start": 7314, "length": 20 }, + { "start": 7477, "length": 20 }, + { "start": 7603, "length": 20 } + ] + }, + "src/libraries/GroupLib.sol": { + "GroupLib": [ + { "start": 1789, "length": 20 }, + { "start": 2506, "length": 20 }, + { "start": 3159, "length": 20 }, + { "start": 3374, "length": 20 }, + { "start": 3821, "length": 20 }, + { "start": 4689, "length": 20 }, + { "start": 6966, "length": 20 }, + { "start": 7790, "length": 20 }, + { "start": 7974, "length": 20 }, + { "start": 8492, "length": 20 }, + { "start": 8882, "length": 20 }, + { "start": 9299, "length": 20 }, + { "start": 9626, "length": 20 } + ] + } + }, + "immutableReferences": { + "53306": [ + { "start": 3554, "length": 32 }, + { "start": 3621, "length": 32 }, + { "start": 4093, "length": 32 }, + { "start": 4160, "length": 32 }, + { "start": 4316, "length": 32 } + ] + } + }, + "methodIdentifiers": { + "addReward(address[],uint256,uint256)": "914eb34d", + "commitDkg((uint256,uint256,bytes,bytes,address[]))": "e37eb96c", + "getBelongingGroup(address)": "3b6c00b0", + "getControllerConfig()": "d11b8e68", + "getCoordinator(uint256)": "42424d6f", + "getGroup(uint256)": "ceb60654", + "getGroupCount()": "06545a93", + "getGroupEpoch()": "7ee49cfd", + "getGroupThreshold(uint256)": "f49e0ba9", + "getLastOutput()": "51a2b9a0", + "getMember(uint256,uint256)": "4d79a893", + "getValidGroupIndices()": "b330a0fd", + "initialize(uint256)": "fe4b84df", + "isPartialKeyRegistered(uint256,address)": "c2db900b", + "nodeJoin(address)": "ed157c3f", + "nodeLeave(address)": "35fe4a3f", + "nodeWithdrawETH(address,uint256)": "0ad98f6a", + "owner()": "8da5cb5b", + "postProcessDkg(uint256,uint256)": "0bf9c5c6", + "proxiableUUID()": "52d1902d", + "renounceOwnership()": "715018a6", + "setControllerConfig(address,address,uint256,uint256,uint256,uint256,uint256,uint256)": "f1d49f6b", + "setLastOutput(uint256)": "f3df0802", + "transferOwnership(address)": "f2fde38b", + "upgradeTo(address)": "3659cfe6", + "upgradeToAndCall(address,bytes)": "4f1ef286" + }, + "rawMetadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotLeaveGroupDuringDkg\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"CoordinatorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"DkgNotInProgress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"int8\",\"name\":\"phase\",\"type\":\"int8\"}],\"name\":\"DkgStillInProgress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicatedDisqualifiedNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputGroupEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentGroupEpoch\",\"type\":\"uint256\"}],\"name\":\"EpochMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"GroupNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPartialPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPublicKey\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"}],\"name\":\"NodeNotInGroup\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"}],\"name\":\"PartialKeyAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SenderNotAdapter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SenderNotNodeRegistry\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"nodeRegistryContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adapterContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"disqualifiedNodePenaltyAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"defaultNumberOfCommitters\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"defaultDkgPhaseDuration\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"groupMaxCapacity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"idealNumberOfGroups\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dkgPostProcessReward\",\"type\":\"uint256\"}],\"name\":\"ControllerConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"globalEpoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"groupEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"members\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assignmentBlockHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"DkgTask\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"nodes\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"ethAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"arpaAmount\",\"type\":\"uint256\"}],\"name\":\"addReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupEpoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"partialPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"disqualifiedNodes\",\"type\":\"address[]\"}],\"internalType\":\"struct IController.CommitDkgParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"commitDkg\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nodeAddress\",\"type\":\"address\"}],\"name\":\"getBelongingGroup\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerConfig\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"nodeRegistryContractAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"adapterContractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"disqualifiedNodePenaltyAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"defaultNumberOfCommitters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"defaultDkgPhaseDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupMaxCapacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idealNumberOfGroups\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dkgPostProcessReward\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"getCoordinator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"getGroup\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[4]\",\"name\":\"partialPublicKey\",\"type\":\"uint256[4]\"}],\"internalType\":\"struct IController.Member[]\",\"name\":\"members\",\"type\":\"tuple[]\"},{\"internalType\":\"address[]\",\"name\":\"committers\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"nodeIdAddress\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"publicKey\",\"type\":\"uint256[4]\"},{\"internalType\":\"address[]\",\"name\":\"disqualifiedNodes\",\"type\":\"address[]\"}],\"internalType\":\"struct IController.CommitResult\",\"name\":\"commitResult\",\"type\":\"tuple\"}],\"internalType\":\"struct IController.CommitCache[]\",\"name\":\"commitCacheList\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isStrictlyMajorityConsensusReached\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"publicKey\",\"type\":\"uint256[4]\"}],\"internalType\":\"struct IController.Group\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGroupCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGroupEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"getGroupThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastOutput\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"memberIndex\",\"type\":\"uint256\"}],\"name\":\"getMember\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[4]\",\"name\":\"partialPublicKey\",\"type\":\"uint256[4]\"}],\"internalType\":\"struct IController.Member\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getValidGroupIndices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lastOutput\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"}],\"name\":\"isPartialKeyRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"}],\"name\":\"nodeJoin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nodeIdAddress\",\"type\":\"address\"}],\"name\":\"nodeLeave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"ethAmount\",\"type\":\"uint256\"}],\"name\":\"nodeWithdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupEpoch\",\"type\":\"uint256\"}],\"name\":\"postProcessDkg\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nodeRegistryContractAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"adapterContractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"disqualifiedNodePenaltyAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"defaultNumberOfCommitters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"defaultDkgPhaseDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupMaxCapacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idealNumberOfGroups\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dkgPostProcessReward\",\"type\":\"uint256\"}],\"name\":\"setControllerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lastOutput\",\"type\":\"uint256\"}],\"name\":\"setLastOutput\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is changed.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"getValidGroupIndices()\":{\"returns\":{\"_0\":\"uint256[] List of valid group indexes\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"custom:oz-upgrades-unsafe-allow-reachable\":\"delegatecall\",\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"custom:oz-upgrades-unsafe-allow-reachable\":\"delegatecall\",\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getBelongingGroup(address)\":{\"notice\":\"Get the group index and member index of a given node.\"},\"getValidGroupIndices()\":{\"notice\":\"Get list of all group indexes where group.isStrictlyMajorityConsensusReached == true\"},\"isPartialKeyRegistered(uint256,address)\":{\"notice\":\"Check to see if a group has a partial public key registered for a given node.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/Controller.sol\":\"Controller\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":300},\"remappings\":[\":Randcast-User-Contract/=lib/Randcast-User-Contract/contracts/\",\":Staking-v0.1/=lib/Staking-v0.1/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":fx-portal/=lib/fx-portal/contracts/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x359a1ab89b46b9aba7bcad3fb651924baf4893d15153049b9976b0fc9be1358e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e89863421b4014b96a4b62be76eb3b9f0a8afe9684664a6f389124c0964bfe5c\",\"dweb:/ipfs/Qmbk7xr1irpDuU1WdxXgxELBXxs61rHhCgod7heVcvFx16\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1967Upgradeable.sol\":{\"keccak256\":\"0x47d6e06872b12e72c79d1b5eb55842f860b5fb1207b2317c2358d2766b950a7b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ac55bf6f92fc7b90c6d79d346163a0a02bd5c648c7fede08b20e5da96d4ae2a0\",\"dweb:/ipfs/QmQoSrHhka35iKDK5iyNt8cuXXS5ANXVPjLhfsJjktB8V9\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/interfaces/draft-IERC1822Upgradeable.sol\":{\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://496bd9b3df2455d571018c09f0c6badd29713fdeb907c6aa09d8d28cb603f053\",\"dweb:/ipfs/QmXdJDyYs6WMwMh21dez2BYPxhSUaUYFMDtVNcn2cgFR79\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"keccak256\":\"0x7795808e3899c805254e3ae58074b20f799b466e3f43e057e47bedee5fb771f8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://319853a2a682f3f72411507242669ef5e76e0ad3457be53102439709ee8948f0\",\"dweb:/ipfs/QmRtm4Ese9u4jfxXyuWPXLwzenwFotuQjAWV7rXtZTB1E9\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/proxy/beacon/IBeaconUpgradeable.sol\":{\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4dbfe1a3b3b3fb64294ce41fd2ad362e7b7012208117864f42c1a67620a6d5c1\",\"dweb:/ipfs/QmVMU5tWt7zBQMmf5cpMX8UMHV86T3kFeTxBTBjFqVWfoJ\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e\",\"dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol\":{\"keccak256\":\"0xefb41f5c1a00249b7a99f0782f8c557865605426a3fb6e5fe9ae334293ae4f33\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90def55e5782595aabc13f57780c02d3613e5226f20ce6c1709503a63fdeb58f\",\"dweb:/ipfs/Qmb5vcymmNEZUJMaHmYxnhvGJDEsGMae4YjcHwkA74jy99\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b\",\"dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8b06267c5f80bad727af3e48b1382333d591dad51376399ef2f6b0ee6d58bf95\",\"dweb:/ipfs/QmdU5La1agcQvghnfMpWZGDPz2TUDTCxUwTLKmuMRXBpAx\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/utils/StorageSlotUpgradeable.sol\":{\"keccak256\":\"0x07ac95acad040f1fb1f6120dd0aa5f702db69446e95f82613721879d30de0908\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a9df9de7b5da1d1bd3d4b6c073d0174bc4211db60e794a321c8cb5d4eae34685\",\"dweb:/ipfs/QmWe49zj65jayrCe9jZpoWhYUZ1RiwSxyU2s7SBZnMztVy\"]},\"lib/openzeppelin-contracts/contracts/access/Ownable.sol\":{\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc980984badf3984b6303b377711220e067722bbd6a135b24669ff5069ef9f32\",\"dweb:/ipfs/QmPHXMSXj99XjSVM21YsY6aNtLLjLVXDbyN76J5HQYvvrz\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a367861093b74443b137564d3f3c472f70bcf114739e62059c939f25e315706c\",\"dweb:/ipfs/Qmd7JMpcxD9RuQjK3uM3EzJUgSqdN8vzp8eytEiuwxQJ6h\"]},\"src/Controller.sol\":{\"keccak256\":\"0x56e0b85baa8fd72ab89d2cb395fc0691b34f2793fdca6f4472f1f17570c424dd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://31f57d1ab1e804b7996c12543ec611e617091027b93c8df6e72861b27b1d2c8c\",\"dweb:/ipfs/QmTmoPwHiEx1hDJrxrf6BDdZV2RPcH9WjX6kxuByUKUfto\"]},\"src/Coordinator.sol\":{\"keccak256\":\"0x5e5f89b4d5e0560aad2c620ceacb854ad491dcc21ccdd4ec05b71a1c2aed66e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://92e01c67ccd7fb5d807be058136a48af45e85d641189ce4845ec27d5e279b7eb\",\"dweb:/ipfs/QmXn4zawP5pimL7kypg61ezVY494qQgvwUkqtw766Jck1s\"]},\"src/interfaces/IAdapter.sol\":{\"keccak256\":\"0xceaa9cd449a635bc914340206fff76d90323507f8c474619774d9c57d546476e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://63f0aee724f8341f7fd42e81585450091c50a6fd3d1e110161f35f9c91afd5c4\",\"dweb:/ipfs/QmNjqhTXGgxWzuCcCkGYw9LAxhmPvsGvdjkWCfBA6R4SbT\"]},\"src/interfaces/IController.sol\":{\"keccak256\":\"0x948f60df177a67c7d2ee01f4f2ff7c8c8ac9133ff6c6a66932475f40d72191d4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b91f7a0060bc3b597788f283d98bf03a6480e5a19823d8490655a637e28b2b4a\",\"dweb:/ipfs/QmfVbB9Nbc6PckFpGuoY7WNFYoetiYKTSURMuKHQTHRzmN\"]},\"src/interfaces/IControllerOwner.sol\":{\"keccak256\":\"0x1d846a5103b09de80544a7a5b07a6e81a023c546da86e29e1d138be2b6c6cdfa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bcd24bc1074976e129352760a82eb20408c34d2c6655ec676237175ea26d68ad\",\"dweb:/ipfs/QmSS5pHe1TTYQaES5aiBcWN9f9bzdHtUejvRycPU6ZXHYR\"]},\"src/interfaces/ICoordinator.sol\":{\"keccak256\":\"0xd68859c26756794cd6f8cdcccaef77c4fc0f26747ff08a6f78357ba189ac675b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c0aaa84dc7d7b60e982d66b65d6834e6770ea20232cfa5ce7e310bd659007c6b\",\"dweb:/ipfs/QmTkvK7p5HJMrqNbAYEBwtoyyG6mMM3KHZCbnHrshZEFTy\"]},\"src/interfaces/INodeRegistry.sol\":{\"keccak256\":\"0xe9cf369cc6740a6410ff9d7376fa4a3d0557bde1d7f71594d4dce699748c2986\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4a2136a5128c3e5c4fdafb1a51af9739ec051857e99a60bfdb3d7695e75e4c69\",\"dweb:/ipfs/QmZqMiu8YoyxoyAjeymurtbZ4ULJc3zRqDQAmyZyhrkcev\"]},\"src/interfaces/IRequestTypeBase.sol\":{\"keccak256\":\"0x2deca9aac14fc3d57f9e51a8d2523fd775338ce0fda77706f282f0702bd1187b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fd348830ba48d81bf30d17cff28b4fb72b35be724d2933aa565d5bfd0b65452b\",\"dweb:/ipfs/QmRrTeHSoEdAJABvu96AxhuXJbZcvxiZL6Roxosp53XggY\"]},\"src/interfaces/ISignatureUtils.sol\":{\"keccak256\":\"0xdd987d72d8cdbe1839ffa554c35f5e0b65cad95954044b5528a2f2d565188b26\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://60aeff57e190ce78fbdba148b49fedcbd59576645d91d4d995eaebad95b40388\",\"dweb:/ipfs/QmTSCht7dHR2bjjpuaP7efGbixFUr38NcxxHCih2bzyaSK\"]},\"src/libraries/BLS.sol\":{\"keccak256\":\"0x963cd923ec46eab814aec7ab47d02d4565625132482d0dc5db6424b6e795fbdf\",\"license\":\"LGPL 3.0\",\"urls\":[\"bzz-raw://75330a1732e52f73002115b1bf70232a3b5bddeb528562f77ea0a7484538f1f3\",\"dweb:/ipfs/QmPZKvA2eccQBCSL533UvthZDiybM89VRY29yBuLvKe4kP\"]},\"src/libraries/BN256G2.sol\":{\"keccak256\":\"0x7f86978b2856456f588d13dd0f2a1fa8116810427877742fb39c48ba248efd02\",\"license\":\"LGPL 3.0\",\"urls\":[\"bzz-raw://c223787ec2297ee90add7f1ec0ce19ba224231cb7faa0e935d7e61b3fca9f4f8\",\"dweb:/ipfs/QmUDApHuPsYXoxYr7gGezY1mUR9ZXQ1cPSUhuWuDwrH4bA\"]},\"src/libraries/GroupLib.sol\":{\"keccak256\":\"0xb1378769de3207a7a48245a8703c06eb03aef634c5155a76abdc7dfd57f7c920\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ab62322b260e49881724a83ed6e249a32002648ef8ab30f0d49be97a09d86a0\",\"dweb:/ipfs/QmPpHRdhNjTuk7s9dmacCsycLgV1sWC6zjUNejv1QERaQ4\"]},\"src/utils/Utils.sol\":{\"keccak256\":\"0xe05016ecdcd551da8ca90a10160324daa73b7f23737478bfba40df2ae24476c1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b644c37646f88489512f0003b8c4eee497a25df6e9a8fa02870c6c89c85fbd01\",\"dweb:/ipfs/QmVeNDMUHDy5i7H1fsnBZoGm2g3jizYtxvihwMoi9TMwaK\"]}},\"version\":1}", + "metadata": { + "compiler": { "version": "0.8.18+commit.87f61d96" }, + "language": "Solidity", + "output": { + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { "inputs": [], "type": "error", "name": "CannotLeaveGroupDuringDkg" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + } + ], + "type": "error", + "name": "CoordinatorNotFound" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + } + ], + "type": "error", + "name": "DkgNotInProgress" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { "internalType": "int8", "name": "phase", "type": "int8" } + ], + "type": "error", + "name": "DkgStillInProgress" + }, + { "inputs": [], "type": "error", "name": "DuplicatedDisqualifiedNode" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputGroupEpoch", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentGroupEpoch", + "type": "uint256" + } + ], + "type": "error", + "name": "EpochMismatch" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + } + ], + "type": "error", + "name": "GroupNotExist" + }, + { "inputs": [], "type": "error", "name": "InvalidPartialPublicKey" }, + { "inputs": [], "type": "error", "name": "InvalidPublicKey" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "internalType": "address", + "name": "nodeIdAddress", + "type": "address" + } + ], + "type": "error", + "name": "NodeNotInGroup" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "internalType": "address", + "name": "nodeIdAddress", + "type": "address" + } + ], + "type": "error", + "name": "PartialKeyAlreadyRegistered" + }, + { "inputs": [], "type": "error", "name": "SenderNotAdapter" }, + { "inputs": [], "type": "error", "name": "SenderNotNodeRegistry" }, + { + "inputs": [ + { + "internalType": "address", + "name": "previousAdmin", + "type": "address", + "indexed": false + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address", + "indexed": false + } + ], + "type": "event", + "name": "AdminChanged", + "anonymous": false + }, + { + "inputs": [ + { + "internalType": "address", + "name": "beacon", + "type": "address", + "indexed": true + } + ], + "type": "event", + "name": "BeaconUpgraded", + "anonymous": false + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nodeRegistryContractAddress", + "type": "address", + "indexed": false + }, + { + "internalType": "address", + "name": "adapterContractAddress", + "type": "address", + "indexed": false + }, + { + "internalType": "uint256", + "name": "disqualifiedNodePenaltyAmount", + "type": "uint256", + "indexed": false + }, + { + "internalType": "uint256", + "name": "defaultNumberOfCommitters", + "type": "uint256", + "indexed": false + }, + { + "internalType": "uint256", + "name": "defaultDkgPhaseDuration", + "type": "uint256", + "indexed": false + }, + { + "internalType": "uint256", + "name": "groupMaxCapacity", + "type": "uint256", + "indexed": false + }, + { + "internalType": "uint256", + "name": "idealNumberOfGroups", + "type": "uint256", + "indexed": false + }, + { + "internalType": "uint256", + "name": "dkgPostProcessReward", + "type": "uint256", + "indexed": false + } + ], + "type": "event", + "name": "ControllerConfigSet", + "anonymous": false + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "globalEpoch", + "type": "uint256", + "indexed": true + }, + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256", + "indexed": true + }, + { + "internalType": "uint256", + "name": "groupEpoch", + "type": "uint256", + "indexed": true + }, + { + "internalType": "uint256", + "name": "size", + "type": "uint256", + "indexed": false + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256", + "indexed": false + }, + { + "internalType": "address[]", + "name": "members", + "type": "address[]", + "indexed": false + }, + { + "internalType": "uint256", + "name": "assignmentBlockHeight", + "type": "uint256", + "indexed": false + }, + { + "internalType": "address", + "name": "coordinatorAddress", + "type": "address", + "indexed": false + } + ], + "type": "event", + "name": "DkgTask", + "anonymous": false + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "version", + "type": "uint8", + "indexed": false + } + ], + "type": "event", + "name": "Initialized", + "anonymous": false + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previousOwner", + "type": "address", + "indexed": true + }, + { + "internalType": "address", + "name": "newOwner", + "type": "address", + "indexed": true + } + ], + "type": "event", + "name": "OwnershipTransferred", + "anonymous": false + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address", + "indexed": true + } + ], + "type": "event", + "name": "Upgraded", + "anonymous": false + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "nodes", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "arpaAmount", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "addReward" + }, + { + "inputs": [ + { + "internalType": "struct IController.CommitDkgParams", + "name": "params", + "type": "tuple", + "components": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "groupEpoch", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "publicKey", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "partialPublicKey", + "type": "bytes" + }, + { + "internalType": "address[]", + "name": "disqualifiedNodes", + "type": "address[]" + } + ] + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "commitDkg" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nodeAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "name": "getBelongingGroup", + "outputs": [ + { "internalType": "int256", "name": "", "type": "int256" }, + { "internalType": "int256", "name": "", "type": "int256" } + ] + }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "getControllerConfig", + "outputs": [ + { + "internalType": "address", + "name": "nodeRegistryContractAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "adapterContractAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "disqualifiedNodePenaltyAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "defaultNumberOfCommitters", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "defaultDkgPhaseDuration", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "groupMaxCapacity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "idealNumberOfGroups", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dkgPostProcessReward", + "type": "uint256" + } + ] + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "name": "getCoordinator", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" } + ] + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "name": "getGroup", + "outputs": [ + { + "internalType": "struct IController.Group", + "name": "", + "type": "tuple", + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + }, + { + "internalType": "struct IController.Member[]", + "name": "members", + "type": "tuple[]", + "components": [ + { + "internalType": "address", + "name": "nodeIdAddress", + "type": "address" + }, + { + "internalType": "uint256[4]", + "name": "partialPublicKey", + "type": "uint256[4]" + } + ] + }, + { + "internalType": "address[]", + "name": "committers", + "type": "address[]" + }, + { + "internalType": "struct IController.CommitCache[]", + "name": "commitCacheList", + "type": "tuple[]", + "components": [ + { + "internalType": "address[]", + "name": "nodeIdAddress", + "type": "address[]" + }, + { + "internalType": "struct IController.CommitResult", + "name": "commitResult", + "type": "tuple", + "components": [ + { + "internalType": "uint256", + "name": "groupEpoch", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "publicKey", + "type": "uint256[4]" + }, + { + "internalType": "address[]", + "name": "disqualifiedNodes", + "type": "address[]" + } + ] + } + ] + }, + { + "internalType": "bool", + "name": "isStrictlyMajorityConsensusReached", + "type": "bool" + }, + { + "internalType": "uint256[4]", + "name": "publicKey", + "type": "uint256[4]" + } + ] + } + ] + }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "getGroupCount", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ] + }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "getGroupEpoch", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ] + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "name": "getGroupThreshold", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ] + }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "getLastOutput", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ] + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "memberIndex", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "name": "getMember", + "outputs": [ + { + "internalType": "struct IController.Member", + "name": "", + "type": "tuple", + "components": [ + { + "internalType": "address", + "name": "nodeIdAddress", + "type": "address" + }, + { + "internalType": "uint256[4]", + "name": "partialPublicKey", + "type": "uint256[4]" + } + ] + } + ] + }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "getValidGroupIndices", + "outputs": [ + { "internalType": "uint256[]", "name": "", "type": "uint256[]" } + ] + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lastOutput", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "initialize" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "internalType": "address", + "name": "nodeIdAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "name": "isPartialKeyRegistered", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }] + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nodeIdAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "nodeJoin", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ] + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nodeIdAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "nodeLeave" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "nodeWithdrawETH" + }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "owner", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" } + ] + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "groupEpoch", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "postProcessDkg" + }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "proxiableUUID", + "outputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ] + }, + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "name": "renounceOwnership" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nodeRegistryContractAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "adapterContractAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "disqualifiedNodePenaltyAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "defaultNumberOfCommitters", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "defaultDkgPhaseDuration", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "groupMaxCapacity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "idealNumberOfGroups", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dkgPostProcessReward", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "setControllerConfig" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lastOutput", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "setLastOutput" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOwner", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "transferOwnership" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "upgradeTo" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "stateMutability": "payable", + "type": "function", + "name": "upgradeToAndCall" + } + ], + "devdoc": { + "kind": "dev", + "methods": { + "constructor": { "custom:oz-upgrades-unsafe-allow": "constructor" }, + "getValidGroupIndices()": { + "returns": { "_0": "uint256[] List of valid group indexes" } + }, + "owner()": { "details": "Returns the address of the current owner." }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "custom:oz-upgrades-unsafe-allow-reachable": "delegatecall", + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "custom:oz-upgrades-unsafe-allow-reachable": "delegatecall", + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "getBelongingGroup(address)": { + "notice": "Get the group index and member index of a given node." + }, + "getValidGroupIndices()": { + "notice": "Get list of all group indexes where group.isStrictlyMajorityConsensusReached == true" + }, + "isPartialKeyRegistered(uint256,address)": { + "notice": "Check to see if a group has a partial public key registered for a given node." + } + }, + "version": 1 + } + }, + "settings": { + "remappings": [ + "Randcast-User-Contract/=lib/Randcast-User-Contract/contracts/", + "Staking-v0.1/=lib/Staking-v0.1/src/", + "ds-test/=lib/forge-std/lib/ds-test/src/", + "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", + "forge-std/=lib/forge-std/src/", + "fx-portal/=lib/fx-portal/contracts/", + "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", + "openzeppelin-contracts/=lib/openzeppelin-contracts/", + "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/" + ], + "optimizer": { "enabled": true, "runs": 300 }, + "metadata": { "bytecodeHash": "ipfs" }, + "compilationTarget": { "src/Controller.sol": "Controller" }, + "libraries": {} + }, + "sources": { + "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol": { + "keccak256": "0x359a1ab89b46b9aba7bcad3fb651924baf4893d15153049b9976b0fc9be1358e", + "urls": [ + "bzz-raw://e89863421b4014b96a4b62be76eb3b9f0a8afe9684664a6f389124c0964bfe5c", + "dweb:/ipfs/Qmbk7xr1irpDuU1WdxXgxELBXxs61rHhCgod7heVcvFx16" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1967Upgradeable.sol": { + "keccak256": "0x47d6e06872b12e72c79d1b5eb55842f860b5fb1207b2317c2358d2766b950a7b", + "urls": [ + "bzz-raw://ac55bf6f92fc7b90c6d79d346163a0a02bd5c648c7fede08b20e5da96d4ae2a0", + "dweb:/ipfs/QmQoSrHhka35iKDK5iyNt8cuXXS5ANXVPjLhfsJjktB8V9" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts-upgradeable/contracts/interfaces/draft-IERC1822Upgradeable.sol": { + "keccak256": "0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f", + "urls": [ + "bzz-raw://496bd9b3df2455d571018c09f0c6badd29713fdeb907c6aa09d8d28cb603f053", + "dweb:/ipfs/QmXdJDyYs6WMwMh21dez2BYPxhSUaUYFMDtVNcn2cgFR79" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts-upgradeable/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": { + "keccak256": "0x7795808e3899c805254e3ae58074b20f799b466e3f43e057e47bedee5fb771f8", + "urls": [ + "bzz-raw://319853a2a682f3f72411507242669ef5e76e0ad3457be53102439709ee8948f0", + "dweb:/ipfs/QmRtm4Ese9u4jfxXyuWPXLwzenwFotuQjAWV7rXtZTB1E9" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts-upgradeable/contracts/proxy/beacon/IBeaconUpgradeable.sol": { + "keccak256": "0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908", + "urls": [ + "bzz-raw://4dbfe1a3b3b3fb64294ce41fd2ad362e7b7012208117864f42c1a67620a6d5c1", + "dweb:/ipfs/QmVMU5tWt7zBQMmf5cpMX8UMHV86T3kFeTxBTBjFqVWfoJ" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol": { + "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794", + "urls": [ + "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e", + "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol": { + "keccak256": "0xefb41f5c1a00249b7a99f0782f8c557865605426a3fb6e5fe9ae334293ae4f33", + "urls": [ + "bzz-raw://90def55e5782595aabc13f57780c02d3613e5226f20ce6c1709503a63fdeb58f", + "dweb:/ipfs/Qmb5vcymmNEZUJMaHmYxnhvGJDEsGMae4YjcHwkA74jy99" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol": { + "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422", + "urls": [ + "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b", + "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol": { + "keccak256": "0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef", + "urls": [ + "bzz-raw://8b06267c5f80bad727af3e48b1382333d591dad51376399ef2f6b0ee6d58bf95", + "dweb:/ipfs/QmdU5La1agcQvghnfMpWZGDPz2TUDTCxUwTLKmuMRXBpAx" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts-upgradeable/contracts/utils/StorageSlotUpgradeable.sol": { + "keccak256": "0x07ac95acad040f1fb1f6120dd0aa5f702db69446e95f82613721879d30de0908", + "urls": [ + "bzz-raw://a9df9de7b5da1d1bd3d4b6c073d0174bc4211db60e794a321c8cb5d4eae34685", + "dweb:/ipfs/QmWe49zj65jayrCe9jZpoWhYUZ1RiwSxyU2s7SBZnMztVy" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts/contracts/access/Ownable.sol": { + "keccak256": "0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218", + "urls": [ + "bzz-raw://fc980984badf3984b6303b377711220e067722bbd6a135b24669ff5069ef9f32", + "dweb:/ipfs/QmPHXMSXj99XjSVM21YsY6aNtLLjLVXDbyN76J5HQYvvrz" + ], + "license": "MIT" + }, + "lib/openzeppelin-contracts/contracts/utils/Context.sol": { + "keccak256": "0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439", + "urls": [ + "bzz-raw://a367861093b74443b137564d3f3c472f70bcf114739e62059c939f25e315706c", + "dweb:/ipfs/Qmd7JMpcxD9RuQjK3uM3EzJUgSqdN8vzp8eytEiuwxQJ6h" + ], + "license": "MIT" + }, + "src/Controller.sol": { + "keccak256": "0x56e0b85baa8fd72ab89d2cb395fc0691b34f2793fdca6f4472f1f17570c424dd", + "urls": [ + "bzz-raw://31f57d1ab1e804b7996c12543ec611e617091027b93c8df6e72861b27b1d2c8c", + "dweb:/ipfs/QmTmoPwHiEx1hDJrxrf6BDdZV2RPcH9WjX6kxuByUKUfto" + ], + "license": "MIT" + }, + "src/Coordinator.sol": { + "keccak256": "0x5e5f89b4d5e0560aad2c620ceacb854ad491dcc21ccdd4ec05b71a1c2aed66e5", + "urls": [ + "bzz-raw://92e01c67ccd7fb5d807be058136a48af45e85d641189ce4845ec27d5e279b7eb", + "dweb:/ipfs/QmXn4zawP5pimL7kypg61ezVY494qQgvwUkqtw766Jck1s" + ], + "license": "MIT" + }, + "src/interfaces/IAdapter.sol": { + "keccak256": "0xceaa9cd449a635bc914340206fff76d90323507f8c474619774d9c57d546476e", + "urls": [ + "bzz-raw://63f0aee724f8341f7fd42e81585450091c50a6fd3d1e110161f35f9c91afd5c4", + "dweb:/ipfs/QmNjqhTXGgxWzuCcCkGYw9LAxhmPvsGvdjkWCfBA6R4SbT" + ], + "license": "MIT" + }, + "src/interfaces/IController.sol": { + "keccak256": "0x948f60df177a67c7d2ee01f4f2ff7c8c8ac9133ff6c6a66932475f40d72191d4", + "urls": [ + "bzz-raw://b91f7a0060bc3b597788f283d98bf03a6480e5a19823d8490655a637e28b2b4a", + "dweb:/ipfs/QmfVbB9Nbc6PckFpGuoY7WNFYoetiYKTSURMuKHQTHRzmN" + ], + "license": "MIT" + }, + "src/interfaces/IControllerOwner.sol": { + "keccak256": "0x1d846a5103b09de80544a7a5b07a6e81a023c546da86e29e1d138be2b6c6cdfa", + "urls": [ + "bzz-raw://bcd24bc1074976e129352760a82eb20408c34d2c6655ec676237175ea26d68ad", + "dweb:/ipfs/QmSS5pHe1TTYQaES5aiBcWN9f9bzdHtUejvRycPU6ZXHYR" + ], + "license": "MIT" + }, + "src/interfaces/ICoordinator.sol": { + "keccak256": "0xd68859c26756794cd6f8cdcccaef77c4fc0f26747ff08a6f78357ba189ac675b", + "urls": [ + "bzz-raw://c0aaa84dc7d7b60e982d66b65d6834e6770ea20232cfa5ce7e310bd659007c6b", + "dweb:/ipfs/QmTkvK7p5HJMrqNbAYEBwtoyyG6mMM3KHZCbnHrshZEFTy" + ], + "license": "MIT" + }, + "src/interfaces/INodeRegistry.sol": { + "keccak256": "0xe9cf369cc6740a6410ff9d7376fa4a3d0557bde1d7f71594d4dce699748c2986", + "urls": [ + "bzz-raw://4a2136a5128c3e5c4fdafb1a51af9739ec051857e99a60bfdb3d7695e75e4c69", + "dweb:/ipfs/QmZqMiu8YoyxoyAjeymurtbZ4ULJc3zRqDQAmyZyhrkcev" + ], + "license": "MIT" + }, + "src/interfaces/IRequestTypeBase.sol": { + "keccak256": "0x2deca9aac14fc3d57f9e51a8d2523fd775338ce0fda77706f282f0702bd1187b", + "urls": [ + "bzz-raw://fd348830ba48d81bf30d17cff28b4fb72b35be724d2933aa565d5bfd0b65452b", + "dweb:/ipfs/QmRrTeHSoEdAJABvu96AxhuXJbZcvxiZL6Roxosp53XggY" + ], + "license": "MIT" + }, + "src/interfaces/ISignatureUtils.sol": { + "keccak256": "0xdd987d72d8cdbe1839ffa554c35f5e0b65cad95954044b5528a2f2d565188b26", + "urls": [ + "bzz-raw://60aeff57e190ce78fbdba148b49fedcbd59576645d91d4d995eaebad95b40388", + "dweb:/ipfs/QmTSCht7dHR2bjjpuaP7efGbixFUr38NcxxHCih2bzyaSK" + ], + "license": "BUSL-1.1" + }, + "src/libraries/BLS.sol": { + "keccak256": "0x963cd923ec46eab814aec7ab47d02d4565625132482d0dc5db6424b6e795fbdf", + "urls": [ + "bzz-raw://75330a1732e52f73002115b1bf70232a3b5bddeb528562f77ea0a7484538f1f3", + "dweb:/ipfs/QmPZKvA2eccQBCSL533UvthZDiybM89VRY29yBuLvKe4kP" + ], + "license": "LGPL 3.0" + }, + "src/libraries/BN256G2.sol": { + "keccak256": "0x7f86978b2856456f588d13dd0f2a1fa8116810427877742fb39c48ba248efd02", + "urls": [ + "bzz-raw://c223787ec2297ee90add7f1ec0ce19ba224231cb7faa0e935d7e61b3fca9f4f8", + "dweb:/ipfs/QmUDApHuPsYXoxYr7gGezY1mUR9ZXQ1cPSUhuWuDwrH4bA" + ], + "license": "LGPL 3.0" + }, + "src/libraries/GroupLib.sol": { + "keccak256": "0xb1378769de3207a7a48245a8703c06eb03aef634c5155a76abdc7dfd57f7c920", + "urls": [ + "bzz-raw://0ab62322b260e49881724a83ed6e249a32002648ef8ab30f0d49be97a09d86a0", + "dweb:/ipfs/QmPpHRdhNjTuk7s9dmacCsycLgV1sWC6zjUNejv1QERaQ4" + ], + "license": "MIT" + }, + "src/utils/Utils.sol": { + "keccak256": "0xe05016ecdcd551da8ca90a10160324daa73b7f23737478bfba40df2ae24476c1", + "urls": [ + "bzz-raw://b644c37646f88489512f0003b8c4eee497a25df6e9a8fa02870c6c89c85fbd01", + "dweb:/ipfs/QmVeNDMUHDy5i7H1fsnBZoGm2g3jizYtxvihwMoi9TMwaK" + ], + "license": "MIT" + } + }, + "version": 1 + }, + "ast": { + "absolutePath": "src/Controller.sol", + "id": 65745, + "exportedSymbols": { + "BLS": [71125], + "Controller": [65744], + "Coordinator": [67636], + "GroupLib": [74899], + "IAdapter": [69592], + "IController": [69955], + "IControllerOwner": [70144], + "ICoordinator": [70169], + "INodeRegistry": [70293], + "OwnableUpgradeable": [52751], + "UUPSUpgradeable": [53423] + }, + "nodeType": "SourceUnit", + "src": "32:16789:100", + "nodes": [ + { + "id": 64383, + "nodeType": "PragmaDirective", + "src": "32:24:100", + "nodes": [], + "literals": ["solidity", "^", "0.8", ".18"] + }, + { + "id": 64385, + "nodeType": "ImportDirective", + "src": "58:109:100", + "nodes": [], + "absolutePath": "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol", + "file": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol", + "nameLocation": "-1:-1:-1", + "scope": 65745, + "sourceUnit": 53424, + "symbolAliases": [ + { + "foreign": { + "id": 64384, + "name": "UUPSUpgradeable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53423, + "src": "66:15:100", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 64387, + "nodeType": "ImportDirective", + "src": "168:110:100", + "nodes": [], + "absolutePath": "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol", + "file": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol", + "nameLocation": "-1:-1:-1", + "scope": 65745, + "sourceUnit": 52752, + "symbolAliases": [ + { + "foreign": { + "id": 64386, + "name": "OwnableUpgradeable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52751, + "src": "176:18:100", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 64389, + "nodeType": "ImportDirective", + "src": "279:57:100", + "nodes": [], + "absolutePath": "src/interfaces/IController.sol", + "file": "./interfaces/IController.sol", + "nameLocation": "-1:-1:-1", + "scope": 65745, + "sourceUnit": 69956, + "symbolAliases": [ + { + "foreign": { + "id": 64388, + "name": "IController", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69955, + "src": "287:11:100", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 64391, + "nodeType": "ImportDirective", + "src": "337:67:100", + "nodes": [], + "absolutePath": "src/interfaces/IControllerOwner.sol", + "file": "./interfaces/IControllerOwner.sol", + "nameLocation": "-1:-1:-1", + "scope": 65745, + "sourceUnit": 70145, + "symbolAliases": [ + { + "foreign": { + "id": 64390, + "name": "IControllerOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70144, + "src": "345:16:100", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 64393, + "nodeType": "ImportDirective", + "src": "405:51:100", + "nodes": [], + "absolutePath": "src/interfaces/IAdapter.sol", + "file": "./interfaces/IAdapter.sol", + "nameLocation": "-1:-1:-1", + "scope": 65745, + "sourceUnit": 69593, + "symbolAliases": [ + { + "foreign": { + "id": 64392, + "name": "IAdapter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69592, + "src": "413:8:100", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 64395, + "nodeType": "ImportDirective", + "src": "457:59:100", + "nodes": [], + "absolutePath": "src/interfaces/ICoordinator.sol", + "file": "./interfaces/ICoordinator.sol", + "nameLocation": "-1:-1:-1", + "scope": 65745, + "sourceUnit": 70170, + "symbolAliases": [ + { + "foreign": { + "id": 64394, + "name": "ICoordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70169, + "src": "465:12:100", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 64397, + "nodeType": "ImportDirective", + "src": "517:61:100", + "nodes": [], + "absolutePath": "src/interfaces/INodeRegistry.sol", + "file": "./interfaces/INodeRegistry.sol", + "nameLocation": "-1:-1:-1", + "scope": 65745, + "sourceUnit": 70294, + "symbolAliases": [ + { + "foreign": { + "id": 64396, + "name": "INodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70293, + "src": "525:13:100", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 64399, + "nodeType": "ImportDirective", + "src": "579:40:100", + "nodes": [], + "absolutePath": "src/libraries/BLS.sol", + "file": "./libraries/BLS.sol", + "nameLocation": "-1:-1:-1", + "scope": 65745, + "sourceUnit": 71126, + "symbolAliases": [ + { + "foreign": { + "id": 64398, + "name": "BLS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 71125, + "src": "587:3:100", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 64401, + "nodeType": "ImportDirective", + "src": "620:50:100", + "nodes": [], + "absolutePath": "src/libraries/GroupLib.sol", + "file": "./libraries/GroupLib.sol", + "nameLocation": "-1:-1:-1", + "scope": 65745, + "sourceUnit": 74900, + "symbolAliases": [ + { + "foreign": { + "id": 64400, + "name": "GroupLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74899, + "src": "628:8:100", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 64403, + "nodeType": "ImportDirective", + "src": "671:46:100", + "nodes": [], + "absolutePath": "src/Coordinator.sol", + "file": "./Coordinator.sol", + "nameLocation": "-1:-1:-1", + "scope": 65745, + "sourceUnit": 67637, + "symbolAliases": [ + { + "foreign": { + "id": 64402, + "name": "Coordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67636, + "src": "679:11:100", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 65744, + "nodeType": "ContractDefinition", + "src": "719:16101:100", + "nodes": [ + { + "id": 64415, + "nodeType": "UsingForDirective", + "src": "815:38:100", + "nodes": [], + "global": false, + "libraryName": { + "id": 64412, + "name": "GroupLib", + "nameLocations": ["821:8:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 74899, + "src": "821:8:100" + }, + "typeName": { + "id": 64414, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 64413, + "name": "GroupLib.GroupData", + "nameLocations": ["834:8:100", "843:9:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 73042, + "src": "834:18:100" + }, + "referencedDeclaration": 73042, + "src": "834:18:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage_ptr", + "typeString": "struct GroupLib.GroupData" + } + } + }, + { + "id": 64418, + "nodeType": "VariableDeclaration", + "src": "886:33:100", + "nodes": [], + "constant": false, + "mutability": "mutable", + "name": "_config", + "nameLocation": "912:7:100", + "scope": 65744, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig" + }, + "typeName": { + "id": 64417, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 64416, + "name": "ControllerConfig", + "nameLocations": ["886:16:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64438, + "src": "886:16:100" + }, + "referencedDeclaration": 64438, + "src": "886:16:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage_ptr", + "typeString": "struct Controller.ControllerConfig" + } + }, + "visibility": "internal" + }, + { + "id": 64422, + "nodeType": "VariableDeclaration", + "src": "949:50:100", + "nodes": [], + "constant": false, + "mutability": "mutable", + "name": "_coordinators", + "nameLocation": "986:13:100", + "scope": 65744, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 64421, + "keyName": "", + "keyNameLocation": "-1:-1:-1", + "keyType": { + "id": 64419, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "957:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "949:27:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 64420, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "968:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "internal" + }, + { + "id": 64425, + "nodeType": "VariableDeclaration", + "src": "1074:38:100", + "nodes": [], + "constant": false, + "mutability": "mutable", + "name": "_groupData", + "nameLocation": "1102:10:100", + "scope": 65744, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData" + }, + "typeName": { + "id": 64424, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 64423, + "name": "GroupLib.GroupData", + "nameLocations": ["1074:8:100", "1083:9:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 73042, + "src": "1074:18:100" + }, + "referencedDeclaration": 73042, + "src": "1074:18:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage_ptr", + "typeString": "struct GroupLib.GroupData" + } + }, + "visibility": "internal" + }, + { + "id": 64427, + "nodeType": "VariableDeclaration", + "src": "1143:28:100", + "nodes": [], + "constant": false, + "mutability": "mutable", + "name": "_lastOutput", + "nameLocation": "1160:11:100", + "scope": 65744, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64426, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1143:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "id": 64438, + "nodeType": "StructDefinition", + "src": "1195:242:100", + "nodes": [], + "canonicalName": "Controller.ControllerConfig", + "members": [ + { + "constant": false, + "id": 64429, + "mutability": "mutable", + "name": "nodeRegistryContractAddress", + "nameLocation": "1237:27:100", + "nodeType": "VariableDeclaration", + "scope": 64438, + "src": "1229:35:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64428, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1229:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64431, + "mutability": "mutable", + "name": "adapterContractAddress", + "nameLocation": "1282:22:100", + "nodeType": "VariableDeclaration", + "scope": 64438, + "src": "1274:30:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64430, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1274:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64433, + "mutability": "mutable", + "name": "disqualifiedNodePenaltyAmount", + "nameLocation": "1322:29:100", + "nodeType": "VariableDeclaration", + "scope": 64438, + "src": "1314:37:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64432, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1314:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64435, + "mutability": "mutable", + "name": "defaultDkgPhaseDuration", + "nameLocation": "1369:23:100", + "nodeType": "VariableDeclaration", + "scope": 64438, + "src": "1361:31:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64434, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1361:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64437, + "mutability": "mutable", + "name": "dkgPostProcessReward", + "nameLocation": "1410:20:100", + "nodeType": "VariableDeclaration", + "scope": 64438, + "src": "1402:28:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64436, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1402:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "ControllerConfig", + "nameLocation": "1202:16:100", + "scope": 65744, + "visibility": "public" + }, + { + "id": 64456, + "nodeType": "EventDefinition", + "src": "1459:357:100", + "nodes": [], + "anonymous": false, + "eventSelector": "f95156a904d33c289d45bd80fdb27f108976d7a2de754073eb7506cf618779ad", + "name": "ControllerConfigSet", + "nameLocation": "1465:19:100", + "parameters": { + "id": 64455, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64440, + "indexed": false, + "mutability": "mutable", + "name": "nodeRegistryContractAddress", + "nameLocation": "1502:27:100", + "nodeType": "VariableDeclaration", + "scope": 64456, + "src": "1494:35:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64439, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1494:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64442, + "indexed": false, + "mutability": "mutable", + "name": "adapterContractAddress", + "nameLocation": "1547:22:100", + "nodeType": "VariableDeclaration", + "scope": 64456, + "src": "1539:30:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64441, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1539:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64444, + "indexed": false, + "mutability": "mutable", + "name": "disqualifiedNodePenaltyAmount", + "nameLocation": "1587:29:100", + "nodeType": "VariableDeclaration", + "scope": 64456, + "src": "1579:37:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1579:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64446, + "indexed": false, + "mutability": "mutable", + "name": "defaultNumberOfCommitters", + "nameLocation": "1634:25:100", + "nodeType": "VariableDeclaration", + "scope": 64456, + "src": "1626:33:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64445, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1626:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64448, + "indexed": false, + "mutability": "mutable", + "name": "defaultDkgPhaseDuration", + "nameLocation": "1677:23:100", + "nodeType": "VariableDeclaration", + "scope": 64456, + "src": "1669:31:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64447, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1669:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64450, + "indexed": false, + "mutability": "mutable", + "name": "groupMaxCapacity", + "nameLocation": "1718:16:100", + "nodeType": "VariableDeclaration", + "scope": 64456, + "src": "1710:24:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64449, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1710:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64452, + "indexed": false, + "mutability": "mutable", + "name": "idealNumberOfGroups", + "nameLocation": "1752:19:100", + "nodeType": "VariableDeclaration", + "scope": 64456, + "src": "1744:27:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64451, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1744:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64454, + "indexed": false, + "mutability": "mutable", + "name": "dkgPostProcessReward", + "nameLocation": "1789:20:100", + "nodeType": "VariableDeclaration", + "scope": 64456, + "src": "1781:28:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64453, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1781:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1484:331:100" + } + }, + { + "id": 64475, + "nodeType": "EventDefinition", + "src": "1821:280:100", + "nodes": [], + "anonymous": false, + "eventSelector": "bbd25d64683f157b2e3544d3d6430e14102db1e49592cf4dcaf827e2ded517ee", + "name": "DkgTask", + "nameLocation": "1827:7:100", + "parameters": { + "id": 64474, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64458, + "indexed": true, + "mutability": "mutable", + "name": "globalEpoch", + "nameLocation": "1860:11:100", + "nodeType": "VariableDeclaration", + "scope": 64475, + "src": "1844:27:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64457, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1844:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64460, + "indexed": true, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "1897:10:100", + "nodeType": "VariableDeclaration", + "scope": 64475, + "src": "1881:26:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64459, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1881:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64462, + "indexed": true, + "mutability": "mutable", + "name": "groupEpoch", + "nameLocation": "1933:10:100", + "nodeType": "VariableDeclaration", + "scope": 64475, + "src": "1917:26:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64461, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1917:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64464, + "indexed": false, + "mutability": "mutable", + "name": "size", + "nameLocation": "1961:4:100", + "nodeType": "VariableDeclaration", + "scope": 64475, + "src": "1953:12:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64463, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1953:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64466, + "indexed": false, + "mutability": "mutable", + "name": "threshold", + "nameLocation": "1983:9:100", + "nodeType": "VariableDeclaration", + "scope": 64475, + "src": "1975:17:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1975:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64469, + "indexed": false, + "mutability": "mutable", + "name": "members", + "nameLocation": "2012:7:100", + "nodeType": "VariableDeclaration", + "scope": 64475, + "src": "2002:17:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 64467, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2002:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 64468, + "nodeType": "ArrayTypeName", + "src": "2002:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64471, + "indexed": false, + "mutability": "mutable", + "name": "assignmentBlockHeight", + "nameLocation": "2037:21:100", + "nodeType": "VariableDeclaration", + "scope": 64475, + "src": "2029:29:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64470, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2029:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64473, + "indexed": false, + "mutability": "mutable", + "name": "coordinatorAddress", + "nameLocation": "2076:18:100", + "nodeType": "VariableDeclaration", + "scope": 64475, + "src": "2068:26:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2068:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1834:266:100" + } + }, + { + "id": 64479, + "nodeType": "ErrorDefinition", + "src": "2123:40:100", + "nodes": [], + "errorSelector": "feddf96a", + "name": "GroupNotExist", + "nameLocation": "2129:13:100", + "parameters": { + "id": 64478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64477, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "2151:10:100", + "nodeType": "VariableDeclaration", + "scope": 64479, + "src": "2143:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64476, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2143:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2142:20:100" + } + }, + { + "id": 64483, + "nodeType": "ErrorDefinition", + "src": "2168:46:100", + "nodes": [], + "errorSelector": "5291bbcf", + "name": "CoordinatorNotFound", + "nameLocation": "2174:19:100", + "parameters": { + "id": 64482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64481, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "2202:10:100", + "nodeType": "VariableDeclaration", + "scope": 64483, + "src": "2194:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64480, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2194:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2193:20:100" + } + }, + { + "id": 64487, + "nodeType": "ErrorDefinition", + "src": "2219:43:100", + "nodes": [], + "errorSelector": "43609fe1", + "name": "DkgNotInProgress", + "nameLocation": "2225:16:100", + "parameters": { + "id": 64486, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64485, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "2250:10:100", + "nodeType": "VariableDeclaration", + "scope": 64487, + "src": "2242:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64484, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2242:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2241:20:100" + } + }, + { + "id": 64493, + "nodeType": "ErrorDefinition", + "src": "2267:57:100", + "nodes": [], + "errorSelector": "f7c06f91", + "name": "DkgStillInProgress", + "nameLocation": "2273:18:100", + "parameters": { + "id": 64492, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64489, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "2300:10:100", + "nodeType": "VariableDeclaration", + "scope": 64493, + "src": "2292:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64488, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2292:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64491, + "mutability": "mutable", + "name": "phase", + "nameLocation": "2317:5:100", + "nodeType": "VariableDeclaration", + "scope": 64493, + "src": "2312:10:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + }, + "typeName": { + "id": 64490, + "name": "int8", + "nodeType": "ElementaryTypeName", + "src": "2312:4:100", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "visibility": "internal" + } + ], + "src": "2291:32:100" + } + }, + { + "id": 64501, + "nodeType": "ErrorDefinition", + "src": "2329:92:100", + "nodes": [], + "errorSelector": "0916c786", + "name": "EpochMismatch", + "nameLocation": "2335:13:100", + "parameters": { + "id": 64500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64495, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "2357:10:100", + "nodeType": "VariableDeclaration", + "scope": 64501, + "src": "2349:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64494, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2349:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64497, + "mutability": "mutable", + "name": "inputGroupEpoch", + "nameLocation": "2377:15:100", + "nodeType": "VariableDeclaration", + "scope": 64501, + "src": "2369:23:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64496, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2369:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64499, + "mutability": "mutable", + "name": "currentGroupEpoch", + "nameLocation": "2402:17:100", + "nodeType": "VariableDeclaration", + "scope": 64501, + "src": "2394:25:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64498, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2394:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2348:72:100" + } + }, + { + "id": 64507, + "nodeType": "ErrorDefinition", + "src": "2426:64:100", + "nodes": [], + "errorSelector": "eb51f5f9", + "name": "NodeNotInGroup", + "nameLocation": "2432:14:100", + "parameters": { + "id": 64506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64503, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "2455:10:100", + "nodeType": "VariableDeclaration", + "scope": 64507, + "src": "2447:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64502, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2447:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64505, + "mutability": "mutable", + "name": "nodeIdAddress", + "nameLocation": "2475:13:100", + "nodeType": "VariableDeclaration", + "scope": 64507, + "src": "2467:21:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2467:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2446:43:100" + } + }, + { + "id": 64513, + "nodeType": "ErrorDefinition", + "src": "2495:77:100", + "nodes": [], + "errorSelector": "b9e50848", + "name": "PartialKeyAlreadyRegistered", + "nameLocation": "2501:27:100", + "parameters": { + "id": 64512, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64509, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "2537:10:100", + "nodeType": "VariableDeclaration", + "scope": 64513, + "src": "2529:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64508, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2529:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64511, + "mutability": "mutable", + "name": "nodeIdAddress", + "nameLocation": "2557:13:100", + "nodeType": "VariableDeclaration", + "scope": 64513, + "src": "2549:21:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64510, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2549:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2528:43:100" + } + }, + { + "id": 64515, + "nodeType": "ErrorDefinition", + "src": "2577:25:100", + "nodes": [], + "errorSelector": "469666c5", + "name": "SenderNotAdapter", + "nameLocation": "2583:16:100", + "parameters": { + "id": 64514, + "nodeType": "ParameterList", + "parameters": [], + "src": "2599:2:100" + } + }, + { + "id": 64517, + "nodeType": "ErrorDefinition", + "src": "2607:30:100", + "nodes": [], + "errorSelector": "e2c730d0", + "name": "SenderNotNodeRegistry", + "nameLocation": "2613:21:100", + "parameters": { + "id": 64516, + "nodeType": "ParameterList", + "parameters": [], + "src": "2634:2:100" + } + }, + { + "id": 64519, + "nodeType": "ErrorDefinition", + "src": "2642:35:100", + "nodes": [], + "errorSelector": "42381c95", + "name": "DuplicatedDisqualifiedNode", + "nameLocation": "2648:26:100", + "parameters": { + "id": 64518, + "nodeType": "ParameterList", + "parameters": [], + "src": "2674:2:100" + } + }, + { + "id": 64521, + "nodeType": "ErrorDefinition", + "src": "2682:34:100", + "nodes": [], + "errorSelector": "cccf9bf1", + "name": "CannotLeaveGroupDuringDkg", + "nameLocation": "2688:25:100", + "parameters": { + "id": 64520, + "nodeType": "ParameterList", + "parameters": [], + "src": "2713:2:100" + } + }, + { + "id": 64529, + "nodeType": "FunctionDefinition", + "src": "2775:53:100", + "nodes": [], + "body": { + "id": 64528, + "nodeType": "Block", + "src": "2789:39:100", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 64525, + "name": "_disableInitializers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53267, + "src": "2799:20:100", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 64526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2799:22:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64527, + "nodeType": "ExpressionStatement", + "src": "2799:22:100" + } + ] + }, + "documentation": { + "id": 64522, + "nodeType": "StructuredDocumentation", + "src": "2722:48:100", + "text": "@custom:oz-upgrades-unsafe-allow constructor" + }, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "parameters": { + "id": 64523, + "nodeType": "ParameterList", + "parameters": [], + "src": "2786:2:100" + }, + "returnParameters": { + "id": 64524, + "nodeType": "ParameterList", + "parameters": [], + "src": "2789:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "id": 64544, + "nodeType": "FunctionDefinition", + "src": "2834:127:100", + "nodes": [], + "body": { + "id": 64543, + "nodeType": "Block", + "src": "2893:68:100", + "nodes": [], + "statements": [ + { + "expression": { + "id": 64538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 64536, + "name": "_lastOutput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64427, + "src": "2903:11:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 64537, + "name": "lastOutput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64531, + "src": "2917:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2903:24:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 64539, + "nodeType": "ExpressionStatement", + "src": "2903:24:100" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 64540, + "name": "__Ownable_init", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52646, + "src": "2938:14:100", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 64541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2938:16:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64542, + "nodeType": "ExpressionStatement", + "src": "2938:16:100" + } + ] + }, + "baseFunctions": [70143], + "functionSelector": "fe4b84df", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 64534, + "kind": "modifierInvocation", + "modifierName": { + "id": 64533, + "name": "initializer", + "nameLocations": ["2881:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 53188, + "src": "2881:11:100" + }, + "nodeType": "ModifierInvocation", + "src": "2881:11:100" + } + ], + "name": "initialize", + "nameLocation": "2843:10:100", + "parameters": { + "id": 64532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64531, + "mutability": "mutable", + "name": "lastOutput", + "nameLocation": "2862:10:100", + "nodeType": "VariableDeclaration", + "scope": 64544, + "src": "2854:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64530, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2854:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2853:20:100" + }, + "returnParameters": { + "id": 64535, + "nodeType": "ParameterList", + "parameters": [], + "src": "2893:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "id": 64553, + "nodeType": "FunctionDefinition", + "src": "3016:66:100", + "nodes": [], + "body": { + "id": 64552, + "nodeType": "Block", + "src": "3080:2:100", + "nodes": [], + "statements": [] + }, + "baseFunctions": [53417], + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 64550, + "kind": "modifierInvocation", + "modifierName": { + "id": 64549, + "name": "onlyOwner", + "nameLocations": ["3070:9:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 52665, + "src": "3070:9:100" + }, + "nodeType": "ModifierInvocation", + "src": "3070:9:100" + } + ], + "name": "_authorizeUpgrade", + "nameLocation": "3025:17:100", + "overrides": { + "id": 64548, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3061:8:100" + }, + "parameters": { + "id": 64547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64546, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 64553, + "src": "3043:7:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64545, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3043:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3042:9:100" + }, + "returnParameters": { + "id": 64551, + "nodeType": "ParameterList", + "parameters": [], + "src": "3080:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 64606, + "nodeType": "FunctionDefinition", + "src": "3154:1218:100", + "nodes": [], + "body": { + "id": 64605, + "nodeType": "Block", + "src": "3560:812:100", + "nodes": [], + "statements": [ + { + "expression": { + "id": 64584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 64576, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "3570:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 64578, + "name": "nodeRegistryContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64555, + "src": "3640:27:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 64579, + "name": "adapterContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64557, + "src": "3705:22:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 64580, + "name": "disqualifiedNodePenaltyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64559, + "src": "3772:29:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 64581, + "name": "defaultDkgPhaseDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64563, + "src": "3840:23:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 64582, + "name": "dkgPostProcessReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64569, + "src": "3899:20:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 64577, + "name": "ControllerConfig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64438, + "src": "3580:16:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_ControllerConfig_$64438_storage_ptr_$", + "typeString": "type(struct Controller.ControllerConfig storage pointer)" + } + }, + "id": 64583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [ + "3611:27:100", + "3681:22:100", + "3741:29:100", + "3815:23:100", + "3877:20:100" + ], + "names": [ + "nodeRegistryContractAddress", + "adapterContractAddress", + "disqualifiedNodePenaltyAmount", + "defaultDkgPhaseDuration", + "dkgPostProcessReward" + ], + "nodeType": "FunctionCall", + "src": "3580:350:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_memory_ptr", + "typeString": "struct Controller.ControllerConfig memory" + } + }, + "src": "3570:360:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 64585, + "nodeType": "ExpressionStatement", + "src": "3570:360:100" + }, + { + "expression": { + "arguments": [ + { + "id": 64589, + "name": "idealNumberOfGroups", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64567, + "src": "3962:19:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 64590, + "name": "groupMaxCapacity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64565, + "src": "3983:16:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 64591, + "name": "defaultNumberOfCommitters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64561, + "src": "4001:25:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 64586, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "3941:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 64588, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3952:9:100", + "memberName": "setConfig", + "nodeType": "MemberAccess", + "referencedDeclaration": 73079, + "src": "3941:20:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,uint256,uint256,uint256)" + } + }, + "id": 64592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3941:86:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64593, + "nodeType": "ExpressionStatement", + "src": "3941:86:100" + }, + { + "eventCall": { + "arguments": [ + { + "id": 64595, + "name": "nodeRegistryContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64555, + "src": "4076:27:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 64596, + "name": "adapterContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64557, + "src": "4117:22:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 64597, + "name": "disqualifiedNodePenaltyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64559, + "src": "4153:29:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 64598, + "name": "defaultNumberOfCommitters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64561, + "src": "4196:25:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 64599, + "name": "defaultDkgPhaseDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64563, + "src": "4235:23:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 64600, + "name": "groupMaxCapacity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64565, + "src": "4272:16:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 64601, + "name": "idealNumberOfGroups", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64567, + "src": "4302:19:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 64602, + "name": "dkgPostProcessReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64569, + "src": "4335:20:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 64594, + "name": "ControllerConfigSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64456, + "src": "4043:19:100", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint256,uint256,uint256,uint256)" + } + }, + "id": 64603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4043:322:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64604, + "nodeType": "EmitStatement", + "src": "4038:327:100" + } + ] + }, + "baseFunctions": [70138], + "functionSelector": "f1d49f6b", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 64574, + "kind": "modifierInvocation", + "modifierName": { + "id": 64573, + "name": "onlyOwner", + "nameLocations": ["3550:9:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 52665, + "src": "3550:9:100" + }, + "nodeType": "ModifierInvocation", + "src": "3550:9:100" + } + ], + "name": "setControllerConfig", + "nameLocation": "3163:19:100", + "overrides": { + "id": 64572, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 64571, + "name": "IControllerOwner", + "nameLocations": ["3532:16:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 70144, + "src": "3532:16:100" + } + ], + "src": "3523:26:100" + }, + "parameters": { + "id": 64570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64555, + "mutability": "mutable", + "name": "nodeRegistryContractAddress", + "nameLocation": "3200:27:100", + "nodeType": "VariableDeclaration", + "scope": 64606, + "src": "3192:35:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64554, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3192:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64557, + "mutability": "mutable", + "name": "adapterContractAddress", + "nameLocation": "3245:22:100", + "nodeType": "VariableDeclaration", + "scope": 64606, + "src": "3237:30:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64556, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3237:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64559, + "mutability": "mutable", + "name": "disqualifiedNodePenaltyAmount", + "nameLocation": "3285:29:100", + "nodeType": "VariableDeclaration", + "scope": 64606, + "src": "3277:37:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64558, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3277:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64561, + "mutability": "mutable", + "name": "defaultNumberOfCommitters", + "nameLocation": "3332:25:100", + "nodeType": "VariableDeclaration", + "scope": 64606, + "src": "3324:33:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64560, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3324:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64563, + "mutability": "mutable", + "name": "defaultDkgPhaseDuration", + "nameLocation": "3375:23:100", + "nodeType": "VariableDeclaration", + "scope": 64606, + "src": "3367:31:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3367:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64565, + "mutability": "mutable", + "name": "groupMaxCapacity", + "nameLocation": "3416:16:100", + "nodeType": "VariableDeclaration", + "scope": 64606, + "src": "3408:24:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64564, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3408:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64567, + "mutability": "mutable", + "name": "idealNumberOfGroups", + "nameLocation": "3450:19:100", + "nodeType": "VariableDeclaration", + "scope": 64606, + "src": "3442:27:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64566, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3442:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64569, + "mutability": "mutable", + "name": "dkgPostProcessReward", + "nameLocation": "3487:20:100", + "nodeType": "VariableDeclaration", + "scope": 64606, + "src": "3479:28:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64568, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3479:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3182:331:100" + }, + "returnParameters": { + "id": 64575, + "nodeType": "ParameterList", + "parameters": [], + "src": "3560:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 64658, + "nodeType": "FunctionDefinition", + "src": "4439:506:100", + "nodes": [], + "body": { + "id": 64657, + "nodeType": "Block", + "src": "4529:416:100", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 64619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 64615, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4543:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4547:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4543:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 64617, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "4557:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 64618, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4565:27:100", + "memberName": "nodeRegistryContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64429, + "src": "4557:35:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4543:49:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64624, + "nodeType": "IfStatement", + "src": "4539:110:100", + "trueBody": { + "id": 64623, + "nodeType": "Block", + "src": "4594:55:100", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 64620, + "name": "SenderNotNodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64517, + "src": "4615:21:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 64621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4615:23:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64622, + "nodeType": "RevertStatement", + "src": "4608:30:100" + } + ] + } + }, + { + "assignments": [64626, 64629], + "declarations": [ + { + "constant": false, + "id": 64626, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "4668:10:100", + "nodeType": "VariableDeclaration", + "scope": 64657, + "src": "4660:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64625, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4660:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64629, + "mutability": "mutable", + "name": "groupIndicesToEmitEvent", + "nameLocation": "4697:23:100", + "nodeType": "VariableDeclaration", + "scope": 64657, + "src": "4680:40:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 64627, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4680:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 64628, + "nodeType": "ArrayTypeName", + "src": "4680:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "id": 64635, + "initialValue": { + "arguments": [ + { + "id": 64632, + "name": "nodeIdAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64608, + "src": "4744:13:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 64633, + "name": "_lastOutput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64427, + "src": "4759:11:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 64630, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "4724:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 64631, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4735:8:100", + "memberName": "nodeJoin", + "nodeType": "MemberAccess", + "referencedDeclaration": 73179, + "src": "4724:19:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,address,uint256) returns (uint256,uint256[] memory)" + } + }, + "id": 64634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4724:47:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "tuple(uint256,uint256[] memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4659:112:100" + }, + { + "body": { + "id": 64653, + "nodeType": "Block", + "src": "4843:68:100", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 64648, + "name": "groupIndicesToEmitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64629, + "src": "4873:23:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 64650, + "indexExpression": { + "id": 64649, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64637, + "src": "4897:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4873:26:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 64647, + "name": "_emitGroupEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65743, + "src": "4857:15:100", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 64651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4857:43:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64652, + "nodeType": "ExpressionStatement", + "src": "4857:43:100" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 64643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 64640, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64637, + "src": "4802:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 64641, + "name": "groupIndicesToEmitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64629, + "src": "4806:23:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 64642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4830:6:100", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4806:30:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4802:34:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64654, + "initializationExpression": { + "assignments": [64637], + "declarations": [ + { + "constant": false, + "id": 64637, + "mutability": "mutable", + "name": "i", + "nameLocation": "4795:1:100", + "nodeType": "VariableDeclaration", + "scope": 64654, + "src": "4787:9:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64636, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4787:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 64639, + "initialValue": { + "hexValue": "30", + "id": 64638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4799:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4787:13:100" + }, + "loopExpression": { + "expression": { + "id": 64645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4838:3:100", + "subExpression": { + "id": 64644, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64637, + "src": "4838:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 64646, + "nodeType": "ExpressionStatement", + "src": "4838:3:100" + }, + "nodeType": "ForStatement", + "src": "4782:129:100" + }, + { + "expression": { + "id": 64655, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64626, + "src": "4928:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 64614, + "id": 64656, + "nodeType": "Return", + "src": "4921:17:100" + } + ] + }, + "baseFunctions": [69819], + "functionSelector": "ed157c3f", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "nodeJoin", + "nameLocation": "4448:8:100", + "overrides": { + "id": 64611, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 64610, + "name": "IController", + "nameLocations": ["4498:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "4498:11:100" + } + ], + "src": "4489:21:100" + }, + "parameters": { + "id": 64609, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64608, + "mutability": "mutable", + "name": "nodeIdAddress", + "nameLocation": "4465:13:100", + "nodeType": "VariableDeclaration", + "scope": 64658, + "src": "4457:21:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64607, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4457:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4456:23:100" + }, + "returnParameters": { + "id": 64614, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64613, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 64658, + "src": "4520:7:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64612, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4520:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4519:9:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 64744, + "nodeType": "FunctionDefinition", + "src": "4951:788:100", + "nodes": [], + "body": { + "id": 64743, + "nodeType": "Block", + "src": "5024:715:100", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 64669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 64665, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5038:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5042:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5038:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 64667, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "5052:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 64668, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5060:27:100", + "memberName": "nodeRegistryContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64429, + "src": "5052:35:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5038:49:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64674, + "nodeType": "IfStatement", + "src": "5034:110:100", + "trueBody": { + "id": 64673, + "nodeType": "Block", + "src": "5089:55:100", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 64670, + "name": "SenderNotNodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64517, + "src": "5110:21:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 64671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5110:23:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64672, + "nodeType": "RevertStatement", + "src": "5103:30:100" + } + ] + } + }, + { + "assignments": [64676, 64678], + "declarations": [ + { + "constant": false, + "id": 64676, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "5162:10:100", + "nodeType": "VariableDeclaration", + "scope": 64743, + "src": "5155:17:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 64675, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "5155:6:100", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 64678, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "5181:11:100", + "nodeType": "VariableDeclaration", + "scope": 64743, + "src": "5174:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 64677, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "5174:6:100", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 64683, + "initialValue": { + "arguments": [ + { + "id": 64681, + "name": "nodeIdAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64660, + "src": "5240:13:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 64679, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "5196:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 64680, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5207:32:100", + "memberName": "getBelongingGroupByMemberAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 73904, + "src": "5196:43:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_address_$returns$_t_int256_$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,address) view returns (int256,int256)" + } + }, + "id": 64682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5196:58:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$", + "typeString": "tuple(int256,int256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5154:100:100" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 64687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 64684, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64676, + "src": "5269:10:100", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 64686, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "5283:2:100", + "subExpression": { + "hexValue": "31", + "id": 64685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5284:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + }, + "src": "5269:16:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64742, + "nodeType": "IfStatement", + "src": "5265:468:100", + "trueBody": { + "id": 64741, + "nodeType": "Block", + "src": "5287:446:100", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 64698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 64688, + "name": "_coordinators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64422, + "src": "5305:13:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 64693, + "indexExpression": { + "arguments": [ + { + "id": 64691, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64676, + "src": "5327:10:100", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 64690, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5319:7:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 64689, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5319:7:100", + "typeDescriptions": {} + } + }, + "id": 64692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5319:19:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5305:34:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 64696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5351:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 64695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5343:7:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 64694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5343:7:100", + "typeDescriptions": {} + } + }, + "id": 64697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5343:10:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5305:48:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64703, + "nodeType": "IfStatement", + "src": "5301:121:100", + "trueBody": { + "id": 64702, + "nodeType": "Block", + "src": "5355:67:100", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 64699, + "name": "CannotLeaveGroupDuringDkg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64521, + "src": "5380:25:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 64700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5380:27:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64701, + "nodeType": "RevertStatement", + "src": "5373:34:100" + } + ] + } + }, + { + "assignments": [64708], + "declarations": [ + { + "constant": false, + "id": 64708, + "mutability": "mutable", + "name": "groupIndicesToEmitEvent", + "nameLocation": "5453:23:100", + "nodeType": "VariableDeclaration", + "scope": 64741, + "src": "5436:40:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 64706, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5436:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 64707, + "nodeType": "ArrayTypeName", + "src": "5436:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "id": 64721, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 64713, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64676, + "src": "5524:10:100", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 64712, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5516:7:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 64711, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5516:7:100", + "typeDescriptions": {} + } + }, + "id": 64714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5516:19:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 64717, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64678, + "src": "5545:11:100", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 64716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5537:7:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 64715, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5537:7:100", + "typeDescriptions": {} + } + }, + "id": 64718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5537:20:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 64719, + "name": "_lastOutput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64427, + "src": "5559:11:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 64709, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "5495:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 64710, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5506:9:100", + "memberName": "nodeLeave", + "nodeType": "MemberAccess", + "referencedDeclaration": 73244, + "src": "5495:20:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,uint256,uint256,uint256) returns (uint256[] memory)" + } + }, + "id": 64720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5495:76:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5436:135:100" + }, + { + "body": { + "id": 64739, + "nodeType": "Block", + "src": "5647:76:100", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 64734, + "name": "groupIndicesToEmitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64708, + "src": "5681:23:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 64736, + "indexExpression": { + "id": 64735, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64723, + "src": "5705:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5681:26:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 64733, + "name": "_emitGroupEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65743, + "src": "5665:15:100", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 64737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5665:43:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64738, + "nodeType": "ExpressionStatement", + "src": "5665:43:100" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 64729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 64726, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64723, + "src": "5606:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 64727, + "name": "groupIndicesToEmitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64708, + "src": "5610:23:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 64728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5634:6:100", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "5610:30:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5606:34:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64740, + "initializationExpression": { + "assignments": [64723], + "declarations": [ + { + "constant": false, + "id": 64723, + "mutability": "mutable", + "name": "i", + "nameLocation": "5599:1:100", + "nodeType": "VariableDeclaration", + "scope": 64740, + "src": "5591:9:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64722, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5591:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 64725, + "initialValue": { + "hexValue": "30", + "id": 64724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5603:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5591:13:100" + }, + "loopExpression": { + "expression": { + "id": 64731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "5642:3:100", + "subExpression": { + "id": 64730, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64723, + "src": "5642:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 64732, + "nodeType": "ExpressionStatement", + "src": "5642:3:100" + }, + "nodeType": "ForStatement", + "src": "5586:137:100" + } + ] + } + } + ] + }, + "baseFunctions": [69824], + "functionSelector": "35fe4a3f", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "nodeLeave", + "nameLocation": "4960:9:100", + "overrides": { + "id": 64663, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 64662, + "name": "IController", + "nameLocations": ["5011:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "5011:11:100" + } + ], + "src": "5002:21:100" + }, + "parameters": { + "id": 64661, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64660, + "mutability": "mutable", + "name": "nodeIdAddress", + "nameLocation": "4978:13:100", + "nodeType": "VariableDeclaration", + "scope": 64744, + "src": "4970:21:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 64659, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4970:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4969:23:100" + }, + "returnParameters": { + "id": 64664, + "nodeType": "ParameterList", + "parameters": [], + "src": "5024:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 65091, + "nodeType": "FunctionDefinition", + "src": "5745:4081:100", + "nodes": [], + "body": { + "id": 65090, + "nodeType": "Block", + "src": "5826:4000:100", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 64756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 64752, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "5840:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64753, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5847:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "5840:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 64754, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "5861:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 64755, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5872:10:100", + "memberName": "groupCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 73030, + "src": "5861:21:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5840:42:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64763, + "nodeType": "IfStatement", + "src": "5836:112:100", + "trueBody": { + "id": 64762, + "nodeType": "Block", + "src": "5884:64:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 64758, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "5919:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64759, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5926:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "5919:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 64757, + "name": "GroupNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64479, + "src": "5905:13:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 64760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5905:32:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64761, + "nodeType": "RevertStatement", + "src": "5898:39:100" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 64772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 64764, + "name": "_coordinators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64422, + "src": "6000:13:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 64767, + "indexExpression": { + "expression": { + "id": 64765, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6014:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6021:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "6014:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6000:32:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 64770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6044:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 64769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6036:7:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 64768, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6036:7:100", + "typeDescriptions": {} + } + }, + "id": 64771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6036:10:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6000:46:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64779, + "nodeType": "IfStatement", + "src": "5996:122:100", + "trueBody": { + "id": 64778, + "nodeType": "Block", + "src": "6048:70:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 64774, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6089:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64775, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6096:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "6089:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 64773, + "name": "CoordinatorNotFound", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64483, + "src": "6069:19:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 64776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6069:38:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64777, + "nodeType": "RevertStatement", + "src": "6062:45:100" + } + ] + } + }, + { + "assignments": [64782], + "declarations": [ + { + "constant": false, + "id": 64782, + "mutability": "mutable", + "name": "coordinator", + "nameLocation": "6184:11:100", + "nodeType": "VariableDeclaration", + "scope": 65090, + "src": "6171:24:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICoordinator_$70169", + "typeString": "contract ICoordinator" + }, + "typeName": { + "id": 64781, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 64780, + "name": "ICoordinator", + "nameLocations": ["6171:12:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 70169, + "src": "6171:12:100" + }, + "referencedDeclaration": 70169, + "src": "6171:12:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICoordinator_$70169", + "typeString": "contract ICoordinator" + } + }, + "visibility": "internal" + } + ], + "id": 64789, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 64784, + "name": "_coordinators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64422, + "src": "6211:13:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 64787, + "indexExpression": { + "expression": { + "id": 64785, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6225:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64786, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6232:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "6225:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6211:32:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 64783, + "name": "ICoordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70169, + "src": "6198:12:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICoordinator_$70169_$", + "typeString": "type(contract ICoordinator)" + } + }, + "id": 64788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6198:46:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICoordinator_$70169", + "typeString": "contract ICoordinator" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6171:73:100" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int8", + "typeString": "int8" + }, + "id": 64795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 64790, + "name": "coordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64782, + "src": "6258:11:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICoordinator_$70169", + "typeString": "contract ICoordinator" + } + }, + "id": 64791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6270:7:100", + "memberName": "inPhase", + "nodeType": "MemberAccess", + "referencedDeclaration": 70151, + "src": "6258:19:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_int8_$", + "typeString": "function () view external returns (int8)" + } + }, + "id": 64792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6258:21:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 64794, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "6283:2:100", + "subExpression": { + "hexValue": "31", + "id": 64793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6284:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + }, + "src": "6258:27:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64802, + "nodeType": "IfStatement", + "src": "6254:100:100", + "trueBody": { + "id": 64801, + "nodeType": "Block", + "src": "6287:67:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 64797, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6325:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6332:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "6325:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 64796, + "name": "DkgNotInProgress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64487, + "src": "6308:16:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 64799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6308:35:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64800, + "nodeType": "RevertStatement", + "src": "6301:42:100" + } + ] + } + }, + { + "assignments": [64805], + "declarations": [ + { + "constant": false, + "id": 64805, + "mutability": "mutable", + "name": "g", + "nameLocation": "6476:1:100", + "nodeType": "VariableDeclaration", + "scope": 65090, + "src": "6462:15:100", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group" + }, + "typeName": { + "id": 64804, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 64803, + "name": "Group", + "nameLocations": ["6462:5:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69776, + "src": "6462:5:100" + }, + "referencedDeclaration": 69776, + "src": "6462:5:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group" + } + }, + "visibility": "internal" + } + ], + "id": 64811, + "initialValue": { + "baseExpression": { + "expression": { + "id": 64806, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "6480:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 64807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6491:6:100", + "memberName": "groups", + "nodeType": "MemberAccess", + "referencedDeclaration": 73035, + "src": "6480:17:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$", + "typeString": "mapping(uint256 => struct IController.Group storage ref)" + } + }, + "id": 64810, + "indexExpression": { + "expression": { + "id": 64808, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6498:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6505:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "6498:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6480:36:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage", + "typeString": "struct IController.Group storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6462:54:100" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 64816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 64812, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6530:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64813, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6537:10:100", + "memberName": "groupEpoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 69804, + "src": "6530:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 64814, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64805, + "src": "6551:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group storage pointer" + } + }, + "id": 64815, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6553:5:100", + "memberName": "epoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 69754, + "src": "6551:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6530:28:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64827, + "nodeType": "IfStatement", + "src": "6526:126:100", + "trueBody": { + "id": 64826, + "nodeType": "Block", + "src": "6560:92:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 64818, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6595:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64819, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6602:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "6595:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 64820, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6614:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64821, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6621:10:100", + "memberName": "groupEpoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 69804, + "src": "6614:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 64822, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64805, + "src": "6633:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group storage pointer" + } + }, + "id": 64823, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6635:5:100", + "memberName": "epoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 69754, + "src": "6633:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 64817, + "name": "EpochMismatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64501, + "src": "6581:13:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256) pure" + } + }, + "id": 64824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6581:60:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64825, + "nodeType": "RevertStatement", + "src": "6574:67:100" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 64837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 64830, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6701:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64831, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6708:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "6701:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 64832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6720:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6724:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6720:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 64828, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "6666:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 64829, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6677:23:100", + "memberName": "getMemberIndexByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 73958, + "src": "6666:34:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_address_$returns$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,uint256,address) view returns (int256)" + } + }, + "id": 64834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6666:65:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 64836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "6735:2:100", + "subExpression": { + "hexValue": "31", + "id": 64835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6736:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + }, + "src": "6666:71:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64846, + "nodeType": "IfStatement", + "src": "6662:154:100", + "trueBody": { + "id": 64845, + "nodeType": "Block", + "src": "6739:77:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 64839, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6775:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6782:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "6775:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 64841, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6794:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6798:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6794:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 64838, + "name": "NodeNotInGroup", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64507, + "src": "6760:14:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) pure" + } + }, + "id": 64843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6760:45:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64844, + "nodeType": "RevertStatement", + "src": "6753:52:100" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "expression": { + "id": 64848, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "6921:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64849, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6928:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "6921:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 64850, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6940:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6944:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6940:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 64847, + "name": "isPartialKeyRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65605, + "src": "6898:22:100", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_bool_$", + "typeString": "function (uint256,address) view returns (bool)" + } + }, + "id": 64852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6898:53:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64861, + "nodeType": "IfStatement", + "src": "6894:149:100", + "trueBody": { + "id": 64860, + "nodeType": "Block", + "src": "6953:90:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 64854, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "7002:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64855, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7009:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "7002:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 64856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7021:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7025:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7021:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 64853, + "name": "PartialKeyAlreadyRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64513, + "src": "6974:27:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) pure" + } + }, + "id": 64858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6974:58:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64859, + "nodeType": "RevertStatement", + "src": "6967:65:100" + } + ] + } + }, + { + "assignments": [64867], + "declarations": [ + { + "constant": false, + "id": 64867, + "mutability": "mutable", + "name": "partialPublicKey", + "nameLocation": "7161:16:100", + "nodeType": "VariableDeclaration", + "scope": 65090, + "src": "7143:34:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4]" + }, + "typeName": { + "baseType": { + "id": 64865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7143:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 64866, + "length": { + "hexValue": "34", + "id": 64864, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7151:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "7143:10:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_storage_ptr", + "typeString": "uint256[4]" + } + }, + "visibility": "internal" + } + ], + "id": 64873, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 64870, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "7203:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7210:16:100", + "memberName": "partialPublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 69808, + "src": "7203:23:100", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 64868, + "name": "BLS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 71125, + "src": "7180:3:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BLS_$71125_$", + "typeString": "type(library BLS)" + } + }, + "id": 64869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7184:18:100", + "memberName": "fromBytesPublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 70904, + "src": "7180:22:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$4_memory_ptr_$", + "typeString": "function (bytes memory) pure returns (uint256[4] memory)" + } + }, + "id": 64872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7180:47:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7143:84:100" + }, + { + "condition": { + "id": 64878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7241:39:100", + "subExpression": { + "arguments": [ + { + "id": 64876, + "name": "partialPublicKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64867, + "src": "7263:16:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4] memory" + } + ], + "expression": { + "id": 64874, + "name": "BLS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 71125, + "src": "7242:3:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BLS_$71125_$", + "typeString": "type(library BLS)" + } + }, + "id": 64875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7246:16:100", + "memberName": "isValidPublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 70864, + "src": "7242:20:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_array$_t_uint256_$4_memory_ptr_$returns$_t_bool_$", + "typeString": "function (uint256[4] memory) pure returns (bool)" + } + }, + "id": 64877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7242:38:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64885, + "nodeType": "IfStatement", + "src": "7237:106:100", + "trueBody": { + "id": 64884, + "nodeType": "Block", + "src": "7282:61:100", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 64879, + "name": "BLS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 71125, + "src": "7303:3:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BLS_$71125_$", + "typeString": "type(library BLS)" + } + }, + "id": 64881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7307:23:100", + "memberName": "InvalidPartialPublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 70477, + "src": "7303:27:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 64882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7303:29:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64883, + "nodeType": "RevertStatement", + "src": "7296:36:100" + } + ] + } + }, + { + "assignments": [64891], + "declarations": [ + { + "constant": false, + "id": 64891, + "mutability": "mutable", + "name": "publicKey", + "nameLocation": "7371:9:100", + "nodeType": "VariableDeclaration", + "scope": 65090, + "src": "7353:27:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4]" + }, + "typeName": { + "baseType": { + "id": 64889, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7353:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 64890, + "length": { + "hexValue": "34", + "id": 64888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7361:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "7353:10:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_storage_ptr", + "typeString": "uint256[4]" + } + }, + "visibility": "internal" + } + ], + "id": 64897, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 64894, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "7406:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7413:9:100", + "memberName": "publicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 69806, + "src": "7406:16:100", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 64892, + "name": "BLS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 71125, + "src": "7383:3:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BLS_$71125_$", + "typeString": "type(library BLS)" + } + }, + "id": 64893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7387:18:100", + "memberName": "fromBytesPublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 70904, + "src": "7383:22:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$4_memory_ptr_$", + "typeString": "function (bytes memory) pure returns (uint256[4] memory)" + } + }, + "id": 64896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7383:40:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7353:70:100" + }, + { + "condition": { + "id": 64902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7437:32:100", + "subExpression": { + "arguments": [ + { + "id": 64900, + "name": "publicKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64891, + "src": "7459:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4] memory" + } + ], + "expression": { + "id": 64898, + "name": "BLS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 71125, + "src": "7438:3:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BLS_$71125_$", + "typeString": "type(library BLS)" + } + }, + "id": 64899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7442:16:100", + "memberName": "isValidPublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 70864, + "src": "7438:20:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_array$_t_uint256_$4_memory_ptr_$returns$_t_bool_$", + "typeString": "function (uint256[4] memory) pure returns (bool)" + } + }, + "id": 64901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7438:31:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64909, + "nodeType": "IfStatement", + "src": "7433:92:100", + "trueBody": { + "id": 64908, + "nodeType": "Block", + "src": "7471:54:100", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 64903, + "name": "BLS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 71125, + "src": "7492:3:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BLS_$71125_$", + "typeString": "type(library BLS)" + } + }, + "id": 64905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7496:16:100", + "memberName": "InvalidPublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 70475, + "src": "7492:20:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 64906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7492:22:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64907, + "nodeType": "RevertStatement", + "src": "7485:29:100" + } + ] + } + }, + { + "expression": { + "id": 64926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "expression": { + "id": 64910, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64805, + "src": "7662:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group storage pointer" + } + }, + "id": 64922, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7664:7:100", + "memberName": "members", + "nodeType": "MemberAccess", + "referencedDeclaration": 69762, + "src": "7662:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Member_$69783_storage_$dyn_storage", + "typeString": "struct IController.Member storage ref[] storage ref" + } + }, + "id": 64923, + "indexExpression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 64916, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "7715:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64917, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7722:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "7715:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 64918, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7734:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7738:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7734:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 64914, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "7680:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 64915, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7691:23:100", + "memberName": "getMemberIndexByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 73958, + "src": "7680:34:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_address_$returns$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,uint256,address) view returns (int256)" + } + }, + "id": 64920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7680:65:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 64913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7672:7:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 64912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7672:7:100", + "typeDescriptions": {} + } + }, + "id": 64921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7672:74:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7662:85:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$69783_storage", + "typeString": "struct IController.Member storage ref" + } + }, + "id": 64924, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "7748:16:100", + "memberName": "partialPublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 69782, + "src": "7662:102:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_storage", + "typeString": "uint256[4] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 64925, + "name": "partialPublicKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64867, + "src": "7779:16:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4] memory" + } + }, + "src": "7662:133:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_storage", + "typeString": "uint256[4] storage ref" + } + }, + "id": 64927, + "nodeType": "ExpressionStatement", + "src": "7662:133:100" + }, + { + "condition": { + "id": 64930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7952:37:100", + "subExpression": { + "expression": { + "id": 64928, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64805, + "src": "7953:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group storage pointer" + } + }, + "id": 64929, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7955:34:100", + "memberName": "isStrictlyMajorityConsensusReached", + "nodeType": "MemberAccess", + "referencedDeclaration": 69771, + "src": "7953:36:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65089, + "nodeType": "IfStatement", + "src": "7948:1872:100", + "trueBody": { + "id": 65088, + "nodeType": "Block", + "src": "7991:1829:100", + "statements": [ + { + "body": { + "id": 64996, + "nodeType": "Block", + "src": "8118:507:100", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 64954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 64945, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8175:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64946, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8182:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "8175:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "expression": { + "id": 64947, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8194:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64948, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8201:17:100", + "memberName": "disqualifiedNodes", + "nodeType": "MemberAccess", + "referencedDeclaration": 69811, + "src": "8194:24:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 64950, + "indexExpression": { + "id": 64949, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64932, + "src": "8219:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8194:27:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 64943, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "8140:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 64944, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8151:23:100", + "memberName": "getMemberIndexByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 73958, + "src": "8140:34:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_address_$returns$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,uint256,address) view returns (int256)" + } + }, + "id": 64951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8140:82:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 64953, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "8226:2:100", + "subExpression": { + "hexValue": "31", + "id": 64952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8227:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + }, + "src": "8140:88:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64965, + "nodeType": "IfStatement", + "src": "8136:204:100", + "trueBody": { + "id": 64964, + "nodeType": "Block", + "src": "8230:110:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 64956, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8274:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64957, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8281:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "8274:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "expression": { + "id": 64958, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8293:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64959, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8300:17:100", + "memberName": "disqualifiedNodes", + "nodeType": "MemberAccess", + "referencedDeclaration": 69811, + "src": "8293:24:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 64961, + "indexExpression": { + "id": 64960, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64932, + "src": "8318:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8293:27:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 64955, + "name": "NodeNotInGroup", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64507, + "src": "8259:14:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) pure" + } + }, + "id": 64962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8259:62:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64963, + "nodeType": "RevertStatement", + "src": "8252:69:100" + } + ] + } + }, + { + "body": { + "id": 64994, + "nodeType": "Block", + "src": "8423:188:100", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 64988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "id": 64980, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8449:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8456:17:100", + "memberName": "disqualifiedNodes", + "nodeType": "MemberAccess", + "referencedDeclaration": 69811, + "src": "8449:24:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 64983, + "indexExpression": { + "id": 64982, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64932, + "src": "8474:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8449:27:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "baseExpression": { + "expression": { + "id": 64984, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8480:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8487:17:100", + "memberName": "disqualifiedNodes", + "nodeType": "MemberAccess", + "referencedDeclaration": 69811, + "src": "8480:24:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 64987, + "indexExpression": { + "id": 64986, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64967, + "src": "8505:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8480:27:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8449:58:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64993, + "nodeType": "IfStatement", + "src": "8445:148:100", + "trueBody": { + "id": 64992, + "nodeType": "Block", + "src": "8509:84:100", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 64989, + "name": "DuplicatedDisqualifiedNode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64519, + "src": "8542:26:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 64990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8542:28:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64991, + "nodeType": "RevertStatement", + "src": "8535:35:100" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 64976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 64972, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64967, + "src": "8381:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "expression": { + "id": 64973, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8385:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64974, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8392:17:100", + "memberName": "disqualifiedNodes", + "nodeType": "MemberAccess", + "referencedDeclaration": 69811, + "src": "8385:24:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 64975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8410:6:100", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8385:31:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8381:35:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64995, + "initializationExpression": { + "assignments": [64967], + "declarations": [ + { + "constant": false, + "id": 64967, + "mutability": "mutable", + "name": "j", + "nameLocation": "8370:1:100", + "nodeType": "VariableDeclaration", + "scope": 64995, + "src": "8362:9:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8362:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 64971, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 64970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 64968, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64932, + "src": "8374:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 64969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8378:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "8374:5:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8362:17:100" + }, + "loopExpression": { + "expression": { + "id": 64978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "8418:3:100", + "subExpression": { + "id": 64977, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64967, + "src": "8418:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 64979, + "nodeType": "ExpressionStatement", + "src": "8418:3:100" + }, + "nodeType": "ForStatement", + "src": "8357:254:100" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 64939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 64935, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64932, + "src": "8076:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "expression": { + "id": 64936, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8080:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 64937, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8087:17:100", + "memberName": "disqualifiedNodes", + "nodeType": "MemberAccess", + "referencedDeclaration": 69811, + "src": "8080:24:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 64938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8105:6:100", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8080:31:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8076:35:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 64997, + "initializationExpression": { + "assignments": [64932], + "declarations": [ + { + "constant": false, + "id": 64932, + "mutability": "mutable", + "name": "i", + "nameLocation": "8069:1:100", + "nodeType": "VariableDeclaration", + "scope": 64997, + "src": "8061:9:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64931, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8061:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 64934, + "initialValue": { + "hexValue": "30", + "id": 64933, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8073:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8061:13:100" + }, + "loopExpression": { + "expression": { + "id": 64941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "8113:3:100", + "subExpression": { + "id": 64940, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64932, + "src": "8113:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 64942, + "nodeType": "ExpressionStatement", + "src": "8113:3:100" + }, + "nodeType": "ForStatement", + "src": "8056:569:100" + }, + { + "assignments": [65000], + "declarations": [ + { + "constant": false, + "id": 65000, + "mutability": "mutable", + "name": "commitResult", + "nameLocation": "8710:12:100", + "nodeType": "VariableDeclaration", + "scope": 65088, + "src": "8690:32:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitResult_$69793_memory_ptr", + "typeString": "struct IController.CommitResult" + }, + "typeName": { + "id": 64999, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 64998, + "name": "CommitResult", + "nameLocations": ["8690:12:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69793, + "src": "8690:12:100" + }, + "referencedDeclaration": 69793, + "src": "8690:12:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitResult_$69793_storage_ptr", + "typeString": "struct IController.CommitResult" + } + }, + "visibility": "internal" + } + ], + "id": 65008, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 65002, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8768:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 65003, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8775:10:100", + "memberName": "groupEpoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 69804, + "src": "8768:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 65004, + "name": "publicKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64891, + "src": "8814:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4] memory" + } + }, + { + "expression": { + "id": 65005, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8860:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 65006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8867:17:100", + "memberName": "disqualifiedNodes", + "nodeType": "MemberAccess", + "referencedDeclaration": 69811, + "src": "8860:24:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4] memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "id": 65001, + "name": "CommitResult", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69793, + "src": "8725:12:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_CommitResult_$69793_storage_ptr_$", + "typeString": "type(struct IController.CommitResult storage pointer)" + } + }, + "id": 65007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [ + "8756:10:100", + "8803:9:100", + "8841:17:100" + ], + "names": [ + "groupEpoch", + "publicKey", + "disqualifiedNodes" + ], + "nodeType": "FunctionCall", + "src": "8725:174:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitResult_$69793_memory_ptr", + "typeString": "struct IController.CommitResult memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8690:209:100" + }, + { + "condition": { + "id": 65015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8918:72:100", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 65011, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "8958:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 65012, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8965:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "8958:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 65013, + "name": "commitResult", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65000, + "src": "8977:12:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitResult_$69793_memory_ptr", + "typeString": "struct IController.CommitResult memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_struct$_CommitResult_$69793_memory_ptr", + "typeString": "struct IController.CommitResult memory" + } + ], + "expression": { + "id": 65009, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "8919:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65010, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8930:27:100", + "memberName": "tryAddToExistingCommitCache", + "nodeType": "MemberAccess", + "referencedDeclaration": 73787, + "src": "8919:38:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_struct$_CommitResult_$69793_memory_ptr_$returns$_t_bool_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,uint256,struct IController.CommitResult memory) returns (bool)" + } + }, + "id": 65014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8919:71:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65046, + "nodeType": "IfStatement", + "src": "8914:351:100", + "trueBody": { + "id": 65045, + "nodeType": "Block", + "src": "8992:273:100", + "statements": [ + { + "assignments": [65018], + "declarations": [ + { + "constant": false, + "id": 65018, + "mutability": "mutable", + "name": "commitCache", + "nameLocation": "9029:11:100", + "nodeType": "VariableDeclaration", + "scope": 65045, + "src": "9010:30:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitCache_$69800_memory_ptr", + "typeString": "struct IController.CommitCache" + }, + "typeName": { + "id": 65017, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 65016, + "name": "CommitCache", + "nameLocations": ["9010:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69800, + "src": "9010:11:100" + }, + "referencedDeclaration": 69800, + "src": "9010:11:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitCache_$69800_storage_ptr", + "typeString": "struct IController.CommitCache" + } + }, + "visibility": "internal" + } + ], + "id": 65027, + "initialValue": { + "arguments": [ + { + "id": 65020, + "name": "commitResult", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65000, + "src": "9090:12:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitResult_$69793_memory_ptr", + "typeString": "struct IController.CommitResult memory" + } + }, + { + "arguments": [ + { + "hexValue": "31", + "id": 65024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9133:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 65023, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "9119:13:100", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 65021, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9123:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65022, + "nodeType": "ArrayTypeName", + "src": "9123:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 65025, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9119:16:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_CommitResult_$69793_memory_ptr", + "typeString": "struct IController.CommitResult memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "id": 65019, + "name": "CommitCache", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69800, + "src": "9063:11:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_CommitCache_$69800_storage_ptr_$", + "typeString": "type(struct IController.CommitCache storage pointer)" + } + }, + "id": 65026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": ["9076:12:100", "9104:13:100"], + "names": ["commitResult", "nodeIdAddress"], + "nodeType": "FunctionCall", + "src": "9063:74:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitCache_$69800_memory_ptr", + "typeString": "struct IController.CommitCache memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9010:127:100" + }, + { + "expression": { + "id": 65035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 65028, + "name": "commitCache", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65018, + "src": "9156:11:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitCache_$69800_memory_ptr", + "typeString": "struct IController.CommitCache memory" + } + }, + "id": 65031, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9168:13:100", + "memberName": "nodeIdAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 69796, + "src": "9156:25:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 65032, + "indexExpression": { + "hexValue": "30", + "id": 65030, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9182:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9156:28:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 65033, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9187:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 65034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9191:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9187:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9156:41:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65036, + "nodeType": "ExpressionStatement", + "src": "9156:41:100" + }, + { + "expression": { + "arguments": [ + { + "id": 65042, + "name": "commitCache", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65018, + "src": "9238:11:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitCache_$69800_memory_ptr", + "typeString": "struct IController.CommitCache memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_CommitCache_$69800_memory_ptr", + "typeString": "struct IController.CommitCache memory" + } + ], + "expression": { + "expression": { + "id": 65037, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64805, + "src": "9215:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group storage pointer" + } + }, + "id": 65040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9217:15:100", + "memberName": "commitCacheList", + "nodeType": "MemberAccess", + "referencedDeclaration": 69769, + "src": "9215:17:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CommitCache_$69800_storage_$dyn_storage", + "typeString": "struct IController.CommitCache storage ref[] storage ref" + } + }, + "id": 65041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9233:4:100", + "memberName": "push", + "nodeType": "MemberAccess", + "src": "9215:22:100", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_CommitCache_$69800_storage_$dyn_storage_ptr_$_t_struct$_CommitCache_$69800_storage_$returns$__$attached_to$_t_array$_t_struct$_CommitCache_$69800_storage_$dyn_storage_ptr_$", + "typeString": "function (struct IController.CommitCache storage ref[] storage pointer,struct IController.CommitCache storage ref)" + } + }, + "id": 65043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9215:35:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65044, + "nodeType": "ExpressionStatement", + "src": "9215:35:100" + } + ] + } + }, + { + "assignments": [65048, 65051], + "declarations": [ + { + "constant": false, + "id": 65048, + "mutability": "mutable", + "name": "success", + "nameLocation": "9285:7:100", + "nodeType": "VariableDeclaration", + "scope": 65088, + "src": "9280:12:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 65047, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9280:4:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65051, + "mutability": "mutable", + "name": "disqualifiedNodes", + "nameLocation": "9311:17:100", + "nodeType": "VariableDeclaration", + "scope": 65088, + "src": "9294:34:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 65049, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9294:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65050, + "nodeType": "ArrayTypeName", + "src": "9294:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 65058, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 65054, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64747, + "src": "9374:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams memory" + } + }, + "id": 65055, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9381:10:100", + "memberName": "groupIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 69802, + "src": "9374:17:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 65056, + "name": "_lastOutput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64427, + "src": "9393:11:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 65052, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "9348:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65053, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9359:14:100", + "memberName": "tryEnableGroup", + "nodeType": "MemberAccess", + "referencedDeclaration": 73508, + "src": "9348:25:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,uint256,uint256) returns (bool,address[] memory)" + } + }, + "id": 65057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9348:57:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "tuple(bool,address[] memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9279:126:100" + }, + { + "condition": { + "id": 65059, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65048, + "src": "9424:7:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65087, + "nodeType": "IfStatement", + "src": "9420:390:100", + "trueBody": { + "id": 65086, + "nodeType": "Block", + "src": "9433:377:100", + "statements": [ + { + "body": { + "id": 65084, + "nodeType": "Block", + "src": "9585:211:100", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 65076, + "name": "disqualifiedNodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65051, + "src": "9693:17:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 65078, + "indexExpression": { + "id": 65077, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65061, + "src": "9711:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9693:20:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 65079, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "9715:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65080, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9723:29:100", + "memberName": "disqualifiedNodePenaltyAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 64433, + "src": "9715:37:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 65081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9754:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 65072, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "9621:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65073, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9629:27:100", + "memberName": "nodeRegistryContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64429, + "src": "9621:35:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 65071, + "name": "INodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70293, + "src": "9607:13:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_INodeRegistry_$70293_$", + "typeString": "type(contract INodeRegistry)" + } + }, + "id": 65074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9607:50:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_INodeRegistry_$70293", + "typeString": "contract INodeRegistry" + } + }, + "id": 65075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9658:9:100", + "memberName": "slashNode", + "nodeType": "MemberAccess", + "referencedDeclaration": 70245, + "src": "9607:60:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 65082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9607:170:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65083, + "nodeType": "ExpressionStatement", + "src": "9607:170:100" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 65067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 65064, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65061, + "src": "9550:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 65065, + "name": "disqualifiedNodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65051, + "src": "9554:17:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 65066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9572:6:100", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9554:24:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9550:28:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65085, + "initializationExpression": { + "assignments": [65061], + "declarations": [ + { + "constant": false, + "id": 65061, + "mutability": "mutable", + "name": "i", + "nameLocation": "9543:1:100", + "nodeType": "VariableDeclaration", + "scope": 65085, + "src": "9535:9:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65060, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9535:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 65063, + "initialValue": { + "hexValue": "30", + "id": 65062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9547:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "9535:13:100" + }, + "loopExpression": { + "expression": { + "id": 65069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9580:3:100", + "subExpression": { + "id": 65068, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65061, + "src": "9580:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 65070, + "nodeType": "ExpressionStatement", + "src": "9580:3:100" + }, + "nodeType": "ForStatement", + "src": "9530:266:100" + } + ] + } + } + ] + } + } + ] + }, + "baseFunctions": [69830], + "functionSelector": "e37eb96c", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "commitDkg", + "nameLocation": "5754:9:100", + "overrides": { + "id": 64750, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 64749, + "name": "IController", + "nameLocations": ["5813:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "5813:11:100" + } + ], + "src": "5804:21:100" + }, + "parameters": { + "id": 64748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64747, + "mutability": "mutable", + "name": "params", + "nameLocation": "5787:6:100", + "nodeType": "VariableDeclaration", + "scope": 65091, + "src": "5764:29:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_memory_ptr", + "typeString": "struct IController.CommitDkgParams" + }, + "typeName": { + "id": 64746, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 64745, + "name": "CommitDkgParams", + "nameLocations": ["5764:15:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69812, + "src": "5764:15:100" + }, + "referencedDeclaration": 69812, + "src": "5764:15:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CommitDkgParams_$69812_storage_ptr", + "typeString": "struct IController.CommitDkgParams" + } + }, + "visibility": "internal" + } + ], + "src": "5763:31:100" + }, + "returnParameters": { + "id": 64751, + "nodeType": "ParameterList", + "parameters": [], + "src": "5826:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 65294, + "nodeType": "FunctionDefinition", + "src": "9832:2097:100", + "nodes": [], + "body": { + "id": 65293, + "nodeType": "Block", + "src": "9927:2002:100", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 65103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 65100, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "9941:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 65101, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "9955:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65102, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9966:10:100", + "memberName": "groupCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 73030, + "src": "9955:21:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9941:35:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65109, + "nodeType": "IfStatement", + "src": "9937:98:100", + "trueBody": { + "id": 65108, + "nodeType": "Block", + "src": "9978:57:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 65105, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "10013:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 65104, + "name": "GroupNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64479, + "src": "9999:13:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 65106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9999:25:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65107, + "nodeType": "RevertStatement", + "src": "9992:32:100" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 65118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 65112, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "10128:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65113, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10140:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 65114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10144:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "10140:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 65110, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "10093:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10104:23:100", + "memberName": "getMemberIndexByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 73958, + "src": "10093:34:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_address_$returns$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,uint256,address) view returns (int256)" + } + }, + "id": 65115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10093:58:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 65117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10155:2:100", + "subExpression": { + "hexValue": "31", + "id": 65116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10156:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + }, + "src": "10093:64:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65126, + "nodeType": "IfStatement", + "src": "10089:140:100", + "trueBody": { + "id": 65125, + "nodeType": "Block", + "src": "10159:70:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 65120, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "10195:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65121, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10207:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 65122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10211:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "10207:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 65119, + "name": "NodeNotInGroup", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64507, + "src": "10180:14:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) pure" + } + }, + "id": 65123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10180:38:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65124, + "nodeType": "RevertStatement", + "src": "10173:45:100" + } + ] + } + }, + { + "assignments": [65129], + "declarations": [ + { + "constant": false, + "id": 65129, + "mutability": "mutable", + "name": "g", + "nameLocation": "10286:1:100", + "nodeType": "VariableDeclaration", + "scope": 65293, + "src": "10272:15:100", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group" + }, + "typeName": { + "id": 65128, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 65127, + "name": "Group", + "nameLocations": ["10272:5:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69776, + "src": "10272:5:100" + }, + "referencedDeclaration": 69776, + "src": "10272:5:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group" + } + }, + "visibility": "internal" + } + ], + "id": 65134, + "initialValue": { + "baseExpression": { + "expression": { + "id": 65130, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "10290:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10301:6:100", + "memberName": "groups", + "nodeType": "MemberAccess", + "referencedDeclaration": 73035, + "src": "10290:17:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$", + "typeString": "mapping(uint256 => struct IController.Group storage ref)" + } + }, + "id": 65133, + "indexExpression": { + "id": 65132, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "10308:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10290:29:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage", + "typeString": "struct IController.Group storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10272:47:100" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 65138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 65135, + "name": "groupEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65095, + "src": "10333:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 65136, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65129, + "src": "10347:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group storage pointer" + } + }, + "id": 65137, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10349:5:100", + "memberName": "epoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 69754, + "src": "10347:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10333:21:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65147, + "nodeType": "IfStatement", + "src": "10329:105:100", + "trueBody": { + "id": 65146, + "nodeType": "Block", + "src": "10356:78:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 65140, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "10391:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 65141, + "name": "groupEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65095, + "src": "10403:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65142, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65129, + "src": "10415:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group storage pointer" + } + }, + "id": 65143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10417:5:100", + "memberName": "epoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 69754, + "src": "10415:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 65139, + "name": "EpochMismatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64501, + "src": "10377:13:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256) pure" + } + }, + "id": 65144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10377:46:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65145, + "nodeType": "RevertStatement", + "src": "10370:53:100" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 65155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 65148, + "name": "_coordinators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64422, + "src": "10486:13:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 65150, + "indexExpression": { + "id": 65149, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "10500:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10486:25:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 65153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10523:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 65152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10515:7:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 65151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10515:7:100", + "typeDescriptions": {} + } + }, + "id": 65154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10515:10:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "10486:39:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65161, + "nodeType": "IfStatement", + "src": "10482:108:100", + "trueBody": { + "id": 65160, + "nodeType": "Block", + "src": "10527:63:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 65157, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "10568:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 65156, + "name": "CoordinatorNotFound", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64483, + "src": "10548:19:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 65158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10548:31:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65159, + "nodeType": "RevertStatement", + "src": "10541:38:100" + } + ] + } + }, + { + "assignments": [65164], + "declarations": [ + { + "constant": false, + "id": 65164, + "mutability": "mutable", + "name": "coordinator", + "nameLocation": "10660:11:100", + "nodeType": "VariableDeclaration", + "scope": 65293, + "src": "10647:24:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICoordinator_$70169", + "typeString": "contract ICoordinator" + }, + "typeName": { + "id": 65163, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 65162, + "name": "ICoordinator", + "nameLocations": ["10647:12:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 70169, + "src": "10647:12:100" + }, + "referencedDeclaration": 70169, + "src": "10647:12:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICoordinator_$70169", + "typeString": "contract ICoordinator" + } + }, + "visibility": "internal" + } + ], + "id": 65170, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 65166, + "name": "_coordinators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64422, + "src": "10687:13:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 65168, + "indexExpression": { + "id": 65167, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "10701:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10687:25:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 65165, + "name": "ICoordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70169, + "src": "10674:12:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICoordinator_$70169_$", + "typeString": "type(contract ICoordinator)" + } + }, + "id": 65169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10674:39:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICoordinator_$70169", + "typeString": "contract ICoordinator" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10647:66:100" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int8", + "typeString": "int8" + }, + "id": 65176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 65171, + "name": "coordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65164, + "src": "10727:11:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICoordinator_$70169", + "typeString": "contract ICoordinator" + } + }, + "id": 65172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10739:7:100", + "memberName": "inPhase", + "nodeType": "MemberAccess", + "referencedDeclaration": 70151, + "src": "10727:19:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_int8_$", + "typeString": "function () view external returns (int8)" + } + }, + "id": 65173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10727:21:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 65175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10752:2:100", + "subExpression": { + "hexValue": "31", + "id": 65174, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10753:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + }, + "src": "10727:27:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65185, + "nodeType": "IfStatement", + "src": "10723:118:100", + "trueBody": { + "id": 65184, + "nodeType": "Block", + "src": "10756:85:100", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 65178, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "10796:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 65179, + "name": "coordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65164, + "src": "10808:11:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICoordinator_$70169", + "typeString": "contract ICoordinator" + } + }, + "id": 65180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10820:7:100", + "memberName": "inPhase", + "nodeType": "MemberAccess", + "referencedDeclaration": 70151, + "src": "10808:19:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_int8_$", + "typeString": "function () view external returns (int8)" + } + }, + "id": 65181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10808:21:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + ], + "id": 65177, + "name": "DkgStillInProgress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64493, + "src": "10777:18:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$_t_int8_$returns$__$", + "typeString": "function (uint256,int8) pure" + } + }, + "id": 65182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10777:53:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65183, + "nodeType": "RevertStatement", + "src": "10770:60:100" + } + ] + } + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 65186, + "name": "coordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65164, + "src": "10881:11:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICoordinator_$70169", + "typeString": "contract ICoordinator" + } + }, + "id": 65188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10893:12:100", + "memberName": "selfDestruct", + "nodeType": "MemberAccess", + "referencedDeclaration": 70168, + "src": "10881:24:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 65189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10881:26:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65190, + "nodeType": "ExpressionStatement", + "src": "10881:26:100" + }, + { + "expression": { + "id": 65198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 65191, + "name": "_coordinators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64422, + "src": "10947:13:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 65193, + "indexExpression": { + "id": 65192, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "10961:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10947:25:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 65196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10983:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 65195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10975:7:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 65194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10975:7:100", + "typeDescriptions": {} + } + }, + "id": 65197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10975:10:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "10947:38:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65199, + "nodeType": "ExpressionStatement", + "src": "10947:38:100" + }, + { + "condition": { + "id": 65202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "11035:37:100", + "subExpression": { + "expression": { + "id": 65200, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65129, + "src": "11036:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group storage pointer" + } + }, + "id": 65201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11038:34:100", + "memberName": "isStrictlyMajorityConsensusReached", + "nodeType": "MemberAccess", + "referencedDeclaration": 69771, + "src": "11036:36:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65263, + "nodeType": "IfStatement", + "src": "11031:638:100", + "trueBody": { + "id": 65262, + "nodeType": "Block", + "src": "11074:595:100", + "statements": [ + { + "assignments": [65207, 65210], + "declarations": [ + { + "constant": false, + "id": 65207, + "mutability": "mutable", + "name": "nodesToBeSlashed", + "nameLocation": "11106:16:100", + "nodeType": "VariableDeclaration", + "scope": 65262, + "src": "11089:33:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 65205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11089:7:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65206, + "nodeType": "ArrayTypeName", + "src": "11089:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65210, + "mutability": "mutable", + "name": "groupIndicesToEmitEvent", + "nameLocation": "11141:23:100", + "nodeType": "VariableDeclaration", + "scope": 65262, + "src": "11124:40:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 65208, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11124:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 65209, + "nodeType": "ArrayTypeName", + "src": "11124:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "id": 65216, + "initialValue": { + "arguments": [ + { + "id": 65213, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65093, + "src": "11222:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 65214, + "name": "_lastOutput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64427, + "src": "11234:11:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 65211, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "11184:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65212, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11195:26:100", + "memberName": "handleUnsuccessfulGroupDkg", + "nodeType": "MemberAccess", + "referencedDeclaration": 73717, + "src": "11184:37:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,uint256,uint256) returns (address[] memory,uint256[] memory)" + } + }, + "id": 65215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11184:62:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "tuple(address[] memory,uint256[] memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11088:158:100" + }, + { + "body": { + "id": 65241, + "nodeType": "Block", + "src": "11315:194:100", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 65233, + "name": "nodesToBeSlashed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65207, + "src": "11415:16:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 65235, + "indexExpression": { + "id": 65234, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65218, + "src": "11432:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11415:19:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 65236, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "11436:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65237, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11444:29:100", + "memberName": "disqualifiedNodePenaltyAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 64433, + "src": "11436:37:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 65238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11475:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 65229, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "11347:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65230, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11355:27:100", + "memberName": "nodeRegistryContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64429, + "src": "11347:35:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 65228, + "name": "INodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70293, + "src": "11333:13:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_INodeRegistry_$70293_$", + "typeString": "type(contract INodeRegistry)" + } + }, + "id": 65231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11333:50:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_INodeRegistry_$70293", + "typeString": "contract INodeRegistry" + } + }, + "id": 65232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11384:9:100", + "memberName": "slashNode", + "nodeType": "MemberAccess", + "referencedDeclaration": 70245, + "src": "11333:60:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 65239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11333:161:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65240, + "nodeType": "ExpressionStatement", + "src": "11333:161:100" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 65224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 65221, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65218, + "src": "11281:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 65222, + "name": "nodesToBeSlashed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65207, + "src": "11285:16:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 65223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11302:6:100", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "11285:23:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11281:27:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65242, + "initializationExpression": { + "assignments": [65218], + "declarations": [ + { + "constant": false, + "id": 65218, + "mutability": "mutable", + "name": "i", + "nameLocation": "11274:1:100", + "nodeType": "VariableDeclaration", + "scope": 65242, + "src": "11266:9:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11266:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 65220, + "initialValue": { + "hexValue": "30", + "id": 65219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11278:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "11266:13:100" + }, + "loopExpression": { + "expression": { + "id": 65226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "11310:3:100", + "subExpression": { + "id": 65225, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65218, + "src": "11310:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 65227, + "nodeType": "ExpressionStatement", + "src": "11310:3:100" + }, + "nodeType": "ForStatement", + "src": "11261:248:100" + }, + { + "body": { + "id": 65260, + "nodeType": "Block", + "src": "11583:76:100", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 65255, + "name": "groupIndicesToEmitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65210, + "src": "11617:23:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 65257, + "indexExpression": { + "id": 65256, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65244, + "src": "11641:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11617:26:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 65254, + "name": "_emitGroupEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65743, + "src": "11601:15:100", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 65258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11601:43:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65259, + "nodeType": "ExpressionStatement", + "src": "11601:43:100" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 65250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 65247, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65244, + "src": "11542:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 65248, + "name": "groupIndicesToEmitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65210, + "src": "11546:23:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 65249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11570:6:100", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "11546:30:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11542:34:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65261, + "initializationExpression": { + "assignments": [65244], + "declarations": [ + { + "constant": false, + "id": 65244, + "mutability": "mutable", + "name": "i", + "nameLocation": "11535:1:100", + "nodeType": "VariableDeclaration", + "scope": 65261, + "src": "11527:9:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65243, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11527:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 65246, + "initialValue": { + "hexValue": "30", + "id": 65245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11539:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "11527:13:100" + }, + "loopExpression": { + "expression": { + "id": 65252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "11578:3:100", + "subExpression": { + "id": 65251, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65244, + "src": "11578:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 65253, + "nodeType": "ExpressionStatement", + "src": "11578:3:100" + }, + "nodeType": "ForStatement", + "src": "11522:137:100" + } + ] + } + }, + { + "assignments": [65268], + "declarations": [ + { + "constant": false, + "id": 65268, + "mutability": "mutable", + "name": "nodeAddress", + "nameLocation": "11739:11:100", + "nodeType": "VariableDeclaration", + "scope": 65293, + "src": "11722:28:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 65266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11722:7:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65267, + "nodeType": "ArrayTypeName", + "src": "11722:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 65274, + "initialValue": { + "arguments": [ + { + "hexValue": "31", + "id": 65272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11767:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 65271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "11753:13:100", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 65269, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11757:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65270, + "nodeType": "ArrayTypeName", + "src": "11757:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 65273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11753:16:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11722:47:100" + }, + { + "expression": { + "id": 65280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 65275, + "name": "nodeAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65268, + "src": "11779:11:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 65277, + "indexExpression": { + "hexValue": "30", + "id": 65276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11791:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11779:14:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 65278, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11796:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 65279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11800:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "11796:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "11779:27:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65281, + "nodeType": "ExpressionStatement", + "src": "11779:27:100" + }, + { + "expression": { + "arguments": [ + { + "id": 65287, + "name": "nodeAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65268, + "src": "11877:11:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "hexValue": "30", + "id": 65288, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11890:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "id": 65289, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "11893:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65290, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11901:20:100", + "memberName": "dkgPostProcessReward", + "nodeType": "MemberAccess", + "referencedDeclaration": 64437, + "src": "11893:28:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 65283, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "11830:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65284, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11838:27:100", + "memberName": "nodeRegistryContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64429, + "src": "11830:35:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 65282, + "name": "INodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70293, + "src": "11816:13:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_INodeRegistry_$70293_$", + "typeString": "type(contract INodeRegistry)" + } + }, + "id": 65285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11816:50:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_INodeRegistry_$70293", + "typeString": "contract INodeRegistry" + } + }, + "id": 65286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11867:9:100", + "memberName": "addReward", + "nodeType": "MemberAccess", + "referencedDeclaration": 70255, + "src": "11816:60:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256,uint256) external" + } + }, + "id": 65291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11816:106:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65292, + "nodeType": "ExpressionStatement", + "src": "11816:106:100" + } + ] + }, + "baseFunctions": [69837], + "functionSelector": "0bf9c5c6", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "postProcessDkg", + "nameLocation": "9841:14:100", + "overrides": { + "id": 65098, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65097, + "name": "IController", + "nameLocations": ["9914:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "9914:11:100" + } + ], + "src": "9905:21:100" + }, + "parameters": { + "id": 65096, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65093, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "9864:10:100", + "nodeType": "VariableDeclaration", + "scope": 65294, + "src": "9856:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65092, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9856:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65095, + "mutability": "mutable", + "name": "groupEpoch", + "nameLocation": "9884:10:100", + "nodeType": "VariableDeclaration", + "scope": 65294, + "src": "9876:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65094, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9876:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9855:40:100" + }, + "returnParameters": { + "id": 65099, + "nodeType": "ParameterList", + "parameters": [], + "src": "9927:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 65316, + "nodeType": "FunctionDefinition", + "src": "11935:224:100", + "nodes": [], + "body": { + "id": 65315, + "nodeType": "Block", + "src": "12009:150:100", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 65305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 65301, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12023:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 65302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12027:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12023:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 65303, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "12037:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65304, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12045:22:100", + "memberName": "adapterContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64431, + "src": "12037:30:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12023:44:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65310, + "nodeType": "IfStatement", + "src": "12019:100:100", + "trueBody": { + "id": 65309, + "nodeType": "Block", + "src": "12069:50:100", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 65306, + "name": "SenderNotAdapter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64515, + "src": "12090:16:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 65307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12090:18:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65308, + "nodeType": "RevertStatement", + "src": "12083:25:100" + } + ] + } + }, + { + "expression": { + "id": 65313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 65311, + "name": "_lastOutput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64427, + "src": "12128:11:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 65312, + "name": "lastOutput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65296, + "src": "12142:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12128:24:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 65314, + "nodeType": "ExpressionStatement", + "src": "12128:24:100" + } + ] + }, + "baseFunctions": [69859], + "functionSelector": "f3df0802", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setLastOutput", + "nameLocation": "11944:13:100", + "overrides": { + "id": 65299, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65298, + "name": "IController", + "nameLocations": ["11996:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "11996:11:100" + } + ], + "src": "11987:21:100" + }, + "parameters": { + "id": 65297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65296, + "mutability": "mutable", + "name": "lastOutput", + "nameLocation": "11966:10:100", + "nodeType": "VariableDeclaration", + "scope": 65316, + "src": "11958:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11958:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11957:20:100" + }, + "returnParameters": { + "id": 65300, + "nodeType": "ParameterList", + "parameters": [], + "src": "12009:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 65349, + "nodeType": "FunctionDefinition", + "src": "12165:330:100", + "nodes": [], + "body": { + "id": 65348, + "nodeType": "Block", + "src": "12278:217:100", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 65332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 65328, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12292:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 65329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12296:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12292:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 65330, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "12306:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65331, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12314:22:100", + "memberName": "adapterContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64431, + "src": "12306:30:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12292:44:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65337, + "nodeType": "IfStatement", + "src": "12288:100:100", + "trueBody": { + "id": 65336, + "nodeType": "Block", + "src": "12338:50:100", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 65333, + "name": "SenderNotAdapter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64515, + "src": "12359:16:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 65334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12359:18:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65335, + "nodeType": "RevertStatement", + "src": "12352:25:100" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 65343, + "name": "nodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65319, + "src": "12459:5:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 65344, + "name": "ethAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65321, + "src": "12466:9:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 65345, + "name": "arpaAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65323, + "src": "12477:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 65339, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "12412:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65340, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12420:27:100", + "memberName": "nodeRegistryContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64429, + "src": "12412:35:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 65338, + "name": "INodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70293, + "src": "12398:13:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_INodeRegistry_$70293_$", + "typeString": "type(contract INodeRegistry)" + } + }, + "id": 65341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12398:50:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_INodeRegistry_$70293", + "typeString": "contract INodeRegistry" + } + }, + "id": 65342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12449:9:100", + "memberName": "addReward", + "nodeType": "MemberAccess", + "referencedDeclaration": 70255, + "src": "12398:60:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256,uint256) external" + } + }, + "id": 65346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12398:90:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65347, + "nodeType": "ExpressionStatement", + "src": "12398:90:100" + } + ] + }, + "baseFunctions": [69854], + "functionSelector": "914eb34d", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addReward", + "nameLocation": "12174:9:100", + "overrides": { + "id": 65326, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65325, + "name": "IController", + "nameLocations": ["12265:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "12265:11:100" + } + ], + "src": "12256:21:100" + }, + "parameters": { + "id": 65324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65319, + "mutability": "mutable", + "name": "nodes", + "nameLocation": "12201:5:100", + "nodeType": "VariableDeclaration", + "scope": 65349, + "src": "12184:22:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 65317, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12184:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65318, + "nodeType": "ArrayTypeName", + "src": "12184:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65321, + "mutability": "mutable", + "name": "ethAmount", + "nameLocation": "12216:9:100", + "nodeType": "VariableDeclaration", + "scope": 65349, + "src": "12208:17:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65320, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12208:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65323, + "mutability": "mutable", + "name": "arpaAmount", + "nameLocation": "12235:10:100", + "nodeType": "VariableDeclaration", + "scope": 65349, + "src": "12227:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12227:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12183:63:100" + }, + "returnParameters": { + "id": 65327, + "nodeType": "ParameterList", + "parameters": [], + "src": "12278:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 65378, + "nodeType": "FunctionDefinition", + "src": "12501:308:100", + "nodes": [], + "body": { + "id": 65377, + "nodeType": "Block", + "src": "12595:214:100", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 65362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 65358, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12609:3:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 65359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12613:6:100", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12609:10:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 65360, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "12623:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12631:27:100", + "memberName": "nodeRegistryContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64429, + "src": "12623:35:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12609:49:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65367, + "nodeType": "IfStatement", + "src": "12605:110:100", + "trueBody": { + "id": 65366, + "nodeType": "Block", + "src": "12660:55:100", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 65363, + "name": "SenderNotNodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64517, + "src": "12681:21:100", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 65364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12681:23:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65365, + "nodeType": "RevertStatement", + "src": "12674:30:100" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 65373, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65351, + "src": "12781:9:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 65374, + "name": "ethAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65353, + "src": "12792:9:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 65369, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "12733:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65370, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12741:22:100", + "memberName": "adapterContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64431, + "src": "12733:30:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 65368, + "name": "IAdapter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69592, + "src": "12724:8:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IAdapter_$69592_$", + "typeString": "type(contract IAdapter)" + } + }, + "id": 65371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12724:40:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAdapter_$69592", + "typeString": "contract IAdapter" + } + }, + "id": 65372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12765:15:100", + "memberName": "nodeWithdrawETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 69372, + "src": "12724:56:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 65375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12724:78:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65376, + "nodeType": "ExpressionStatement", + "src": "12724:78:100" + } + ] + }, + "baseFunctions": [69844], + "functionSelector": "0ad98f6a", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "nodeWithdrawETH", + "nameLocation": "12510:15:100", + "overrides": { + "id": 65356, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65355, + "name": "IController", + "nameLocations": ["12582:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "12582:11:100" + } + ], + "src": "12573:21:100" + }, + "parameters": { + "id": 65354, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65351, + "mutability": "mutable", + "name": "recipient", + "nameLocation": "12534:9:100", + "nodeType": "VariableDeclaration", + "scope": 65378, + "src": "12526:17:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 65350, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12526:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65353, + "mutability": "mutable", + "name": "ethAmount", + "nameLocation": "12553:9:100", + "nodeType": "VariableDeclaration", + "scope": 65378, + "src": "12545:17:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65352, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12545:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12525:38:100" + }, + "returnParameters": { + "id": 65357, + "nodeType": "ParameterList", + "parameters": [], + "src": "12595:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 65416, + "nodeType": "FunctionDefinition", + "src": "12815:849:100", + "nodes": [], + "body": { + "id": 65415, + "nodeType": "Block", + "src": "13264:400:100", + "nodes": [], + "statements": [ + { + "expression": { + "components": [ + { + "expression": { + "id": 65397, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "13295:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65398, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13303:27:100", + "memberName": "nodeRegistryContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64429, + "src": "13295:35:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 65399, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "13344:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65400, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13352:22:100", + "memberName": "adapterContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64431, + "src": "13344:30:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 65401, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "13388:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65402, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13396:29:100", + "memberName": "disqualifiedNodePenaltyAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 64433, + "src": "13388:37:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65403, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "13439:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65404, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13450:25:100", + "memberName": "defaultNumberOfCommitters", + "nodeType": "MemberAccess", + "referencedDeclaration": 73041, + "src": "13439:36:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65405, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "13489:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65406, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13497:23:100", + "memberName": "defaultDkgPhaseDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 64435, + "src": "13489:31:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65407, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "13534:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65408, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13545:16:100", + "memberName": "groupMaxCapacity", + "nodeType": "MemberAccess", + "referencedDeclaration": 73039, + "src": "13534:27:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65409, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "13575:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65410, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13586:19:100", + "memberName": "idealNumberOfGroups", + "nodeType": "MemberAccess", + "referencedDeclaration": 73037, + "src": "13575:30:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65411, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "13619:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65412, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13627:20:100", + "memberName": "dkgPostProcessReward", + "nodeType": "MemberAccess", + "referencedDeclaration": 64437, + "src": "13619:28:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 65413, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13281:376:100", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(address,address,uint256,uint256,uint256,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 65396, + "id": 65414, + "nodeType": "Return", + "src": "13274:383:100" + } + ] + }, + "baseFunctions": [69878], + "functionSelector": "d11b8e68", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getControllerConfig", + "nameLocation": "12824:19:100", + "parameters": { + "id": 65379, + "nodeType": "ParameterList", + "parameters": [], + "src": "12843:2:100" + }, + "returnParameters": { + "id": 65396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65381, + "mutability": "mutable", + "name": "nodeRegistryContractAddress", + "nameLocation": "12914:27:100", + "nodeType": "VariableDeclaration", + "scope": 65416, + "src": "12906:35:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 65380, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12906:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65383, + "mutability": "mutable", + "name": "adapterContractAddress", + "nameLocation": "12963:22:100", + "nodeType": "VariableDeclaration", + "scope": 65416, + "src": "12955:30:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 65382, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12955:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65385, + "mutability": "mutable", + "name": "disqualifiedNodePenaltyAmount", + "nameLocation": "13007:29:100", + "nodeType": "VariableDeclaration", + "scope": 65416, + "src": "12999:37:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65384, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12999:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65387, + "mutability": "mutable", + "name": "defaultNumberOfCommitters", + "nameLocation": "13058:25:100", + "nodeType": "VariableDeclaration", + "scope": 65416, + "src": "13050:33:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65386, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13050:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65389, + "mutability": "mutable", + "name": "defaultDkgPhaseDuration", + "nameLocation": "13105:23:100", + "nodeType": "VariableDeclaration", + "scope": 65416, + "src": "13097:31:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65388, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13097:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65391, + "mutability": "mutable", + "name": "groupMaxCapacity", + "nameLocation": "13150:16:100", + "nodeType": "VariableDeclaration", + "scope": 65416, + "src": "13142:24:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65390, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13142:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65393, + "mutability": "mutable", + "name": "idealNumberOfGroups", + "nameLocation": "13188:19:100", + "nodeType": "VariableDeclaration", + "scope": 65416, + "src": "13180:27:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65392, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13180:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65395, + "mutability": "mutable", + "name": "dkgPostProcessReward", + "nameLocation": "13229:20:100", + "nodeType": "VariableDeclaration", + "scope": 65416, + "src": "13221:28:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65394, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13221:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12892:367:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 65429, + "nodeType": "FunctionDefinition", + "src": "13670:150:100", + "nodes": [], + "body": { + "id": 65428, + "nodeType": "Block", + "src": "13763:57:100", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 65424, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "13780:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13791:20:100", + "memberName": "getValidGroupIndices", + "nodeType": "MemberAccess", + "referencedDeclaration": 74026, + "src": "13780:31:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer) view returns (uint256[] memory)" + } + }, + "id": 65426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13780:33:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 65423, + "id": 65427, + "nodeType": "Return", + "src": "13773:40:100" + } + ] + }, + "baseFunctions": [69885], + "functionSelector": "b330a0fd", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getValidGroupIndices", + "nameLocation": "13679:20:100", + "overrides": { + "id": 65419, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65418, + "name": "IController", + "nameLocations": ["13723:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "13723:11:100" + } + ], + "src": "13714:21:100" + }, + "parameters": { + "id": 65417, + "nodeType": "ParameterList", + "parameters": [], + "src": "13699:2:100" + }, + "returnParameters": { + "id": 65423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65422, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65429, + "src": "13745:16:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 65420, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13745:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 65421, + "nodeType": "ArrayTypeName", + "src": "13745:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "13744:18:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 65438, + "nodeType": "FunctionDefinition", + "src": "13826:97:100", + "nodes": [], + "body": { + "id": 65437, + "nodeType": "Block", + "src": "13883:40:100", + "nodes": [], + "statements": [ + { + "expression": { + "expression": { + "id": 65434, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "13900:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65435, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13911:5:100", + "memberName": "epoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 73028, + "src": "13900:16:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 65433, + "id": 65436, + "nodeType": "Return", + "src": "13893:23:100" + } + ] + }, + "baseFunctions": [69890], + "functionSelector": "7ee49cfd", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getGroupEpoch", + "nameLocation": "13835:13:100", + "parameters": { + "id": 65430, + "nodeType": "ParameterList", + "parameters": [], + "src": "13848:2:100" + }, + "returnParameters": { + "id": 65433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65432, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65438, + "src": "13874:7:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13874:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13873:9:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 65449, + "nodeType": "FunctionDefinition", + "src": "13929:124:100", + "nodes": [], + "body": { + "id": 65448, + "nodeType": "Block", + "src": "14008:45:100", + "nodes": [], + "statements": [ + { + "expression": { + "expression": { + "id": 65445, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "14025:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65446, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14036:10:100", + "memberName": "groupCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 73030, + "src": "14025:21:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 65444, + "id": 65447, + "nodeType": "Return", + "src": "14018:28:100" + } + ] + }, + "baseFunctions": [69895], + "functionSelector": "06545a93", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getGroupCount", + "nameLocation": "13938:13:100", + "overrides": { + "id": 65441, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65440, + "name": "IController", + "nameLocations": ["13977:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "13977:11:100" + } + ], + "src": "13968:21:100" + }, + "parameters": { + "id": 65439, + "nodeType": "ParameterList", + "parameters": [], + "src": "13951:2:100" + }, + "returnParameters": { + "id": 65444, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65443, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65449, + "src": "13999:7:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65442, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13999:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13998:9:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 65465, + "nodeType": "FunctionDefinition", + "src": "14059:148:100", + "nodes": [], + "body": { + "id": 65464, + "nodeType": "Block", + "src": "14154:53:100", + "nodes": [], + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "id": 65459, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "14171:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65460, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14182:6:100", + "memberName": "groups", + "nodeType": "MemberAccess", + "referencedDeclaration": 73035, + "src": "14171:17:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$", + "typeString": "mapping(uint256 => struct IController.Group storage ref)" + } + }, + "id": 65462, + "indexExpression": { + "id": 65461, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65451, + "src": "14189:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14171:29:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage", + "typeString": "struct IController.Group storage ref" + } + }, + "functionReturnParameters": 65458, + "id": 65463, + "nodeType": "Return", + "src": "14164:36:100" + } + ] + }, + "baseFunctions": [69903], + "functionSelector": "ceb60654", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getGroup", + "nameLocation": "14068:8:100", + "overrides": { + "id": 65454, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65453, + "name": "IController", + "nameLocations": ["14118:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "14118:11:100" + } + ], + "src": "14109:21:100" + }, + "parameters": { + "id": 65452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65451, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "14085:10:100", + "nodeType": "VariableDeclaration", + "scope": 65465, + "src": "14077:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14077:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14076:20:100" + }, + "returnParameters": { + "id": 65458, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65457, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65465, + "src": "14140:12:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group" + }, + "typeName": { + "id": 65456, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 65455, + "name": "Group", + "nameLocations": ["14140:5:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69776, + "src": "14140:5:100" + }, + "referencedDeclaration": 69776, + "src": "14140:5:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group" + } + }, + "visibility": "internal" + } + ], + "src": "14139:14:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 65489, + "nodeType": "FunctionDefinition", + "src": "14213:209:100", + "nodes": [], + "body": { + "id": 65488, + "nodeType": "Block", + "src": "14321:101:100", + "nodes": [], + "statements": [ + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "expression": { + "id": 65476, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "14339:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65477, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14350:6:100", + "memberName": "groups", + "nodeType": "MemberAccess", + "referencedDeclaration": 73035, + "src": "14339:17:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$", + "typeString": "mapping(uint256 => struct IController.Group storage ref)" + } + }, + "id": 65479, + "indexExpression": { + "id": 65478, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65467, + "src": "14357:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14339:29:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage", + "typeString": "struct IController.Group storage ref" + } + }, + "id": 65480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14369:9:100", + "memberName": "threshold", + "nodeType": "MemberAccess", + "referencedDeclaration": 69758, + "src": "14339:39:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 65481, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "14380:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65482, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14391:6:100", + "memberName": "groups", + "nodeType": "MemberAccess", + "referencedDeclaration": 73035, + "src": "14380:17:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$", + "typeString": "mapping(uint256 => struct IController.Group storage ref)" + } + }, + "id": 65484, + "indexExpression": { + "id": 65483, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65467, + "src": "14398:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14380:29:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage", + "typeString": "struct IController.Group storage ref" + } + }, + "id": 65485, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14410:4:100", + "memberName": "size", + "nodeType": "MemberAccess", + "referencedDeclaration": 69756, + "src": "14380:34:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 65486, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14338:77:100", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 65475, + "id": 65487, + "nodeType": "Return", + "src": "14331:84:100" + } + ] + }, + "baseFunctions": [69912], + "functionSelector": "f49e0ba9", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getGroupThreshold", + "nameLocation": "14222:17:100", + "overrides": { + "id": 65470, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65469, + "name": "IController", + "nameLocations": ["14281:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "14281:11:100" + } + ], + "src": "14272:21:100" + }, + "parameters": { + "id": 65468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65467, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "14248:10:100", + "nodeType": "VariableDeclaration", + "scope": 65489, + "src": "14240:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65466, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14240:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14239:20:100" + }, + "returnParameters": { + "id": 65475, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65472, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65489, + "src": "14303:7:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14303:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65474, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65489, + "src": "14312:7:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65473, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14312:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14302:18:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 65510, + "nodeType": "FunctionDefinition", + "src": "14428:228:100", + "nodes": [], + "body": { + "id": 65509, + "nodeType": "Block", + "src": "14582:74:100", + "nodes": [], + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "baseExpression": { + "expression": { + "id": 65501, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "14599:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65502, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14610:6:100", + "memberName": "groups", + "nodeType": "MemberAccess", + "referencedDeclaration": 73035, + "src": "14599:17:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$", + "typeString": "mapping(uint256 => struct IController.Group storage ref)" + } + }, + "id": 65504, + "indexExpression": { + "id": 65503, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65491, + "src": "14617:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14599:29:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage", + "typeString": "struct IController.Group storage ref" + } + }, + "id": 65505, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14629:7:100", + "memberName": "members", + "nodeType": "MemberAccess", + "referencedDeclaration": 69762, + "src": "14599:37:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Member_$69783_storage_$dyn_storage", + "typeString": "struct IController.Member storage ref[] storage ref" + } + }, + "id": 65507, + "indexExpression": { + "id": 65506, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65493, + "src": "14637:11:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14599:50:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$69783_storage", + "typeString": "struct IController.Member storage ref" + } + }, + "functionReturnParameters": 65500, + "id": 65508, + "nodeType": "Return", + "src": "14592:57:100" + } + ] + }, + "baseFunctions": [69922], + "functionSelector": "4d79a893", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMember", + "nameLocation": "14437:9:100", + "overrides": { + "id": 65496, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65495, + "name": "IController", + "nameLocations": ["14533:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "14533:11:100" + } + ], + "src": "14524:21:100" + }, + "parameters": { + "id": 65494, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65491, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "14455:10:100", + "nodeType": "VariableDeclaration", + "scope": 65510, + "src": "14447:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65490, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14447:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65493, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "14475:11:100", + "nodeType": "VariableDeclaration", + "scope": 65510, + "src": "14467:19:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65492, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14467:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14446:41:100" + }, + "returnParameters": { + "id": 65500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65499, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65510, + "src": "14563:13:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$69783_memory_ptr", + "typeString": "struct IController.Member" + }, + "typeName": { + "id": 65498, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 65497, + "name": "Member", + "nameLocations": ["14563:6:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69783, + "src": "14563:6:100" + }, + "referencedDeclaration": 69783, + "src": "14563:6:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$69783_storage_ptr", + "typeString": "struct IController.Member" + } + }, + "visibility": "internal" + } + ], + "src": "14562:15:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 65527, + "nodeType": "FunctionDefinition", + "src": "14662:189:100", + "nodes": [], + "body": { + "id": 65526, + "nodeType": "Block", + "src": "14771:80:100", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 65523, + "name": "nodeAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65512, + "src": "14832:11:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 65521, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "14788:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65522, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14799:32:100", + "memberName": "getBelongingGroupByMemberAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 73904, + "src": "14788:43:100", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_view$_t_struct$_GroupData_$73042_storage_ptr_$_t_address_$returns$_t_int256_$_t_int256_$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,address) view returns (int256,int256)" + } + }, + "id": 65524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14788:56:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$", + "typeString": "tuple(int256,int256)" + } + }, + "functionReturnParameters": 65520, + "id": 65525, + "nodeType": "Return", + "src": "14781:63:100" + } + ] + }, + "baseFunctions": [69932], + "functionSelector": "3b6c00b0", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBelongingGroup", + "nameLocation": "14671:17:100", + "overrides": { + "id": 65515, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65514, + "name": "IController", + "nameLocations": ["14733:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "14733:11:100" + } + ], + "src": "14724:21:100" + }, + "parameters": { + "id": 65513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65512, + "mutability": "mutable", + "name": "nodeAddress", + "nameLocation": "14697:11:100", + "nodeType": "VariableDeclaration", + "scope": 65527, + "src": "14689:19:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 65511, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14689:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14688:21:100" + }, + "returnParameters": { + "id": 65520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65517, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65527, + "src": "14755:6:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 65516, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "14755:6:100", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65519, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65527, + "src": "14763:6:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 65518, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "14763:6:100", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "14754:16:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 65541, + "nodeType": "FunctionDefinition", + "src": "14857:145:100", + "nodes": [], + "body": { + "id": 65540, + "nodeType": "Block", + "src": "14953:49:100", + "nodes": [], + "statements": [ + { + "expression": { + "baseExpression": { + "id": 65536, + "name": "_coordinators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64422, + "src": "14970:13:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 65538, + "indexExpression": { + "id": 65537, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65529, + "src": "14984:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14970:25:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 65535, + "id": 65539, + "nodeType": "Return", + "src": "14963:32:100" + } + ] + }, + "baseFunctions": [69939], + "functionSelector": "42424d6f", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCoordinator", + "nameLocation": "14866:14:100", + "overrides": { + "id": 65532, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65531, + "name": "IController", + "nameLocations": ["14922:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "14922:11:100" + } + ], + "src": "14913:21:100" + }, + "parameters": { + "id": 65530, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65529, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "14889:10:100", + "nodeType": "VariableDeclaration", + "scope": 65541, + "src": "14881:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65528, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14881:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14880:20:100" + }, + "returnParameters": { + "id": 65535, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65534, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65541, + "src": "14944:7:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 65533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14944:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14943:9:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 65549, + "nodeType": "FunctionDefinition", + "src": "15008:92:100", + "nodes": [], + "body": { + "id": 65548, + "nodeType": "Block", + "src": "15065:35:100", + "nodes": [], + "statements": [ + { + "expression": { + "id": 65546, + "name": "_lastOutput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64427, + "src": "15082:11:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 65545, + "id": 65547, + "nodeType": "Return", + "src": "15075:18:100" + } + ] + }, + "baseFunctions": [69944], + "functionSelector": "51a2b9a0", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLastOutput", + "nameLocation": "15017:13:100", + "parameters": { + "id": 65542, + "nodeType": "ParameterList", + "parameters": [], + "src": "15030:2:100" + }, + "returnParameters": { + "id": 65545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65549, + "src": "15056:7:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15056:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15055:9:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 65605, + "nodeType": "FunctionDefinition", + "src": "15192:451:100", + "nodes": [], + "body": { + "id": 65604, + "nodeType": "Block", + "src": "15352:291:100", + "nodes": [], + "statements": [ + { + "assignments": [65563], + "declarations": [ + { + "constant": false, + "id": 65563, + "mutability": "mutable", + "name": "g", + "nameLocation": "15375:1:100", + "nodeType": "VariableDeclaration", + "scope": 65604, + "src": "15362:14:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group" + }, + "typeName": { + "id": 65562, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 65561, + "name": "Group", + "nameLocations": ["15362:5:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69776, + "src": "15362:5:100" + }, + "referencedDeclaration": 69776, + "src": "15362:5:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group" + } + }, + "visibility": "internal" + } + ], + "id": 65568, + "initialValue": { + "baseExpression": { + "expression": { + "id": 65564, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "15379:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65565, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15390:6:100", + "memberName": "groups", + "nodeType": "MemberAccess", + "referencedDeclaration": 73035, + "src": "15379:17:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$", + "typeString": "mapping(uint256 => struct IController.Group storage ref)" + } + }, + "id": 65567, + "indexExpression": { + "id": 65566, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65552, + "src": "15397:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15379:29:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage", + "typeString": "struct IController.Group storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15362:46:100" + }, + { + "body": { + "id": 65600, + "nodeType": "Block", + "src": "15465:150:100", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 65587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "expression": { + "id": 65581, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65563, + "src": "15483:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65582, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15485:7:100", + "memberName": "members", + "nodeType": "MemberAccess", + "referencedDeclaration": 69762, + "src": "15483:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Member_$69783_memory_ptr_$dyn_memory_ptr", + "typeString": "struct IController.Member memory[] memory" + } + }, + "id": 65584, + "indexExpression": { + "id": 65583, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65570, + "src": "15493:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15483:12:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$69783_memory_ptr", + "typeString": "struct IController.Member memory" + } + }, + "id": 65585, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15496:13:100", + "memberName": "nodeIdAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 69778, + "src": "15483:26:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 65586, + "name": "nodeIdAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65554, + "src": "15513:13:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "15483:43:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65599, + "nodeType": "IfStatement", + "src": "15479:126:100", + "trueBody": { + "id": 65598, + "nodeType": "Block", + "src": "15528:77:100", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 65596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "baseExpression": { + "expression": { + "id": 65588, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65563, + "src": "15553:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65589, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15555:7:100", + "memberName": "members", + "nodeType": "MemberAccess", + "referencedDeclaration": 69762, + "src": "15553:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Member_$69783_memory_ptr_$dyn_memory_ptr", + "typeString": "struct IController.Member memory[] memory" + } + }, + "id": 65591, + "indexExpression": { + "id": 65590, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65570, + "src": "15563:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15553:12:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$69783_memory_ptr", + "typeString": "struct IController.Member memory" + } + }, + "id": 65592, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15566:16:100", + "memberName": "partialPublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 69782, + "src": "15553:29:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", + "typeString": "uint256[4] memory" + } + }, + "id": 65594, + "indexExpression": { + "hexValue": "30", + "id": 65593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15583:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15553:32:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 65595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15589:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15553:37:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 65560, + "id": 65597, + "nodeType": "Return", + "src": "15546:44:100" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 65577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 65573, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65570, + "src": "15438:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "expression": { + "id": 65574, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65563, + "src": "15442:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65575, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15444:7:100", + "memberName": "members", + "nodeType": "MemberAccess", + "referencedDeclaration": 69762, + "src": "15442:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Member_$69783_memory_ptr_$dyn_memory_ptr", + "typeString": "struct IController.Member memory[] memory" + } + }, + "id": 65576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15452:6:100", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "15442:16:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15438:20:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65601, + "initializationExpression": { + "assignments": [65570], + "declarations": [ + { + "constant": false, + "id": 65570, + "mutability": "mutable", + "name": "i", + "nameLocation": "15431:1:100", + "nodeType": "VariableDeclaration", + "scope": 65601, + "src": "15423:9:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65569, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15423:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 65572, + "initialValue": { + "hexValue": "30", + "id": 65571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15435:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "15423:13:100" + }, + "loopExpression": { + "expression": { + "id": 65579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "15460:3:100", + "subExpression": { + "id": 65578, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65570, + "src": "15460:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 65580, + "nodeType": "ExpressionStatement", + "src": "15460:3:100" + }, + "nodeType": "ForStatement", + "src": "15418:197:100" + }, + { + "expression": { + "hexValue": "66616c7365", + "id": 65602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15631:5:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 65560, + "id": 65603, + "nodeType": "Return", + "src": "15624:12:100" + } + ] + }, + "baseFunctions": [69954], + "documentation": { + "id": 65550, + "nodeType": "StructuredDocumentation", + "src": "15106:81:100", + "text": "Check to see if a group has a partial public key registered for a given node." + }, + "functionSelector": "c2db900b", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isPartialKeyRegistered", + "nameLocation": "15201:22:100", + "overrides": { + "id": 65557, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 65556, + "name": "IController", + "nameLocations": ["15312:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "15312:11:100" + } + ], + "src": "15303:21:100" + }, + "parameters": { + "id": 65555, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65552, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "15232:10:100", + "nodeType": "VariableDeclaration", + "scope": 65605, + "src": "15224:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65551, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15224:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65554, + "mutability": "mutable", + "name": "nodeIdAddress", + "nameLocation": "15252:13:100", + "nodeType": "VariableDeclaration", + "scope": 65605, + "src": "15244:21:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 65553, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15244:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "15223:43:100" + }, + "returnParameters": { + "id": 65560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65559, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 65605, + "src": "15342:4:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 65558, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "15342:4:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "15341:6:100" + }, + "scope": 65744, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 65743, + "nodeType": "FunctionDefinition", + "src": "15708:1110:100", + "nodes": [], + "body": { + "id": 65742, + "nodeType": "Block", + "src": "15762:1056:100", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 65613, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65607, + "src": "15801:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 65610, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "15772:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15783:17:100", + "memberName": "prepareGroupEvent", + "nodeType": "MemberAccess", + "referencedDeclaration": 73851, + "src": "15772:28:100", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_GroupData_$73042_storage_ptr_$_t_uint256_$returns$__$attached_to$_t_struct$_GroupData_$73042_storage_ptr_$", + "typeString": "function (struct GroupLib.GroupData storage pointer,uint256)" + } + }, + "id": 65614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15772:40:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65615, + "nodeType": "ExpressionStatement", + "src": "15772:40:100" + }, + { + "assignments": [65618], + "declarations": [ + { + "constant": false, + "id": 65618, + "mutability": "mutable", + "name": "g", + "nameLocation": "15836:1:100", + "nodeType": "VariableDeclaration", + "scope": 65742, + "src": "15823:14:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group" + }, + "typeName": { + "id": 65617, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 65616, + "name": "Group", + "nameLocations": ["15823:5:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69776, + "src": "15823:5:100" + }, + "referencedDeclaration": 69776, + "src": "15823:5:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage_ptr", + "typeString": "struct IController.Group" + } + }, + "visibility": "internal" + } + ], + "id": 65623, + "initialValue": { + "baseExpression": { + "expression": { + "id": 65619, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "15840:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65620, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15851:6:100", + "memberName": "groups", + "nodeType": "MemberAccess", + "referencedDeclaration": 73035, + "src": "15840:17:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Group_$69776_storage_$", + "typeString": "mapping(uint256 => struct IController.Group storage ref)" + } + }, + "id": 65622, + "indexExpression": { + "id": 65621, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65607, + "src": "15858:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15840:29:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_storage", + "typeString": "struct IController.Group storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15823:46:100" + }, + { + "assignments": [65626], + "declarations": [ + { + "constant": false, + "id": 65626, + "mutability": "mutable", + "name": "coordinator", + "nameLocation": "15951:11:100", + "nodeType": "VariableDeclaration", + "scope": 65742, + "src": "15939:23:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + }, + "typeName": { + "id": 65625, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 65624, + "name": "Coordinator", + "nameLocations": ["15939:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 67636, + "src": "15939:11:100" + }, + "referencedDeclaration": 67636, + "src": "15939:11:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + } + }, + "visibility": "internal" + } + ], + "id": 65627, + "nodeType": "VariableDeclarationStatement", + "src": "15939:23:100" + }, + { + "expression": { + "id": 65637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 65628, + "name": "coordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65626, + "src": "15972:11:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 65632, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65618, + "src": "16002:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65633, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16004:9:100", + "memberName": "threshold", + "nodeType": "MemberAccess", + "referencedDeclaration": 69758, + "src": "16002:11:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65634, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "16015:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65635, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16023:23:100", + "memberName": "defaultDkgPhaseDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 64435, + "src": "16015:31:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 65631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "15986:15:100", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_Coordinator_$67636_$", + "typeString": "function (uint256,uint256) returns (contract Coordinator)" + }, + "typeName": { + "id": 65630, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 65629, + "name": "Coordinator", + "nameLocations": ["15990:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 67636, + "src": "15990:11:100" + }, + "referencedDeclaration": 67636, + "src": "15990:11:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + } + } + }, + "id": 65636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15986:61:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + } + }, + "src": "15972:75:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + } + }, + "id": 65638, + "nodeType": "ExpressionStatement", + "src": "15972:75:100" + }, + { + "expression": { + "id": 65646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 65639, + "name": "_coordinators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64422, + "src": "16057:13:100", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 65641, + "indexExpression": { + "id": 65640, + "name": "groupIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65607, + "src": "16071:10:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16057:25:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 65644, + "name": "coordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65626, + "src": "16093:11:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + } + ], + "id": 65643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16085:7:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 65642, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16085:7:100", + "typeDescriptions": {} + } + }, + "id": 65645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16085:20:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "16057:48:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65647, + "nodeType": "ExpressionStatement", + "src": "16057:48:100" + }, + { + "assignments": [65652], + "declarations": [ + { + "constant": false, + "id": 65652, + "mutability": "mutable", + "name": "groupNodes", + "nameLocation": "16167:10:100", + "nodeType": "VariableDeclaration", + "scope": 65742, + "src": "16150:27:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 65650, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16150:7:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65651, + "nodeType": "ArrayTypeName", + "src": "16150:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 65659, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 65656, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65618, + "src": "16194:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65657, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16196:4:100", + "memberName": "size", + "nodeType": "MemberAccess", + "referencedDeclaration": 69756, + "src": "16194:6:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 65655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "16180:13:100", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 65653, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16184:7:100", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65654, + "nodeType": "ArrayTypeName", + "src": "16184:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 65658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16180:21:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16150:51:100" + }, + { + "assignments": [65664], + "declarations": [ + { + "constant": false, + "id": 65664, + "mutability": "mutable", + "name": "groupKeys", + "nameLocation": "16226:9:100", + "nodeType": "VariableDeclaration", + "scope": 65742, + "src": "16211:24:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes[]" + }, + "typeName": { + "baseType": { + "id": 65662, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "16211:5:100", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "id": 65663, + "nodeType": "ArrayTypeName", + "src": "16211:7:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", + "typeString": "bytes[]" + } + }, + "visibility": "internal" + } + ], + "id": 65671, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 65668, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65618, + "src": "16250:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65669, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16252:4:100", + "memberName": "size", + "nodeType": "MemberAccess", + "referencedDeclaration": 69756, + "src": "16250:6:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 65667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "16238:11:100", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory[] memory)" + }, + "typeName": { + "baseType": { + "id": 65665, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "16242:5:100", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "id": 65666, + "nodeType": "ArrayTypeName", + "src": "16242:7:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", + "typeString": "bytes[]" + } + } + }, + "id": 65670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16238:19:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16211:46:100" + }, + { + "body": { + "id": 65713, + "nodeType": "Block", + "src": "16305:301:100", + "statements": [ + { + "expression": { + "id": 65691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 65683, + "name": "groupNodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65652, + "src": "16319:10:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 65685, + "indexExpression": { + "id": 65684, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65673, + "src": "16330:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16319:13:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "baseExpression": { + "expression": { + "id": 65686, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65618, + "src": "16335:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65687, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16337:7:100", + "memberName": "members", + "nodeType": "MemberAccess", + "referencedDeclaration": 69762, + "src": "16335:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Member_$69783_memory_ptr_$dyn_memory_ptr", + "typeString": "struct IController.Member memory[] memory" + } + }, + "id": 65689, + "indexExpression": { + "id": 65688, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65673, + "src": "16345:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16335:12:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$69783_memory_ptr", + "typeString": "struct IController.Member memory" + } + }, + "id": 65690, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16348:13:100", + "memberName": "nodeIdAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 69778, + "src": "16335:26:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "16319:42:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 65692, + "nodeType": "ExpressionStatement", + "src": "16319:42:100" + }, + { + "assignments": [65694], + "declarations": [ + { + "constant": false, + "id": 65694, + "mutability": "mutable", + "name": "dkgPublicKey", + "nameLocation": "16429:12:100", + "nodeType": "VariableDeclaration", + "scope": 65713, + "src": "16416:25:100", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 65693, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "16416:5:100", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 65706, + "initialValue": { + "arguments": [ + { + "expression": { + "baseExpression": { + "expression": { + "id": 65700, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65618, + "src": "16527:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65701, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16529:7:100", + "memberName": "members", + "nodeType": "MemberAccess", + "referencedDeclaration": 69762, + "src": "16527:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Member_$69783_memory_ptr_$dyn_memory_ptr", + "typeString": "struct IController.Member memory[] memory" + } + }, + "id": 65703, + "indexExpression": { + "id": 65702, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65673, + "src": "16537:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16527:12:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$69783_memory_ptr", + "typeString": "struct IController.Member memory" + } + }, + "id": 65704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16540:13:100", + "memberName": "nodeIdAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 69778, + "src": "16527:26:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 65696, + "name": "_config", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64418, + "src": "16474:7:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ControllerConfig_$64438_storage", + "typeString": "struct Controller.ControllerConfig storage ref" + } + }, + "id": 65697, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16482:27:100", + "memberName": "nodeRegistryContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 64429, + "src": "16474:35:100", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 65695, + "name": "INodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70293, + "src": "16460:13:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_INodeRegistry_$70293_$", + "typeString": "type(contract INodeRegistry)" + } + }, + "id": 65698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16460:50:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_INodeRegistry_$70293", + "typeString": "contract INodeRegistry" + } + }, + "id": 65699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16511:15:100", + "memberName": "getDKGPublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 70262, + "src": "16460:66:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (address) view external returns (bytes memory)" + } + }, + "id": 65705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16460:94:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16416:138:100" + }, + { + "expression": { + "id": 65711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 65707, + "name": "groupKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65664, + "src": "16568:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + }, + "id": 65709, + "indexExpression": { + "id": 65708, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65673, + "src": "16578:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16568:12:100", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 65710, + "name": "dkgPublicKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65694, + "src": "16583:12:100", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "src": "16568:27:100", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 65712, + "nodeType": "ExpressionStatement", + "src": "16568:27:100" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 65679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 65676, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65673, + "src": "16288:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 65677, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65618, + "src": "16292:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65678, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16294:4:100", + "memberName": "size", + "nodeType": "MemberAccess", + "referencedDeclaration": 69756, + "src": "16292:6:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16288:10:100", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 65714, + "initializationExpression": { + "assignments": [65673], + "declarations": [ + { + "constant": false, + "id": 65673, + "mutability": "mutable", + "name": "i", + "nameLocation": "16281:1:100", + "nodeType": "VariableDeclaration", + "scope": 65714, + "src": "16273:9:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65672, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16273:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 65675, + "initialValue": { + "hexValue": "30", + "id": 65674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16285:1:100", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "16273:13:100" + }, + "loopExpression": { + "expression": { + "id": 65681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "16300:3:100", + "subExpression": { + "id": 65680, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65673, + "src": "16300:1:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 65682, + "nodeType": "ExpressionStatement", + "src": "16300:3:100" + }, + "nodeType": "ForStatement", + "src": "16268:338:100" + }, + { + "expression": { + "arguments": [ + { + "id": 65718, + "name": "groupNodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65652, + "src": "16639:10:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 65719, + "name": "groupKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65664, + "src": "16651:9:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + ], + "expression": { + "id": 65715, + "name": "coordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65626, + "src": "16616:11:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + } + }, + "id": 65717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16628:10:100", + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 67275, + "src": "16616:22:100", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_bytes_memory_ptr_$dyn_memory_ptr_$returns$__$", + "typeString": "function (address[] memory,bytes memory[] memory) external" + } + }, + "id": 65720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16616:45:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65721, + "nodeType": "ExpressionStatement", + "src": "16616:45:100" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 65723, + "name": "_groupData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64425, + "src": "16698:10:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_GroupData_$73042_storage", + "typeString": "struct GroupLib.GroupData storage ref" + } + }, + "id": 65724, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16709:5:100", + "memberName": "epoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 73028, + "src": "16698:16:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65725, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65618, + "src": "16716:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65726, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16718:5:100", + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 69752, + "src": "16716:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65727, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65618, + "src": "16725:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65728, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16727:5:100", + "memberName": "epoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 69754, + "src": "16725:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65729, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65618, + "src": "16734:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65730, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16736:4:100", + "memberName": "size", + "nodeType": "MemberAccess", + "referencedDeclaration": 69756, + "src": "16734:6:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 65731, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65618, + "src": "16742:1:100", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Group_$69776_memory_ptr", + "typeString": "struct IController.Group memory" + } + }, + "id": 65732, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16744:9:100", + "memberName": "threshold", + "nodeType": "MemberAccess", + "referencedDeclaration": 69758, + "src": "16742:11:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 65733, + "name": "groupNodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65652, + "src": "16755:10:100", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "expression": { + "id": 65734, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "16767:5:100", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 65735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16773:6:100", + "memberName": "number", + "nodeType": "MemberAccess", + "src": "16767:12:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 65738, + "name": "coordinator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65626, + "src": "16789:11:100", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Coordinator_$67636", + "typeString": "contract Coordinator" + } + ], + "id": 65737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16781:7:100", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 65736, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16781:7:100", + "typeDescriptions": {} + } + }, + "id": 65739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16781:20:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 65722, + "name": "DkgTask", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64475, + "src": "16677:7:100", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256,address[] memory,uint256,address)" + } + }, + "id": 65740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16677:134:100", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65741, + "nodeType": "EmitStatement", + "src": "16672:139:100" + } + ] + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_emitGroupEvent", + "nameLocation": "15717:15:100", + "parameters": { + "id": 65608, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65607, + "mutability": "mutable", + "name": "groupIndex", + "nameLocation": "15741:10:100", + "nodeType": "VariableDeclaration", + "scope": 65743, + "src": "15733:18:100", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65606, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15733:7:100", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15732:20:100" + }, + "returnParameters": { + "id": 65609, + "nodeType": "ParameterList", + "parameters": [], + "src": "15762:0:100" + }, + "scope": 65744, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 64404, + "name": "UUPSUpgradeable", + "nameLocations": ["742:15:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 53423, + "src": "742:15:100" + }, + "id": 64405, + "nodeType": "InheritanceSpecifier", + "src": "742:15:100" + }, + { + "baseName": { + "id": 64406, + "name": "IController", + "nameLocations": ["759:11:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69955, + "src": "759:11:100" + }, + "id": 64407, + "nodeType": "InheritanceSpecifier", + "src": "759:11:100" + }, + { + "baseName": { + "id": 64408, + "name": "IControllerOwner", + "nameLocations": ["772:16:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 70144, + "src": "772:16:100" + }, + "id": 64409, + "nodeType": "InheritanceSpecifier", + "src": "772:16:100" + }, + { + "baseName": { + "id": 64410, + "name": "OwnableUpgradeable", + "nameLocations": ["790:18:100"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 52751, + "src": "790:18:100" + }, + "id": 64411, + "nodeType": "InheritanceSpecifier", + "src": "790:18:100" + } + ], + "canonicalName": "Controller", + "contractDependencies": [67636], + "contractKind": "contract", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 65744, 52751, 53804, 70144, 69955, 53423, 53107, 52772, 52782, 53286 + ], + "name": "Controller", + "nameLocation": "728:10:100", + "scope": 65745, + "usedErrors": [ + 64479, 64483, 64487, 64493, 64501, 64507, 64513, 64515, 64517, 64519, + 64521, 70475, 70477 + ] + } + ], + "license": "MIT" + }, + "id": 100 +} diff --git a/crates/contract-client/abi/IServiceManager.json b/crates/contract-client/abi/IServiceManager.json new file mode 100644 index 00000000..727e2569 --- /dev/null +++ b/crates/contract-client/abi/IServiceManager.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"createAVSRewardsSubmission","inputs":[{"name":"rewardsSubmissions","type":"tuple[]","internalType":"struct IRewardsCoordinator.RewardsSubmission[]","components":[{"name":"strategiesAndMultipliers","type":"tuple[]","internalType":"struct IRewardsCoordinator.StrategyAndMultiplier[]","components":[{"name":"strategy","type":"address","internalType":"contract IStrategy"},{"name":"multiplier","type":"uint96","internalType":"uint96"}]},{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"startTimestamp","type":"uint32","internalType":"uint32"},{"name":"duration","type":"uint32","internalType":"uint32"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"deregisterOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getOperatorShare","inputs":[{"name":"operator","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"registerOperator","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"operatorSignature","type":"tuple","internalType":"struct ISignatureUtils.SignatureWithSaltAndExpiry","components":[{"name":"signature","type":"bytes","internalType":"bytes"},{"name":"salt","type":"bytes32","internalType":"bytes32"},{"name":"expiry","type":"uint256","internalType":"uint256"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"slashDelegationStaking","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"createAVSRewardsSubmission(((address,uint96)[],address,uint256,uint32,uint32)[])":"fce36c7d","deregisterOperator(address)":"d8cf98ca","getOperatorShare(address)":"7b4ffbbd","registerOperator(address,(bytes,bytes32,uint256))":"aa2bcdbd","slashDelegationStaking(address,uint256)":"29557137"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"contract IStrategy\",\"name\":\"strategy\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"multiplier\",\"type\":\"uint96\"}],\"internalType\":\"struct IRewardsCoordinator.StrategyAndMultiplier[]\",\"name\":\"strategiesAndMultipliers\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"duration\",\"type\":\"uint32\"}],\"internalType\":\"struct IRewardsCoordinator.RewardsSubmission[]\",\"name\":\"rewardsSubmissions\",\"type\":\"tuple[]\"}],\"name\":\"createAVSRewardsSubmission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"deregisterOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getOperatorShare\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"struct ISignatureUtils.SignatureWithSaltAndExpiry\",\"name\":\"operatorSignature\",\"type\":\"tuple\"}],\"name\":\"registerOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"slashDelegationStaking\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"createAVSRewardsSubmission(((address,uint96)[],address,uint256,uint32,uint32)[])\":{\"details\":\"Only callabe by the permissioned rewardsInitiator addressThe duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION`The tokens are sent to the `RewardsCoordinator` contractStrategies must be in ascending order of addresses to check for duplicatesThis function will revert if the `rewardsSubmission` is malformed, e.g. if the `strategies` and `weights` arrays are of non-equal lengths\",\"params\":{\"rewardsSubmissions\":\"The rewards submissions being created\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createAVSRewardsSubmission(((address,uint96)[],address,uint256,uint32,uint32)[])\":{\"notice\":\"Creates a new rewards submission to the EigenLayer RewardsCoordinator contract, to be split amongst the set of stakers delegated to operators who are registered to this `avs`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/interfaces/IServiceManager.sol\":\"IServiceManager\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":300},\"remappings\":[\":Randcast-User-Contract/=lib/Randcast-User-Contract/contracts/\",\":Staking-v0.1/=lib/Staking-v0.1/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":fx-portal/=lib/fx-portal/contracts/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd39944e8fc06be6dbe2dd1d8449b5336e23c6a7ba3e8e9ae5ae0f37f35283f5\",\"dweb:/ipfs/QmPV3FGYjVwvKSgAXKUN3r9T9GwniZz83CxBpM7vyj2G53\"]},\"src/interfaces/IRewardsCoordinator.sol\":{\"keccak256\":\"0xc5d29321ee3c31738ee61e8ea9b64d7c0af0265cbca30d67b8c07afc870f8115\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://bb3217253bfbe8ccfab6bc737def4aa8d55c72262884cc607ce0df949f0264df\",\"dweb:/ipfs/QmYxaRoQ34S4eDS79Cba9PJYvYspXbSqNFo6RYGeBTfi7a\"]},\"src/interfaces/IServiceManager.sol\":{\"keccak256\":\"0x8c26d2c4fd0fc40e77964bacc8c23d2c6fd5f4054cf701c14f7b551be8d366e6\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://d23745ff54ffe91cdeb9d3c4037ca83c29e8e29f39b4e56fd016775d36e7cf4a\",\"dweb:/ipfs/QmUWtFCkmwL4qbY5b4Amb9vxGjFj61touYnJB9YQHyPtog\"]},\"src/interfaces/ISignatureUtils.sol\":{\"keccak256\":\"0xdd987d72d8cdbe1839ffa554c35f5e0b65cad95954044b5528a2f2d565188b26\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://60aeff57e190ce78fbdba148b49fedcbd59576645d91d4d995eaebad95b40388\",\"dweb:/ipfs/QmTSCht7dHR2bjjpuaP7efGbixFUr38NcxxHCih2bzyaSK\"]},\"src/interfaces/IStrategy.sol\":{\"keccak256\":\"0x272f3bf0e2d11fa2c51f567d7b2709ab5778aa9193e95acbd475c7aea200c9fc\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://3beed3e91d7db5166e362e1a83e2ad0e56171fe256d4e19f6b362f301e9ae30f\",\"dweb:/ipfs/QmZALz9pm6XKSJMfo67t3oU79zGucwGgPN5WojG2bAXESF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.18+commit.87f61d96"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"struct IRewardsCoordinator.RewardsSubmission[]","name":"rewardsSubmissions","type":"tuple[]","components":[{"internalType":"struct IRewardsCoordinator.StrategyAndMultiplier[]","name":"strategiesAndMultipliers","type":"tuple[]","components":[{"internalType":"contract IStrategy","name":"strategy","type":"address"},{"internalType":"uint96","name":"multiplier","type":"uint96"}]},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint32","name":"startTimestamp","type":"uint32"},{"internalType":"uint32","name":"duration","type":"uint32"}]}],"stateMutability":"nonpayable","type":"function","name":"createAVSRewardsSubmission"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"deregisterOperator"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function","name":"getOperatorShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"struct ISignatureUtils.SignatureWithSaltAndExpiry","name":"operatorSignature","type":"tuple","components":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256","name":"expiry","type":"uint256"}]}],"stateMutability":"nonpayable","type":"function","name":"registerOperator"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"slashDelegationStaking"}],"devdoc":{"kind":"dev","methods":{"createAVSRewardsSubmission(((address,uint96)[],address,uint256,uint32,uint32)[])":{"details":"Only callabe by the permissioned rewardsInitiator addressThe duration of the `rewardsSubmission` cannot exceed `MAX_REWARDS_DURATION`The tokens are sent to the `RewardsCoordinator` contractStrategies must be in ascending order of addresses to check for duplicatesThis function will revert if the `rewardsSubmission` is malformed, e.g. if the `strategies` and `weights` arrays are of non-equal lengths","params":{"rewardsSubmissions":"The rewards submissions being created"}}},"version":1},"userdoc":{"kind":"user","methods":{"createAVSRewardsSubmission(((address,uint96)[],address,uint256,uint32,uint32)[])":{"notice":"Creates a new rewards submission to the EigenLayer RewardsCoordinator contract, to be split amongst the set of stakers delegated to operators who are registered to this `avs`"}},"version":1}},"settings":{"remappings":["Randcast-User-Contract/=lib/Randcast-User-Contract/contracts/","Staking-v0.1/=lib/Staking-v0.1/src/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","fx-portal/=lib/fx-portal/contracts/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/"],"optimizer":{"enabled":true,"runs":300},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/interfaces/IServiceManager.sol":"IServiceManager"},"evmVersion":"paris","libraries":{}},"sources":{"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"keccak256":"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305","urls":["bzz-raw://bd39944e8fc06be6dbe2dd1d8449b5336e23c6a7ba3e8e9ae5ae0f37f35283f5","dweb:/ipfs/QmPV3FGYjVwvKSgAXKUN3r9T9GwniZz83CxBpM7vyj2G53"],"license":"MIT"},"src/interfaces/IRewardsCoordinator.sol":{"keccak256":"0xc5d29321ee3c31738ee61e8ea9b64d7c0af0265cbca30d67b8c07afc870f8115","urls":["bzz-raw://bb3217253bfbe8ccfab6bc737def4aa8d55c72262884cc607ce0df949f0264df","dweb:/ipfs/QmYxaRoQ34S4eDS79Cba9PJYvYspXbSqNFo6RYGeBTfi7a"],"license":"BUSL-1.1"},"src/interfaces/IServiceManager.sol":{"keccak256":"0x8c26d2c4fd0fc40e77964bacc8c23d2c6fd5f4054cf701c14f7b551be8d366e6","urls":["bzz-raw://d23745ff54ffe91cdeb9d3c4037ca83c29e8e29f39b4e56fd016775d36e7cf4a","dweb:/ipfs/QmUWtFCkmwL4qbY5b4Amb9vxGjFj61touYnJB9YQHyPtog"],"license":"BUSL-1.1"},"src/interfaces/ISignatureUtils.sol":{"keccak256":"0xdd987d72d8cdbe1839ffa554c35f5e0b65cad95954044b5528a2f2d565188b26","urls":["bzz-raw://60aeff57e190ce78fbdba148b49fedcbd59576645d91d4d995eaebad95b40388","dweb:/ipfs/QmTSCht7dHR2bjjpuaP7efGbixFUr38NcxxHCih2bzyaSK"],"license":"BUSL-1.1"},"src/interfaces/IStrategy.sol":{"keccak256":"0x272f3bf0e2d11fa2c51f567d7b2709ab5778aa9193e95acbd475c7aea200c9fc","urls":["bzz-raw://3beed3e91d7db5166e362e1a83e2ad0e56171fe256d4e19f6b362f301e9ae30f","dweb:/ipfs/QmZALz9pm6XKSJMfo67t3oU79zGucwGgPN5WojG2bAXESF"],"license":"BUSL-1.1"}},"version":1},"id":165} \ No newline at end of file diff --git a/crates/contract-client/build.rs b/crates/contract-client/build.rs deleted file mode 100644 index c6f81eec..00000000 --- a/crates/contract-client/build.rs +++ /dev/null @@ -1,31 +0,0 @@ -use std::fs; - -use ethers_contract_abigen::MultiAbigen; - -fn main() -> Result<(), Box> { - println!("cargo:rerun-if-changed=proto"); - println!("cargo:rerun-if-changed=abi"); - - let mut prost_build = prost_build::Config::new(); - - prost_build.btree_map(["members"]); - - fs::create_dir_all("./src/rpc_stub")?; - - let protos = &[ - "proto/adapter.proto", - "proto/controller.proto", - "proto/coordinator.proto", - ]; - - tonic_build::configure() - .out_dir("./src/rpc_stub") - .compile_with_config(prost_build, protos, &["proto"])?; - - MultiAbigen::from_json_files("./abi") - .unwrap() - .build()? - .write_to_module("./src/contract_stub", false)?; - - Ok(()) -} diff --git a/crates/contract-client/proto/adapter.proto b/crates/contract-client/proto/adapter.proto deleted file mode 100644 index f3cfc623..00000000 --- a/crates/contract-client/proto/adapter.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/empty.proto"; - -package adapter; - -service Transactions { - rpc Mine(MineRequest) returns (MineReply); - - rpc RequestRandomness(RequestRandomnessRequest) - returns (google.protobuf.Empty); - - rpc FulfillRandomness(FulfillRandomnessRequest) - returns (google.protobuf.Empty); -} - -message MineRequest { - uint32 block_number_increment = 1; -} - -message MineReply { - uint32 block_number = 1; -} - -message RequestRandomnessRequest { - bytes seed = 1; -} - -message FulfillRandomnessRequest { - string id_address = 1; - uint32 group_index = 2; - bytes request_id = 3; - bytes signature = 4; - map partial_signatures = 5; -} - -service Views { - rpc GetGroup(GetGroupRequest) returns (GroupReply); - - rpc GetLastOutput(google.protobuf.Empty) returns (LastOutputReply); - - rpc EmitSignatureTask(google.protobuf.Empty) returns (SignatureTaskReply); - - rpc IsTaskPending(IsTaskPendingRequest) returns (IsTaskPendingReply); -} - -message GetGroupRequest { - uint32 index = 1; -} - -message GroupReply { - uint32 index = 1; - uint32 epoch = 2; - uint32 capacity = 3; - uint32 size = 4; - uint32 threshold = 5; - bool state = 6; - bytes public_key = 7; - map members = 8; - repeated string committers = 9; -} - -message Member { - uint32 index = 1; - string id_address = 2; - bytes partial_public_key = 3; -} - -message SignatureTaskReply { - bytes request_id = 1; - bytes seed = 2; - uint32 group_index = 3; - uint32 assignment_block_height = 4; -} - -message LastOutputReply { - bytes last_output = 1; -} - -message IsTaskPendingRequest { - bytes request_id = 1; -} - -message IsTaskPendingReply { - bool state = 1; -} diff --git a/crates/contract-client/proto/controller.proto b/crates/contract-client/proto/controller.proto deleted file mode 100644 index bd24d4cf..00000000 --- a/crates/contract-client/proto/controller.proto +++ /dev/null @@ -1,77 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/empty.proto"; - -package controller; - -service Transactions { - rpc NodeRegister(NodeRegisterRequest) returns (google.protobuf.Empty); - - rpc CommitDkg(CommitDkgRequest) returns (google.protobuf.Empty); - - rpc PostProcessDkg(PostProcessDkgRequest) returns (google.protobuf.Empty); - - rpc Mine(MineRequest) returns (MineReply); -} - -message NodeRegisterRequest { - string id_address = 1; - bytes id_public_key = 2; -} - -message CommitDkgRequest { - string id_address = 1; - uint32 group_index = 2; - uint32 group_epoch = 3; - bytes public_key = 4; - bytes partial_public_key = 5; - repeated string disqualified_nodes = 6; -} - -message PostProcessDkgRequest { - string id_address = 1; - uint32 group_index = 2; - uint32 group_epoch = 3; -} - -message MineRequest { - uint32 block_number_increment = 1; -} - -message MineReply { - uint32 block_number = 1; -} - -service Views { - rpc GetNode(GetNodeRequest) returns (NodeReply); - - rpc EmitDkgTask(google.protobuf.Empty) returns (DkgTaskReply); -} - -message GetNodeRequest { - string id_address = 1; -} - -message NodeReply { - string id_address = 1; - bytes id_public_key = 2; - bool state = 3; - uint32 pending_until_block = 4; - bytes staking = 5; -} - -message Member { - uint32 index = 1; - string id_address = 2; - bytes partial_public_key = 3; -} - -message DkgTaskReply { - uint32 group_index = 1; - uint32 epoch = 2; - uint32 size = 3; - uint32 threshold = 4; - map members = 5; - uint32 assignment_block_height = 6; - string coordinator_address = 7; -} diff --git a/crates/contract-client/proto/coordinator.proto b/crates/contract-client/proto/coordinator.proto deleted file mode 100644 index 8d60cee4..00000000 --- a/crates/contract-client/proto/coordinator.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/empty.proto"; - -package coordinator; - -service Transactions { - rpc Publish(PublishRequest) returns (google.protobuf.Empty); -} - -message PublishRequest { - string id_address = 1; - bytes value = 2; -} - -service Views { - rpc GetShares(google.protobuf.Empty) returns (SharesReply); - - rpc GetResponses(google.protobuf.Empty) returns (ResponsesReply); - - rpc GetJustifications(google.protobuf.Empty) returns (JustificationsReply); - - rpc GetParticipants(google.protobuf.Empty) returns (ParticipantsReply); - - rpc GetDkgKeys(google.protobuf.Empty) returns (DkgKeysReply); - - rpc InPhase(google.protobuf.Empty) returns (InPhaseReply); -} - -message SharesReply { - repeated bytes shares = 1; -} - -message ResponsesReply { - repeated bytes responses = 1; -} - -message JustificationsReply { - repeated bytes justifications = 1; -} - -message ParticipantsReply { - repeated string participants = 1; -} - -message DkgKeysReply { - uint32 threshold = 1; - repeated bytes dkg_keys = 2; -} - -message InPhaseReply { - int32 phase = 1; -} diff --git a/crates/contract-client/src/error.rs b/crates/contract-client/src/error.rs index af72dad2..674be681 100644 --- a/crates/contract-client/src/error.rs +++ b/crates/contract-client/src/error.rs @@ -1,7 +1,5 @@ -use arpa_core::{HttpWalletSigner, WsWalletSigner}; -use ethers::{ - prelude::{ContractError, ProviderError, WalletError}, - types::TransactionReceipt, +use alloy::{ + providers::PendingTransactionError, rpc::types::TransactionReceipt, transports::TransportError, }; use rustc_hex::FromHexError; use thiserror::Error; @@ -10,20 +8,22 @@ pub type ContractClientResult = Result; #[derive(Debug, Error)] pub enum ContractClientError { + #[error("custom error: {0}")] + CustomError(String), #[error(transparent)] RpcClientError(#[from] tonic::transport::Error), #[error(transparent)] RpcResponseError(#[from] tonic::Status), #[error(transparent)] - ChainProviderError(#[from] ProviderError), + ContractError(#[from] alloy::contract::Error), #[error(transparent)] - WsContractError(#[from] ContractError), + SignerError(#[from] alloy::signers::Error), #[error(transparent)] - HttpContractError(#[from] ContractError), + PendingTransactionError(#[from] PendingTransactionError), #[error(transparent)] - AddressParseError(#[from] FromHexError), + TransportError(#[from] TransportError), #[error(transparent)] - WalletError(#[from] WalletError), + AddressParseError(#[from] FromHexError), #[error("can't fetch new block, please check provider")] FetchingBlockError, #[error("can't fetch dkg task, please check provider")] diff --git a/crates/contract-client/src/ethers/adapter.rs b/crates/contract-client/src/ethers/adapter.rs index 75749172..73f6a8d5 100644 --- a/crates/contract-client/src/ethers/adapter.rs +++ b/crates/contract-client/src/ethers/adapter.rs @@ -1,44 +1,58 @@ use crate::{ adapter::{AdapterClientBuilder, AdapterLogs, AdapterTransactions, AdapterViews}, - contract_stub::adapter::{ - Adapter, PartialSignature as ContractPartialSignature, RandomnessRequestFilter, - RequestDetail, - }, error::{ContractClientError, ContractClientResult}, + ethers::adapter::{ + Adapter::{AdapterInstance, RandomnessRequest as ContractRandomnessRequest}, + IAdapter::{PartialSignature as ContractPartialSignature, RequestDetail}, + }, ServiceClient, TransactionCaller, ViewCaller, }; +use alloy::{ + eips::BlockNumberOrTag, + hex, + primitives::{Address, U256}, + rpc::types::TransactionReceipt, + sol, +}; use arpa_core::{ pad_to_bytes32, ChainIdentity, ExponentialBackoffRetryDescriptor, GeneralMainChainIdentity, - GeneralRelayedChainIdentity, PartialSignature, RandomnessRequestType, RandomnessTask, - WsWalletSigner, DEFAULT_MINIMUM_THRESHOLD, FULFILL_RANDOMNESS_GAS_EXCEPT_CALLBACK, + GeneralRelayedChainIdentity, PartialSignature, ProviderClientWithSigner, RandomnessRequestType, + RandomnessTask, DEFAULT_MINIMUM_THRESHOLD, FULFILL_RANDOMNESS_GAS_EXCEPT_CALLBACK, RANDOMNESS_REWARD_GAS, VERIFICATION_GAS_OVER_MINIMUM_THRESHOLD, }; use async_trait::async_trait; -use ethers::{prelude::*, utils::hex}; +use futures_util::StreamExt; use log::info; -use std::{collections::BTreeMap, future::Future, sync::Arc}; +use std::{collections::BTreeMap, future::Future}; use threshold_bls::poly::Eval; +sol! { + #[sol(ignore_unlinked)] + #[sol(rpc)] + Adapter, + "abi/Adapter.json" +} + #[allow(dead_code)] pub struct AdapterClient { - chain_id: usize, + chain_id: u64, main_id_address: Address, adapter_address: Address, - client: Arc, + client: ProviderClientWithSigner, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, } impl AdapterClient { pub fn new( - chain_id: usize, + chain_id: u64, main_id_address: Address, adapter_address: Address, - client: Arc, + client: ProviderClientWithSigner, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, ) -> Self { AdapterClient { chain_id, @@ -84,7 +98,7 @@ impl AdapterClientBuilder for GeneralRelayedChainIdentity { } } -type AdapterContract = Adapter; +type AdapterContract = AdapterInstance; #[async_trait] impl ServiceClient for AdapterClient { @@ -115,7 +129,7 @@ impl AdapterTransactions for AdapterClient { let r_id = pad_to_bytes32(&task.request_id).unwrap(); - let sig = U256::from(signature.as_slice()); + let sig = U256::from_be_slice(signature.as_slice()); let ps: Vec = partial_signatures .values() @@ -123,28 +137,28 @@ impl AdapterTransactions for AdapterClient { let eval: Eval> = bincode::deserialize(&ps.signed_partial_signature).unwrap(); - let sig: U256 = U256::from(eval.value.as_slice()); + let sig: U256 = U256::from_be_slice(eval.value.as_slice()); ContractPartialSignature { - index: ps.index.into(), - partial_signature: sig, + index: U256::from(ps.index), + partialSignature: sig, } }) .collect(); let rd = RequestDetail { - sub_id: task.subscription_id, - group_index: task.group_index, - request_type: task.request_type.to_u8(), + subId: task.subscription_id, + groupIndex: task.group_index, + requestType: task.request_type.to_u8(), params: task.params.into(), - callback_contract: task.requester, + callbackContract: task.requester, seed: task.seed, - request_confirmations: task.request_confirmations, - callback_gas_limit: task.callback_gas_limit, - callback_max_gas_price: task.callback_max_gas_price, - block_num: task.assignment_block_height.into(), + requestConfirmations: task.request_confirmations, + callbackGasLimit: task.callback_gas_limit, + callbackMaxGasPrice: U256::from(task.callback_max_gas_price), + blockNum: U256::from(task.assignment_block_height), }; - let call = adapter_contract.fulfill_randomness(group_index as u32, r_id, sig, rd, ps); + let call = adapter_contract.fulfillRandomness(group_index as u32, r_id.into(), sig, rd, ps); let partial_signers_count = partial_signatures.len() as u32; @@ -157,16 +171,16 @@ impl AdapterTransactions for AdapterClient { let extra_add_reward_gas = partial_signers_count * RANDOMNESS_REWARD_GAS; + let txn_gas_limit = task.callback_gas_limit + + FULFILL_RANDOMNESS_GAS_EXCEPT_CALLBACK + + extra_verification_gas + + extra_add_reward_gas; + AdapterClient::call_contract_transaction( self.chain_id, "fulfill_randomness", - adapter_contract.client_ref(), - call.gas( - task.callback_gas_limit - + FULFILL_RANDOMNESS_GAS_EXCEPT_CALLBACK - + extra_verification_gas - + extra_add_reward_gas, - ), + adapter_contract.provider(), + call.gas(txn_gas_limit as u64), self.contract_transaction_retry_descriptor, false, self.max_priority_fee_per_gas, @@ -184,7 +198,7 @@ impl AdapterViews for AdapterClient { AdapterClient::call_contract_view( self.chain_id, "get_last_randomness", - adapter_contract.get_last_randomness(), + adapter_contract.getLastRandomness(), self.contract_view_retry_descriptor, ) .await @@ -198,12 +212,12 @@ impl AdapterViews for AdapterClient { AdapterClient::call_contract_view( self.chain_id, "get_pending_request", - adapter_contract.get_pending_request_commitment(r_id), + adapter_contract.getPendingRequestCommitment(r_id.into()), self.contract_view_retry_descriptor, ) .await .map(|r| { - let r = U256::from(r); + let r = U256::from_be_slice(r.as_slice()); !r.is_zero() }) } @@ -220,45 +234,46 @@ impl AdapterLogs for AdapterClient { ) -> ContractClientResult<()> { let contract = Adapter::new(self.adapter_address, self.client.clone()); - let events = contract - .event::() - .from_block(BlockNumber::Latest); - - let mut stream = events.subscribe().await?.with_meta(); + let mut stream = contract + .RandomnessRequest_filter() + .from_block(BlockNumberOrTag::Latest) + .subscribe() + .await? + .into_stream(); while let Some(Ok(evt)) = stream.next().await { let ( - RandomnessRequestFilter { - request_id, - sub_id, - group_index, - request_type, + ContractRandomnessRequest { + requestId, + subId, + groupIndex, + requestType, params, sender, seed, - request_confirmations, - callback_gas_limit, - callback_max_gas_price, - estimated_payment: _, + requestConfirmations, + callbackGasLimit, + callbackMaxGasPrice, + estimatedPayment: _, }, meta, ) = evt; info!( "Received randomness task: chain_id: {}, group_index: {}, request_id: {}, sender: {:?}, sub_id: {}, seed: {}, request_confirmations: {}, callback_gas_limit: {}, callback_max_gas_price: {}, block_number: {}", - self.chain_id, group_index, format!("0x{}", hex::encode(request_id)), sender, sub_id, seed, request_confirmations, callback_gas_limit, callback_max_gas_price, meta.block_number); + self.chain_id, groupIndex, format!("0x{}", hex::encode(requestId)), sender, subId, seed, requestConfirmations, callbackGasLimit, callbackMaxGasPrice, meta.block_number.unwrap_or(0)); let task = RandomnessTask { - request_id: request_id.to_vec(), - subscription_id: sub_id, - group_index, - request_type: RandomnessRequestType::from(request_type), + request_id: requestId.to_vec(), + subscription_id: subId, + group_index: groupIndex, + request_type: RandomnessRequestType::from(requestType), params: params.to_vec(), requester: sender, seed, - request_confirmations, - callback_gas_limit, - callback_max_gas_price, - assignment_block_height: meta.block_number.as_usize(), + request_confirmations: requestConfirmations, + callback_gas_limit: callbackGasLimit, + callback_max_gas_price: callbackMaxGasPrice.to::(), + assignment_block_height: meta.block_number.unwrap_or(0) as usize, }; cb(task).await?; } diff --git a/crates/contract-client/src/ethers/avs_directory.rs b/crates/contract-client/src/ethers/avs_directory.rs new file mode 100644 index 00000000..5186bae1 --- /dev/null +++ b/crates/contract-client/src/ethers/avs_directory.rs @@ -0,0 +1,8 @@ +use alloy::sol; + +sol! { + #[sol(ignore_unlinked)] + #[sol(rpc)] + IAVSDirectory, + "abi/IAVSDirectory.json" +} diff --git a/crates/contract-client/src/ethers/controller.rs b/crates/contract-client/src/ethers/controller.rs index 2d3dd536..ce11af2c 100644 --- a/crates/contract-client/src/ethers/controller.rs +++ b/crates/contract-client/src/ethers/controller.rs @@ -1,44 +1,58 @@ use crate::{ - contract_stub::controller::{ - CommitDkgParams, Controller, DkgTaskFilter, Group as ContractGroup, - }, controller::{ ControllerClientBuilder, ControllerLogs, ControllerTransactions, ControllerViews, }, error::{ContractClientError, ContractClientResult}, + ethers::{ + controller::{ + Controller::{ControllerInstance, DkgTask as ContractDkgTask}, + IController::CommitDkgParams, + }, + parse_controller_contract_group, + }, ServiceClient, }; use crate::{TransactionCaller, ViewCaller}; +use alloy::{ + eips::BlockNumberOrTag, + primitives::{Address, U256}, + rpc::types::TransactionReceipt, + sol, +}; use arpa_core::{ - u256_to_vec, ChainIdentity, DKGTask, ExponentialBackoffRetryDescriptor, - GeneralMainChainIdentity, GeneralRelayedChainIdentity, Group, MainChainIdentity, Member, - WsWalletSigner, + ChainIdentity, DKGTask, ExponentialBackoffRetryDescriptor, GeneralMainChainIdentity, + GeneralRelayedChainIdentity, Group, MainChainIdentity, ProviderClientWithSigner, }; use async_trait::async_trait; -use ethers::prelude::*; +use futures_util::StreamExt; use log::info; -use std::collections::BTreeMap; -use std::marker::PhantomData; -use std::{future::Future, sync::Arc}; +use std::future::Future; use threshold_bls::group::Curve; +sol! { + #[sol(ignore_unlinked)] + #[sol(rpc)] + Controller, + "abi/Controller.json" +} + pub struct ControllerClient { - chain_id: usize, + chain_id: u64, controller_address: Address, - client: Arc, + client: ProviderClientWithSigner, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, } impl ControllerClient { pub fn new( - chain_id: usize, + chain_id: u64, controller_address: Address, identity: &GeneralMainChainIdentity, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, ) -> Self { ControllerClient { chain_id, @@ -74,7 +88,7 @@ impl ControllerClientBuilder for GeneralRelayedChainIdentity { } } -type ControllerContract = Controller; +type ControllerContract = ControllerInstance; #[async_trait] impl ServiceClient for ControllerClient { @@ -104,18 +118,18 @@ impl ControllerTransactions for ControllerClient { let controller_contract = ServiceClient::::prepare_service_client(self).await?; - let call = controller_contract.commit_dkg(CommitDkgParams { - group_index: group_index.into(), - group_epoch: group_epoch.into(), - public_key: public_key.into(), - partial_public_key: partial_public_key.into(), - disqualified_nodes, + let call = controller_contract.commitDkg(CommitDkgParams { + groupIndex: U256::from(group_index), + groupEpoch: U256::from(group_epoch), + publicKey: public_key.into(), + partialPublicKey: partial_public_key.into(), + disqualifiedNodes: disqualified_nodes, }); ControllerClient::call_contract_transaction( self.chain_id, "commit_dkg", - controller_contract.client_ref(), + controller_contract.provider(), call, self.contract_transaction_retry_descriptor, true, @@ -132,12 +146,13 @@ impl ControllerTransactions for ControllerClient { let controller_contract = ServiceClient::::prepare_service_client(self).await?; - let call = controller_contract.post_process_dkg(group_index.into(), group_epoch.into()); + let call = + controller_contract.postProcessDkg(U256::from(group_index), U256::from(group_epoch)); ControllerClient::call_contract_transaction( self.chain_id, "post_process_dkg", - controller_contract.client_ref(), + controller_contract.provider(), call, self.contract_transaction_retry_descriptor, false, @@ -156,11 +171,11 @@ impl ControllerViews for ControllerClient { ControllerClient::call_contract_view( self.chain_id, "get_group", - controller_contract.get_group(group_index.into()), + controller_contract.getGroup(U256::from(group_index)), self.contract_view_retry_descriptor, ) .await - .map(parse_contract_group) + .map(parse_controller_contract_group) } async fn get_coordinator(&self, group_index: usize) -> ContractClientResult
{ @@ -170,7 +185,7 @@ impl ControllerViews for ControllerClient { ControllerClient::call_contract_view( self.chain_id, "get_coordinator", - controller_contract.get_coordinator(group_index.into()), + controller_contract.getCoordinator(U256::from(group_index)), self.contract_view_retry_descriptor, ) .await @@ -183,12 +198,12 @@ impl ControllerViews for ControllerClient { let config = ControllerClient::call_contract_view( self.chain_id, "get_controller_config", - controller_contract.get_controller_config(), + controller_contract.getControllerConfig(), self.contract_view_retry_descriptor, ) .await?; - Ok(config.0) + Ok(config.nodeRegistryContractAddress) } } @@ -203,114 +218,44 @@ impl ControllerLogs for ControllerClient { ) -> ContractClientResult<()> { let contract = Controller::new(self.controller_address, self.client.clone()); - let events = contract - .event::() - .from_block(BlockNumber::Latest); - - let mut stream = events.subscribe().await?.with_meta(); + let mut stream = contract + .DkgTask_filter() + .from_block(BlockNumberOrTag::Latest) + .subscribe() + .await? + .into_stream(); while let Some(Ok(evt)) = stream.next().await { let ( - DkgTaskFilter { - global_epoch: _, - group_index, - group_epoch, + ContractDkgTask { + globalEpoch: _, + groupIndex, + groupEpoch, size, threshold, members, - assignment_block_height: _, - coordinator_address, + assignmentBlockHeight: _, + coordinatorAddress, }, meta, ) = evt; info!( "Received DKG task: group_index: {}, epoch: {}, size: {}, threshold: {}, members: {:?}, coordinator_address: {}, block_number: {}", - group_index, group_epoch, size, threshold, members, coordinator_address, meta.block_number + groupIndex, groupEpoch, size, threshold, members, coordinatorAddress, meta.block_number.unwrap_or(0) ); let task = DKGTask { - group_index: group_index.as_usize(), - epoch: group_epoch.as_usize(), - size: size.as_usize(), - threshold: threshold.as_usize(), + group_index: groupIndex.to::(), + epoch: groupEpoch.to::(), + size: size.to::(), + threshold: threshold.to::(), members, - assignment_block_height: meta.block_number.as_usize(), - coordinator_address, + assignment_block_height: meta.block_number.unwrap_or(0) as usize, + coordinator_address: coordinatorAddress, }; cb(task).await?; } Err(ContractClientError::FetchingDkgTaskError) } } - -fn parse_contract_group(cg: ContractGroup) -> Group { - let ContractGroup { - index, - epoch, - size, - threshold, - public_key, - members, - committers, - commit_cache_list: _, - is_strictly_majority_consensus_reached, - } = cg; - - let members: BTreeMap> = members - .into_iter() - .enumerate() - .map(|(index, cm)| { - let partial_public_key = - if cm.partial_public_key.is_empty() || cm.partial_public_key[0] == U256::zero() { - None - } else { - let bytes = cm - .partial_public_key - .iter() - .map(u256_to_vec) - .reduce(|mut acc, mut e| { - acc.append(&mut e); - acc - }) - .unwrap(); - Some(bincode::deserialize(&bytes).unwrap()) - }; - - let m = Member { - index, - dkg_index: Some(0), - id_address: cm.node_id_address, - rpc_endpoint: None, - partial_public_key, - }; - (m.id_address, m) - }) - .collect(); - - let public_key = if public_key.is_empty() || public_key[0] == U256::zero() { - None - } else { - let bytes = public_key - .iter() - .map(u256_to_vec) - .reduce(|mut acc, mut e| { - acc.append(&mut e); - acc - }) - .unwrap(); - Some(bincode::deserialize(&bytes).unwrap()) - }; - - Group { - index: index.as_usize(), - epoch: epoch.as_usize(), - size: size.as_usize(), - threshold: threshold.as_usize(), - state: is_strictly_majority_consensus_reached, - public_key, - members, - committers, - c: PhantomData, - } -} diff --git a/crates/contract-client/src/ethers/controller_oracle.rs b/crates/contract-client/src/ethers/controller_oracle.rs index 12f8052f..3d4dcd8e 100644 --- a/crates/contract-client/src/ethers/controller_oracle.rs +++ b/crates/contract-client/src/ethers/controller_oracle.rs @@ -1,39 +1,49 @@ use crate::controller_oracle::ControllerOracleTransactions; +use crate::ethers::controller_oracle::ControllerOracle::ControllerOracleInstance; +use crate::ethers::parse_controller_oracle_contract_group; use crate::{ - contract_stub::controller_oracle::{ControllerOracle, Group as ContractGroup}, + // contract_stub::controller_oracle::{ControllerOracle, Group as ContractGroup}, controller_oracle::{ControllerOracleClientBuilder, ControllerOracleViews}, error::ContractClientResult, ServiceClient, }; use crate::{TransactionCaller, ViewCaller}; +use alloy::{ + primitives::{Address, U256}, + rpc::types::TransactionReceipt, + sol, +}; use arpa_core::{ - u256_to_vec, ChainIdentity, ExponentialBackoffRetryDescriptor, GeneralMainChainIdentity, - GeneralRelayedChainIdentity, Group, Member, RelayedChainIdentity, WsWalletSigner, + ChainIdentity, ExponentialBackoffRetryDescriptor, GeneralMainChainIdentity, + GeneralRelayedChainIdentity, Group, RelayedChainIdentity, ProviderClientWithSigner, }; use async_trait::async_trait; -use ethers::prelude::*; -use std::collections::BTreeMap; -use std::marker::PhantomData; -use std::sync::Arc; use threshold_bls::group::Curve; +sol! { + #[sol(ignore_unlinked)] + #[sol(rpc)] + ControllerOracle, + "abi/ControllerOracle.json" +} + pub struct ControllerOracleClient { - chain_id: usize, + chain_id: u64, controller_oracle_address: Address, - client: Arc, + client: ProviderClientWithSigner, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, } impl ControllerOracleClient { pub fn new( - chain_id: usize, + chain_id: u64, controller_oracle_address: Address, identity: &GeneralRelayedChainIdentity, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, ) -> Self { ControllerOracleClient { chain_id, @@ -69,7 +79,7 @@ impl ControllerOracleClientBuilder for GeneralRelayedChainIdentity } } -type ControllerOracleContract = ControllerOracle; +type ControllerOracleContract = ControllerOracleInstance; #[async_trait] impl ServiceClient for ControllerOracleClient { @@ -93,12 +103,12 @@ impl ControllerOracleTransactions for ControllerOracleClient { let controller_oracle_contract = ServiceClient::::prepare_service_client(self).await?; - let call = controller_oracle_contract.node_withdraw(recipient); + let call = controller_oracle_contract.nodeWithdraw(recipient); ControllerOracleClient::call_contract_transaction( self.chain_id, "node_withdraw", - controller_oracle_contract.client_ref(), + controller_oracle_contract.provider(), call, self.contract_transaction_retry_descriptor, true, @@ -117,81 +127,10 @@ impl ControllerOracleViews for ControllerOracleClient { ControllerOracleClient::call_contract_view( self.chain_id, "get_group", - controller_oracle_contract.get_group(group_index.into()), + controller_oracle_contract.getGroup(U256::from(group_index)), self.contract_view_retry_descriptor, ) .await - .map(parse_contract_group) - } -} - -fn parse_contract_group(cg: ContractGroup) -> Group { - let ContractGroup { - index, - epoch, - size, - threshold, - public_key, - members, - committers, - commit_cache_list: _, - is_strictly_majority_consensus_reached, - } = cg; - - let members: BTreeMap> = members - .into_iter() - .enumerate() - .map(|(index, cm)| { - let partial_public_key = - if cm.partial_public_key.is_empty() || cm.partial_public_key[0] == U256::zero() { - None - } else { - let bytes = cm - .partial_public_key - .iter() - .map(u256_to_vec) - .reduce(|mut acc, mut e| { - acc.append(&mut e); - acc - }) - .unwrap(); - Some(bincode::deserialize(&bytes).unwrap()) - }; - - let m = Member { - index, - dkg_index: Some(0), - id_address: cm.node_id_address, - rpc_endpoint: None, - partial_public_key, - }; - (m.id_address, m) - }) - .collect(); - - let public_key = if public_key.is_empty() || public_key[0] == U256::zero() { - None - } else { - let bytes = public_key - .iter() - .map(u256_to_vec) - .reduce(|mut acc, mut e| { - acc.append(&mut e); - acc - }) - .unwrap(); - Some(bincode::deserialize(&bytes).unwrap()) - }; - - Group { - index: index.as_usize(), - epoch: epoch.as_usize(), - size: size.as_usize(), - threshold: threshold.as_usize(), - state: is_strictly_majority_consensus_reached, - public_key, - members, - committers, - c: PhantomData, + .map(parse_controller_oracle_contract_group) } } diff --git a/crates/contract-client/src/ethers/controller_relayer.rs b/crates/contract-client/src/ethers/controller_relayer.rs index 8c9f5c19..d0841d6c 100644 --- a/crates/contract-client/src/ethers/controller_relayer.rs +++ b/crates/contract-client/src/ethers/controller_relayer.rs @@ -1,32 +1,44 @@ use crate::{ - contract_stub::controller_relayer::ControllerRelayer, + // contract_stub::controller_relayer::ControllerRelayer, controller_relayer::{ControllerRelayerClientBuilder, ControllerRelayerTransactions}, error::ContractClientResult, - ServiceClient, TransactionCaller, + ethers::controller_relayer::ControllerRelayer::ControllerRelayerInstance, + ServiceClient, + TransactionCaller, +}; +use alloy::{ + primitives::{Address, U256}, + rpc::types::TransactionReceipt, + sol, }; use arpa_core::{ ChainIdentity, ExponentialBackoffRetryDescriptor, GeneralMainChainIdentity, - GeneralRelayedChainIdentity, MainChainIdentity, WsWalletSigner, + GeneralRelayedChainIdentity, MainChainIdentity, ProviderClientWithSigner, }; use async_trait::async_trait; -use ethers::prelude::*; -use std::sync::Arc; + +sol! { + #[sol(ignore_unlinked)] + #[sol(rpc)] + ControllerRelayer, + "abi/ControllerRelayer.json" +} pub struct ControllerRelayerClient { - chain_id: usize, + chain_id: u64, controller_relayer_address: Address, - client: Arc, + client: ProviderClientWithSigner, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, } impl ControllerRelayerClient { pub fn new( - chain_id: usize, + chain_id: u64, controller_relayer_address: Address, identity: &GeneralMainChainIdentity, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, ) -> Self { ControllerRelayerClient { chain_id, @@ -60,7 +72,7 @@ impl ControllerRelayerClientBuilder for GeneralRelayedChainIdentity { } } -type ControllerRelayerContract = ControllerRelayer; +type ControllerRelayerContract = ControllerRelayerInstance; #[async_trait] impl ServiceClient for ControllerRelayerClient { @@ -79,18 +91,19 @@ impl TransactionCaller for ControllerRelayerClient {} impl ControllerRelayerTransactions for ControllerRelayerClient { async fn relay_group( &self, - chain_id: usize, + chain_id: u64, group_index: usize, ) -> ContractClientResult { let controller_relayer_contract = ServiceClient::::prepare_service_client(self).await?; - let call = controller_relayer_contract.relay_group(chain_id.into(), group_index.into()); + let call = + controller_relayer_contract.relayGroup(U256::from(chain_id), U256::from(group_index)); ControllerRelayerClient::call_contract_transaction( self.chain_id, "relay_group", - controller_relayer_contract.client_ref(), + controller_relayer_contract.provider(), call, self.contract_transaction_retry_descriptor, false, diff --git a/crates/contract-client/src/ethers/coordinator.rs b/crates/contract-client/src/ethers/coordinator.rs index ca9dd012..3d020c87 100644 --- a/crates/contract-client/src/ethers/coordinator.rs +++ b/crates/contract-client/src/ethers/coordinator.rs @@ -1,43 +1,49 @@ use crate::{ - contract_stub::coordinator::Coordinator, coordinator::{ CoordinatorClientBuilder, CoordinatorTransactions, CoordinatorViews, DKGContractError, }, error::ContractClientResult, + ethers::coordinator::Coordinator::CoordinatorInstance, ServiceClient, TransactionCaller, ViewCaller, }; use ::core::panic; +use alloy::{primitives::Address, rpc::types::TransactionReceipt, sol}; use arpa_core::{ ChainIdentity, ExponentialBackoffRetryDescriptor, GeneralMainChainIdentity, - GeneralRelayedChainIdentity, WsWalletSigner, + GeneralRelayedChainIdentity, ProviderClientWithSigner, }; use async_trait::async_trait; use dkg_core::{ primitives::{BundledJustification, BundledResponses, BundledShares}, BoardPublisher, }; -use ethers::prelude::*; use log::info; -use std::sync::Arc; use threshold_bls::group::Curve; +sol! { + #[sol(ignore_unlinked)] + #[sol(rpc)] + Coordinator, + "abi/Coordinator.json" +} + pub struct CoordinatorClient { - chain_id: usize, + chain_id: u64, coordinator_address: Address, - client: Arc, + client: ProviderClientWithSigner, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, } impl CoordinatorClient { pub fn new( - chain_id: usize, + chain_id: u64, coordinator_address: Address, identity: &GeneralMainChainIdentity, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, ) -> Self { CoordinatorClient { chain_id, @@ -73,7 +79,7 @@ impl CoordinatorClientBuilder for GeneralRelayedChainIden } } -type CoordinatorContract = Coordinator; +type CoordinatorContract = CoordinatorInstance; #[async_trait] impl ServiceClient for CoordinatorClient { @@ -101,7 +107,7 @@ impl CoordinatorTransactions for CoordinatorClient { CoordinatorClient::call_contract_transaction( self.chain_id, "publish", - coordinator_contract.client_ref(), + coordinator_contract.provider(), call, self.contract_transaction_retry_descriptor, true, @@ -120,7 +126,7 @@ impl CoordinatorViews for CoordinatorClient { CoordinatorClient::call_contract_view( self.chain_id, "get_shares", - coordinator_contract.get_shares(), + coordinator_contract.getShares(), self.contract_view_retry_descriptor, ) .await @@ -134,7 +140,7 @@ impl CoordinatorViews for CoordinatorClient { CoordinatorClient::call_contract_view( self.chain_id, "get_responses", - coordinator_contract.get_responses(), + coordinator_contract.getResponses(), self.contract_view_retry_descriptor, ) .await @@ -148,7 +154,7 @@ impl CoordinatorViews for CoordinatorClient { CoordinatorClient::call_contract_view( self.chain_id, "get_justifications", - coordinator_contract.get_justifications(), + coordinator_contract.getJustifications(), self.contract_view_retry_descriptor, ) .await @@ -162,7 +168,7 @@ impl CoordinatorViews for CoordinatorClient { CoordinatorClient::call_contract_view( self.chain_id, "get_participants", - coordinator_contract.get_participants(), + coordinator_contract.getParticipants(), self.contract_view_retry_descriptor, ) .await @@ -175,14 +181,18 @@ impl CoordinatorViews for CoordinatorClient { CoordinatorClient::call_contract_view( self.chain_id, "get_dkg_keys", - coordinator_contract.get_dkg_keys(), + coordinator_contract.getDkgKeys(), self.contract_view_retry_descriptor, ) .await - .map(|(t, keys)| { + .map(|get_dkg_keys_return| { ( - t.as_usize(), - keys.iter().map(|b| b.to_vec()).collect::>>(), + get_dkg_keys_return._0.to::(), + get_dkg_keys_return + ._1 + .iter() + .map(|b| b.to_vec()) + .collect::>>(), // TODO: check if this is correct ) }) } @@ -194,7 +204,7 @@ impl CoordinatorViews for CoordinatorClient { CoordinatorClient::call_contract_view( self.chain_id, "in_phase", - coordinator_contract.in_phase(), + coordinator_contract.inPhase(), self.contract_view_retry_descriptor, ) .await @@ -231,31 +241,32 @@ impl BoardPublisher for CoordinatorClient { #[cfg(test)] pub mod coordinator_tests { - use super::{CoordinatorClient, WsWalletSigner}; - use crate::contract_stub::coordinator::Coordinator; + use super::{CoordinatorClient, ProviderClientWithSigner}; use crate::coordinator::CoordinatorTransactions; use crate::error::ContractClientError; + use crate::ethers::coordinator::Coordinator; + use crate::ethers::coordinator::Coordinator::CoordinatorInstance; + use alloy::node_bindings::Anvil; + use alloy::node_bindings::AnvilInstance; + use alloy::primitives::Address; + use alloy::primitives::U256; + use alloy::providers::WsConnect; + use alloy::signers::local::coins_bip39::English; + use alloy::signers::local::MnemonicBuilder; + use alloy::signers::local::PrivateKeySigner; use arpa_core::build_client; - use arpa_core::eip1559_gas_price_estimator; use arpa_core::Config; use arpa_core::GeneralMainChainIdentity; - use ethers::abi::Tokenize; - use ethers::prelude::ContractError::Revert; - use ethers::prelude::*; - use ethers::signers::coins_bip39::English; - use ethers::utils::Anvil; - use ethers::utils::AnvilInstance; use simple_logger::SimpleLogger; use std::env; use std::path::PathBuf; - use std::{sync::Arc, time::Duration}; + use std::time::Duration; use threshold_bls::schemes::bn254::G2Scheme; #[test] fn test_cargo_manifest_parent_dir() { let dir = env!("CARGO_MANIFEST_DIR"); println!("{:?}", PathBuf::new().join(dir).parent()); - println!("{:?}", (3u8, 10u8).into_tokens()); } const PHRASE: &str = @@ -266,43 +277,45 @@ pub mod coordinator_tests { Anvil::new().chain_id(1u64).mnemonic(PHRASE).spawn() } - async fn deploy_contract(anvil: &AnvilInstance) -> Coordinator { + async fn deploy_contract( + anvil: &AnvilInstance, + ) -> CoordinatorInstance { // 2. instantiate our wallet - let wallet: LocalWallet = anvil.keys()[0].clone().into(); + let wallet: PrivateKeySigner = anvil.keys()[0].clone().into(); // 3. connect to the network - let provider = Arc::new( - Provider::::connect(anvil.ws_endpoint()) - .await - .unwrap() - .interval(Duration::from_millis(3000)), - ); + let ws = + WsConnect::new(anvil.ws_endpoint()).with_retry_interval(Duration::from_millis(3000)); // 4. instantiate the client with the wallet - let client = build_client(wallet, anvil.chain_id() as usize, provider); + let client = build_client(wallet, anvil.chain_id(), ws).await.unwrap(); + + // let client = build_client(wallet, anvil.chain_id() as usize, provider); // 5. deploy contract - let mut call = Coordinator::deploy(client.clone(), (3u8, 30u8)).unwrap(); + let instance = Coordinator::deploy(client.clone(), U256::from(3u8), U256::from(30u8)) + .await + .unwrap(); - if let Some(tx) = call.deployer.tx.as_eip1559_mut() { - let (max_fee, max_priority_fee) = client - .estimate_eip1559_fees(Some(eip1559_gas_price_estimator)) - .await - .unwrap(); - tx.max_fee_per_gas = Some(max_fee); - tx.max_priority_fee_per_gas = Some(max_priority_fee); - } + // if let Some(tx) = call.deployer.tx.as_eip1559_mut() { + // let (max_fee, max_priority_fee) = client + // .estimate_eip1559_fees(Some(eip1559_gas_price_estimator)) + // .await + // .unwrap(); + // tx.max_fee_per_gas = Some(max_fee); + // tx.max_priority_fee_per_gas = Some(max_priority_fee); + // } - let coordinator_contract = call.send().await.unwrap(); + // let coordinator_contract = call.send().await.unwrap(); - coordinator_contract + instance } #[tokio::test] async fn test_coordinator_in_phase() { let anvil = start_chain(); let coordinator_contract = deploy_contract(&anvil).await; - let res = coordinator_contract.in_phase().call().await.unwrap(); + let res = coordinator_contract.inPhase().call().await.unwrap(); println!("{:?}", res); } @@ -332,35 +345,29 @@ pub mod coordinator_tests { let nodes = vec![wallet.address()]; let public_keys = vec![bincode::serialize(&dkg_public_key).unwrap().into()]; - let mut call = coordinator_contract.initialize(nodes, public_keys); - - if let Some(tx) = call.tx.as_eip1559_mut() { - let (max_fee, max_priority_fee) = coordinator_contract - .client_ref() - .estimate_eip1559_fees(Some(eip1559_gas_price_estimator)) - .await - .unwrap(); - tx.max_fee_per_gas = Some(max_fee); - tx.max_priority_fee_per_gas = Some(max_priority_fee); - } + let pending_tx = coordinator_contract + .initialize(nodes, public_keys) + .send() + .await + .unwrap(); + pending_tx.get_receipt().await.unwrap(); - call.send().await.unwrap(); + let ws_connect = + WsConnect::new(anvil.ws_endpoint()).with_retry_interval(Duration::from_millis(3000)); - let provider = Arc::new( - Provider::::connect(anvil.ws_endpoint()) - .await - .unwrap() - .interval(Duration::from_millis(3000)), - ); + let client = build_client(wallet.clone(), anvil.chain_id(), ws_connect.clone()) + .await + .unwrap(); let main_chain_identity = GeneralMainChainIdentity::new( - anvil.chain_id() as usize, + anvil.chain_id(), wallet, - provider, + ws_connect, + client, anvil.ws_endpoint(), - Address::random(), - Address::random(), - Address::random(), + Address::ZERO, + Address::ZERO, + Address::ZERO, config .get_time_limits() .contract_transaction_retry_descriptor, @@ -369,8 +376,8 @@ pub mod coordinator_tests { ); let client = CoordinatorClient::new( - anvil.chain_id() as usize, - coordinator_contract.address(), + anvil.chain_id(), + *coordinator_contract.address(), &main_chain_identity, config .get_time_limits() @@ -385,13 +392,24 @@ pub mod coordinator_tests { let res = client.publish(mock_value.clone()).await; assert!(res.is_err()); - if let ContractClientError::WsContractError(Revert(bytes)) = res.unwrap_err() { - let error_msg = String::decode_with_selector(&bytes).unwrap(); - assert_eq!("share existed", error_msg); - } else { - panic!("should be revert error") + if let ContractClientError::TransportError(error) = res.unwrap_err() { + if error.is_error_resp() { + let error_msg = error.as_error_resp().unwrap().to_string(); + assert!(error_msg.contains("share existed")); + } else { + panic!("should be revert error") + } } } + // if let ContractClientError::TransportError(error if error.is_error_resp()) = + // res.unwrap_err() + // { + // let error_msg = error.as_error_resp().unwrap().to_string(); + // assert!(error_msg.contains("share existed")); + // } else { + // panic!("should be revert error") + // } + // } #[test] fn test_three_ways_to_provide_wallet() { @@ -411,7 +429,7 @@ pub mod coordinator_tests { .unwrap(); // 2.private key in plaintext - let wallet2: LocalWallet = + let wallet2: PrivateKeySigner = "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318" .parse() .unwrap(); @@ -420,12 +438,13 @@ pub mod coordinator_tests { let path = PathBuf::new().join(env!("CARGO_MANIFEST_DIR")); let mut rng = rand::thread_rng(); let (_key, _uuid) = - LocalWallet::new_keystore(&path, &mut rng, "randpsswd", Some("passwd")).unwrap(); + PrivateKeySigner::new_keystore(&path, &mut rng, "randpsswd", Some("passwd")).unwrap(); // read from the encrypted JSON keystore and decrypt it, while validating that the // signatures produced by both the keys should match - let wallet3 = LocalWallet::decrypt_keystore(&path.join("passwd"), "randpsswd").unwrap(); + let wallet3 = + PrivateKeySigner::decrypt_keystore(&path.join("passwd"), "randpsswd").unwrap(); // let signature2 = key2.sign_message(message).await.unwrap(); println!("{:?}", wallet1); diff --git a/crates/contract-client/src/ethers/ierc20.rs b/crates/contract-client/src/ethers/ierc20.rs new file mode 100644 index 00000000..60075663 --- /dev/null +++ b/crates/contract-client/src/ethers/ierc20.rs @@ -0,0 +1,8 @@ +use alloy::sol; + +sol! { + #[sol(ignore_unlinked)] + #[sol(rpc)] + IERC20, + "abi/IERC20.json" +} diff --git a/crates/contract-client/src/ethers/mod.rs b/crates/contract-client/src/ethers/mod.rs index 0c5ed4f3..62d87f7d 100644 --- a/crates/contract-client/src/ethers/mod.rs +++ b/crates/contract-client/src/ethers/mod.rs @@ -1,27 +1,212 @@ +use crate::ethers::controller::IController::{ + Group as ControllerContractGroup, Member as ControllerContractMember, +}; +use crate::ethers::controller_oracle::IControllerOracle::{ + Group as ControllerOracleContractGroup, Member as ControllerOracleContractMember, +}; +use alloy::primitives::{Address, U256}; +use arpa_core::{u256_to_vec, Group, Member}; +use std::collections::BTreeMap; +use std::marker::PhantomData; +use threshold_bls::group::Curve; + pub mod adapter; +pub mod avs_directory; pub mod controller; pub mod controller_oracle; pub mod controller_relayer; pub mod coordinator; +pub mod ierc20; pub mod node_registry; pub mod provider; +pub mod service_manager; +pub mod staking; + +pub fn parse_controller_oracle_contract_member( + cm: ControllerOracleContractMember, + index: usize, +) -> Member { + let partial_public_key = + if cm.partialPublicKey.is_empty() || cm.partialPublicKey[0] == U256::ZERO { + None + } else { + let bytes = cm + .partialPublicKey + .iter() + .map(u256_to_vec) + .reduce(|mut acc, mut e| { + acc.append(&mut e); + acc + }) + .unwrap(); + Some(bincode::deserialize(&bytes).unwrap()) + }; + + Member { + index, + dkg_index: Some(0), + id_address: cm.nodeIdAddress, + rpc_endpoint: None, + partial_public_key, + } +} + +pub fn parse_controller_contract_member( + cm: ControllerContractMember, + index: usize, +) -> Member { + let partial_public_key = + if cm.partialPublicKey.is_empty() || cm.partialPublicKey[0] == U256::ZERO { + None + } else { + let bytes = cm + .partialPublicKey + .iter() + .map(u256_to_vec) + .reduce(|mut acc, mut e| { + acc.append(&mut e); + acc + }) + .unwrap(); + Some(bincode::deserialize(&bytes).unwrap()) + }; + + Member { + index, + dkg_index: Some(0), + id_address: cm.nodeIdAddress, + rpc_endpoint: None, + partial_public_key, + } +} + +pub fn parse_controller_oracle_contract_group( + cg: ControllerOracleContractGroup, +) -> Group { + let ControllerOracleContractGroup { + index, + epoch, + size, + threshold, + publicKey, + members, + committers, + commitCacheList: _, + isStrictlyMajorityConsensusReached, + } = cg; + + let members: BTreeMap> = members + .into_iter() + .enumerate() + .map(|(index, cm)| { + ( + cm.nodeIdAddress, + parse_controller_oracle_contract_member(cm, index), + ) + }) + .collect(); + + let public_key = if publicKey.is_empty() || publicKey[0] == U256::ZERO { + None + } else { + let bytes = publicKey + .iter() + .map(u256_to_vec) + .reduce(|mut acc, mut e| { + acc.append(&mut e); + acc + }) + .unwrap(); + Some(bincode::deserialize(&bytes).unwrap()) + }; + + Group { + index: index.to::(), + epoch: epoch.to::(), + size: size.to::(), + threshold: threshold.to::(), + state: isStrictlyMajorityConsensusReached, + public_key, + members, + committers, + c: PhantomData, + } +} + +pub fn parse_controller_contract_group(cg: ControllerContractGroup) -> Group { + let ControllerContractGroup { + index, + epoch, + size, + threshold, + publicKey, + members, + committers, + commitCacheList: _, + isStrictlyMajorityConsensusReached, + } = cg; + + let members: BTreeMap> = members + .into_iter() + .enumerate() + .map(|(index, cm)| { + ( + cm.nodeIdAddress, + parse_controller_contract_member(cm, index), + ) + }) + .collect(); + + let public_key = if publicKey.is_empty() || publicKey[0] == U256::ZERO { + None + } else { + let bytes = publicKey + .iter() + .map(u256_to_vec) + .reduce(|mut acc, mut e| { + acc.append(&mut e); + acc + }) + .unwrap(); + Some(bincode::deserialize(&bytes).unwrap()) + }; + + Group { + index: index.to::(), + epoch: epoch.to::(), + size: size.to::(), + threshold: threshold.to::(), + state: isStrictlyMajorityConsensusReached, + public_key, + members, + committers, + c: PhantomData, + } +} #[cfg(test)] pub mod contract_interaction_tests { + use alloy::eips::eip1559::Eip1559Estimation; + use alloy::providers::utils::Eip1559Estimator; + use alloy::providers::Provider; + use alloy::providers::ProviderBuilder; use arpa_core::eip1559_gas_price_estimator; - use ethers::providers::{Http, Middleware, Provider}; #[tokio::test] async fn test_estimate_eip1559_fees() -> Result<(), anyhow::Error> { - let provider = Provider::::try_from("https://eth.llamarpc.com") - .expect("could not instantiate HTTP Provider"); + let provider = ProviderBuilder::new().connect_http("https://eth.llamarpc.com".parse()?); - let (max_fee, max_priority_fee) = provider - .estimate_eip1559_fees(Some(eip1559_gas_price_estimator)) + let Eip1559Estimation { + max_fee_per_gas, + max_priority_fee_per_gas, + } = provider + .estimate_eip1559_fees_with(Eip1559Estimator::Custom(Box::new( + eip1559_gas_price_estimator, + ))) .await?; - println!("max_fee: {:?}", max_fee); - println!("max_priority_fee: {:?}", max_priority_fee); + println!("max_fee: {:?}", max_fee_per_gas); + println!("max_priority_fee: {:?}", max_priority_fee_per_gas); Ok(()) } diff --git a/crates/contract-client/src/ethers/node_registry.rs b/crates/contract-client/src/ethers/node_registry.rs index 23ec4f84..36d15812 100644 --- a/crates/contract-client/src/ethers/node_registry.rs +++ b/crates/contract-client/src/ethers/node_registry.rs @@ -1,39 +1,60 @@ use crate::{ - contract_stub::{ - i_controller::SignatureWithSaltAndExpiry, iavs_directory, node_registry::NodeRegistry, + // contract_stub::{ + // i_controller::SignatureWithSaltAndExpiry, iavs_directory, node_registry::NodeRegistry, + // service_manager, + // }, + error::ContractClientResult, + ethers::{ + avs_directory, + node_registry::{ + INodeRegistry::INodeRegistryInstance, ISignatureUtils::SignatureWithSaltAndExpiry, + }, service_manager, }, - error::ContractClientResult, node_registry::{NodeRegistryClientBuilder, NodeRegistryTransactions, NodeRegistryViews}, ServiceClient, }; use crate::{TransactionCaller, ViewCaller}; +use alloy::{ + eips::BlockNumberOrTag, + primitives::{Address, U256}, + rpc::types::TransactionReceipt, + signers::local::PrivateKeySigner, + sol, +}; +use alloy::{providers::Provider, signers::SignerSync}; use arpa_core::{ ChainIdentity, ExponentialBackoffRetryDescriptor, GeneralMainChainIdentity, - GeneralRelayedChainIdentity, Node, WsWalletSigner, + GeneralRelayedChainIdentity, Node, ProviderClientWithSigner, }; use async_trait::async_trait; -use ethers::{core::rand::Rng, prelude::*}; -use std::sync::Arc; +use rand::Rng; + +sol! { + #[sol(ignore_unlinked)] + #[sol(rpc)] + INodeRegistry, + "abi/INodeRegistry.json" +} pub struct NodeRegistryClient { - chain_id: usize, + chain_id: u64, id_address: Address, node_registry_address: Address, - client: Arc, + client: ProviderClientWithSigner, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, } impl NodeRegistryClient { pub fn new( - chain_id: usize, + chain_id: u64, node_registry_address: Address, identity: &GeneralMainChainIdentity, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, ) -> Self { NodeRegistryClient { chain_id, @@ -49,40 +70,48 @@ impl NodeRegistryClient { async fn build_signature_with_salt_and_expiry( &self, node_registry_contract: &NodeRegistryContract, - signer: &LocalWallet, + signer: &PrivateKeySigner, ) -> ContractClientResult { - let service_manager_address = node_registry_contract.get_node_registry_config().await?.2; + let service_manager_address = node_registry_contract + .getNodeRegistryConfig() + .call() + .await? + .serviceManagerContractAddress; let service_manager_contract = service_manager::ServiceManager::new(service_manager_address, self.client.clone()); - let avs_directory_address = service_manager_contract.avs_directory().await?; + let avs_directory_address = service_manager_contract.avsDirectory().call().await?; let avs_directory_contract = - iavs_directory::IAVSDirectory::new(avs_directory_address, self.client.clone()); + avs_directory::IAVSDirectory::new(avs_directory_address, self.client.clone()); // generate random salt - let salt = rand::thread_rng().gen::<[u8; 32]>(); + let salt = rand::thread_rng().gen::<[u8; 32]>().into(); let expiry = self .client - .provider() - .get_block(BlockNumber::Latest) + .get_block(alloy::eips::BlockId::Number(BlockNumberOrTag::Latest)) .await - .map(|o| o.map(|b| b.timestamp))? + .map(|o| o.map(|b| b.header.timestamp))? .unwrap() + 1000; let digest_hash = avs_directory_contract - .calculate_operator_avs_registration_digest_hash( + .calculateOperatorAVSRegistrationDigestHash( signer.address(), service_manager_address, salt, - expiry, + U256::from(expiry), ) + .call() .await?; - let signature = signer.sign_hash(digest_hash.into())?.to_vec().into(); + let signature = signer + .sign_hash_sync(&digest_hash)? + .as_bytes() + .to_vec() + .into(); Ok(SignatureWithSaltAndExpiry { signature, salt, - expiry, + expiry: U256::from(expiry), }) } } @@ -110,13 +139,13 @@ impl NodeRegistryClientBuilder for GeneralRelayedChainIdentity { } } -type NodeRegistryContract = NodeRegistry; +type NodeRegistryContract = INodeRegistryInstance; #[async_trait] impl ServiceClient for NodeRegistryClient { async fn prepare_service_client(&self) -> ContractClientResult { let node_registry_contract = - NodeRegistry::new(self.node_registry_address, self.client.clone()); + INodeRegistry::new(self.node_registry_address, self.client.clone()); Ok(node_registry_contract) } @@ -133,7 +162,7 @@ impl NodeRegistryTransactions for NodeRegistryClient { async fn node_register_as_eigenlayer_operator( &self, id_public_key: Vec, - asset_account_signer: &LocalWallet, + asset_account_signer: &PrivateKeySigner, ) -> ContractClientResult { let node_registry_contract = ServiceClient::::prepare_service_client(self).await?; @@ -142,7 +171,7 @@ impl NodeRegistryTransactions for NodeRegistryClient { .build_signature_with_salt_and_expiry(&node_registry_contract, asset_account_signer) .await?; - let call = node_registry_contract.node_register( + let call = node_registry_contract.nodeRegister( id_public_key.into(), true, asset_account_signer.address(), @@ -152,7 +181,7 @@ impl NodeRegistryTransactions for NodeRegistryClient { NodeRegistryClient::call_contract_transaction( self.chain_id, "node_register", - node_registry_contract.client_ref(), + node_registry_contract.provider(), call, self.contract_transaction_retry_descriptor, true, @@ -168,21 +197,21 @@ impl NodeRegistryTransactions for NodeRegistryClient { let node_registry_contract = ServiceClient::::prepare_service_client(self).await?; - let call = node_registry_contract.node_register( + let call = node_registry_contract.nodeRegister( id_public_key.into(), false, self.id_address, SignatureWithSaltAndExpiry { signature: vec![0u8; 65].into(), - salt: [0u8; 32], - expiry: 0u64.into(), + salt: [0u8; 32].into(), + expiry: U256::ZERO, }, ); NodeRegistryClient::call_contract_transaction( self.chain_id, "node_register", - node_registry_contract.client_ref(), + node_registry_contract.provider(), call, self.contract_transaction_retry_descriptor, true, @@ -193,7 +222,7 @@ impl NodeRegistryTransactions for NodeRegistryClient { async fn node_activate_as_eigenlayer_operator( &self, - asset_account_signer: &LocalWallet, + asset_account_signer: &PrivateKeySigner, ) -> ContractClientResult { let node_registry_contract = ServiceClient::::prepare_service_client(self).await?; @@ -202,12 +231,12 @@ impl NodeRegistryTransactions for NodeRegistryClient { .build_signature_with_salt_and_expiry(&node_registry_contract, asset_account_signer) .await?; - let call = node_registry_contract.node_activate(signature); + let call = node_registry_contract.nodeActivate(signature); NodeRegistryClient::call_contract_transaction( self.chain_id, "node_activate", - node_registry_contract.client_ref(), + node_registry_contract.provider(), call, self.contract_transaction_retry_descriptor, true, @@ -222,16 +251,16 @@ impl NodeRegistryTransactions for NodeRegistryClient { let node_registry_contract = ServiceClient::::prepare_service_client(self).await?; - let call = node_registry_contract.node_activate(SignatureWithSaltAndExpiry { + let call = node_registry_contract.nodeActivate(SignatureWithSaltAndExpiry { signature: vec![0u8; 65].into(), - salt: [0u8; 32], - expiry: 0u64.into(), + salt: [0u8; 32].into(), + expiry: U256::ZERO, }); NodeRegistryClient::call_contract_transaction( self.chain_id, "node_activate", - node_registry_contract.client_ref(), + node_registry_contract.provider(), call, self.contract_transaction_retry_descriptor, true, @@ -250,16 +279,16 @@ impl NodeRegistryViews for NodeRegistryClient { NodeRegistryClient::call_contract_view( self.chain_id, "get_node", - node_registry_contract.get_node(id_address), + node_registry_contract.getNode(id_address), self.contract_view_retry_descriptor, ) .await .map(|n| Node { - id_address: n.id_address, - id_public_key: n.dkg_public_key.to_vec(), - is_eigenlayer_node: n.is_eigenlayer_node, + id_address: n.idAddress, + id_public_key: n.dkgPublicKey.to_vec(), + is_eigenlayer_node: n.isEigenlayerNode, state: n.state, - pending_until_block: n.pending_until_block.as_usize(), + pending_until_block: n.pendingUntilBlock.to::(), }) } } diff --git a/crates/contract-client/src/ethers/provider.rs b/crates/contract-client/src/ethers/provider.rs index 2d75b9e9..62eabb42 100644 --- a/crates/contract-client/src/ethers/provider.rs +++ b/crates/contract-client/src/ethers/provider.rs @@ -2,12 +2,14 @@ use crate::{ error::{ContractClientError, ContractClientResult}, provider::BlockFetcher, }; +use alloy::providers::Provider; +use arpa_core::ProviderClientWithSigner; use async_trait::async_trait; -use ethers::prelude::*; +use futures_util::StreamExt; use std::future::Future; #[async_trait] -impl BlockFetcher for Provider { +impl BlockFetcher for ProviderClientWithSigner { async fn subscribe_new_block_height< C: FnMut(usize) -> F + Send, F: Future> + Send, @@ -15,13 +17,10 @@ impl BlockFetcher for Provider { &self, mut cb: C, ) -> ContractClientResult<()> { - let mut stream = self.subscribe_blocks().await?; + let mut stream = self.subscribe_blocks().await?.into_stream(); + while let Some(block) = stream.next().await { - cb(block - .number - .ok_or(ContractClientError::FetchingBlockError)? - .as_usize()) - .await?; + cb(block.number as usize).await?; } Err(ContractClientError::FetchingBlockError) } diff --git a/crates/contract-client/src/ethers/service_manager.rs b/crates/contract-client/src/ethers/service_manager.rs new file mode 100644 index 00000000..5cc69b76 --- /dev/null +++ b/crates/contract-client/src/ethers/service_manager.rs @@ -0,0 +1,8 @@ +use alloy::sol; + +sol! { + #[sol(ignore_unlinked)] + #[sol(rpc)] + ServiceManager, + "abi/ServiceManager.json" +} diff --git a/crates/contract-client/src/ethers/staking.rs b/crates/contract-client/src/ethers/staking.rs new file mode 100644 index 00000000..4310fe8a --- /dev/null +++ b/crates/contract-client/src/ethers/staking.rs @@ -0,0 +1,8 @@ +use alloy::sol; + +sol! { + #[sol(ignore_unlinked)] + #[sol(rpc)] + Staking, + "abi/Staking.json" +} diff --git a/crates/contract-client/src/lib.rs b/crates/contract-client/src/lib.rs index 78a2f1a2..b2167d85 100644 --- a/crates/contract-client/src/lib.rs +++ b/crates/contract-client/src/lib.rs @@ -1,12 +1,15 @@ +#![allow(clippy::large_enum_variant)] +#![allow(clippy::too_many_arguments)] use crate::error::ContractClientError; -use ::ethers::abi::Detokenize; -use ::ethers::prelude::builders::ContractCall; -use ::ethers::prelude::ContractError; -use ::ethers::providers::{Middleware, ProviderError}; -use ::ethers::types::{BlockNumber, TransactionReceipt, U256, U64}; +use alloy::contract::{CallBuilder, CallDecoder}; +use alloy::eips::eip1559::Eip1559Estimation; +use alloy::eips::BlockNumberOrTag; +use alloy::providers::utils::Eip1559Estimator; +use alloy::providers::Provider; +use alloy::rpc::types::TransactionReceipt; use arpa_core::{ eip1559_gas_price_estimator, fallback_eip1559_gas_price_estimator, jitter, supports_eip1559, - ExponentialBackoffRetryDescriptor, + ExponentialBackoffRetryDescriptor, ProviderClientWithSigner, }; use async_trait::async_trait; use error::ContractClientResult; @@ -14,7 +17,6 @@ use log::{error, info}; use tokio_retry::strategy::ExponentialBackoff; use tokio_retry::{Retry, RetryIf}; -pub mod contract_stub; pub mod error; pub mod ethers; @@ -26,19 +28,19 @@ pub trait ServiceClient { #[async_trait] pub trait TransactionCaller { async fn call_contract_transaction< - M: Middleware, - D: Detokenize + std::fmt::Debug + Send + Sync + 'static, + P: Provider, + D: CallDecoder + std::fmt::Debug + Send + Sync + 'static, >( - chain_id: usize, + chain_id: u64, info: &str, - client: &M, - mut call: ContractCall, + client: &ProviderClientWithSigner, + call: CallBuilder, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, retry_on_transaction_fail: bool, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, ) -> ContractClientResult - where - ContractClientError: From>, +// where + // ContractClientError: From>, { let retry_strategy = ExponentialBackoff::from_millis(contract_transaction_retry_descriptor.base) @@ -52,47 +54,57 @@ pub trait TransactionCaller { }) .take(contract_transaction_retry_descriptor.max_attempts); + let mut tx = call.into_transaction_request(); + // transform the trx to legacy if the chain does not support EIP-1559 if !supports_eip1559(chain_id) { - call = call.legacy(); + // call = call.legacy(); if let Some(max_priority_fee_per_gas) = max_priority_fee_per_gas { - call = call.gas_price(max_priority_fee_per_gas); + tx.gas_price = Some(max_priority_fee_per_gas); } } // set gas price for EIP-1559 trxs - else if let Some(tx) = call.tx.as_eip1559_mut() { + else if tx.has_eip1559_fields() { let (max_fee, max_priority_fee) = match client - .estimate_eip1559_fees(Some(eip1559_gas_price_estimator)) + .estimate_eip1559_fees_with(Eip1559Estimator::Custom(Box::new( + eip1559_gas_price_estimator, + ))) .await { // if max_priority_fee is zero, it usually means that the chain is a testnet, // we will use the legacy method to set a priority fee, to avoid the transaction being underpriced - Ok((max_fee, max_priority_fee)) if !max_priority_fee.is_zero() => { - (max_fee, max_priority_fee) - } + Ok(Eip1559Estimation { + max_fee_per_gas: max_fee, + max_priority_fee_per_gas, + }) if max_priority_fee_per_gas != 0 => (max_fee, max_priority_fee_per_gas), _ => { // try to estimate the gas price using the legacy method let base_fee_per_gas = client - .get_block(BlockNumber::Latest) - .await - .map_err(ContractError::from_middleware_error)? - .ok_or_else(|| ProviderError::CustomError("Latest block not found".into()))? + .get_block(alloy::eips::BlockId::Number(BlockNumberOrTag::Latest)) + .await? + .ok_or_else(|| { + ContractClientError::CustomError("Latest block not found".into()) + })? + .header .base_fee_per_gas .ok_or_else(|| { - ProviderError::CustomError("EIP-1559 not activated".into()) + ContractClientError::CustomError("EIP-1559 not activated".into()) })?; - let gas_price = client - .get_gas_price() - .await - .map_err(ContractError::from_middleware_error)?; + let gas_price = client.get_gas_price().await?; + // .map_err(ContractError::from_middleware_error)?; - fallback_eip1559_gas_price_estimator( - base_fee_per_gas, - gas_price - base_fee_per_gas, - ) + let Eip1559Estimation { + max_fee_per_gas, + max_priority_fee_per_gas, + } = fallback_eip1559_gas_price_estimator( + base_fee_per_gas as u128, + gas_price - base_fee_per_gas as u128, + ); + (max_fee_per_gas, max_priority_fee_per_gas) } }; + if let Some(max_priority_fee_per_gas) = max_priority_fee_per_gas { tx.max_priority_fee_per_gas = Some(max_priority_fee_per_gas); if max_priority_fee_per_gas > max_priority_fee { @@ -110,10 +122,7 @@ pub trait TransactionCaller { let transaction_receipt = RetryIf::spawn( retry_strategy, || async { - let pending_tx = call.send().await.map_err(|e| { - let e: ContractClientError = e.into(); - e - })?; + let pending_tx = client.send_transaction(tx.clone()).await?; info!( "Calling contract transaction {} with chain_id({}): {:?}", @@ -122,15 +131,9 @@ pub trait TransactionCaller { pending_tx.tx_hash() ); - let receipt = pending_tx - .await - .map_err(|e| { - let e: ContractClientError = e.into(); - e - })? - .ok_or(ContractClientError::NoTransactionReceipt)?; + let receipt = pending_tx.get_receipt().await?; - if receipt.status == Some(U64::from(0)) { + if !receipt.status() { error!( "Transaction failed({}) with chain_id({}), receipt: {:?}", info, chain_id, receipt @@ -158,17 +161,14 @@ pub trait TransactionCaller { #[async_trait] pub trait ViewCaller { async fn call_contract_view< - M: Middleware, - D: Detokenize + std::fmt::Debug + Send + Sync + 'static, + P: Provider, + D: CallDecoder + Unpin + std::fmt::Debug + Send + Sync + 'static, >( - chain_id: usize, + chain_id: u64, info: &str, - call: ContractCall, + call: CallBuilder, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - ) -> ContractClientResult - where - ContractClientError: From>, - { + ) -> ContractClientResult { let retry_strategy = ExponentialBackoff::from_millis(contract_view_retry_descriptor.base) .factor(contract_view_retry_descriptor.factor) .map(|e| { @@ -181,33 +181,29 @@ pub trait ViewCaller { .take(contract_view_retry_descriptor.max_attempts); let res = Retry::spawn(retry_strategy, || async { - let result = call.call().await.map_err(|e| { - let e: ContractClientError = e.into(); - e - })?; + let result = call.call().await?; info!( - "Calling contract view {} with chain_id({}), calldata: {:?}, result: {:?}", + "Calling contract view {} with chain_id({}), calldata: {:?}", info, chain_id, call.calldata(), - result ); - Result::::Ok(result) + Result::::Ok(result) }) .await?; Ok(res) } - async fn call_contract_view_without_log( - call: ContractCall, + async fn call_contract_view_without_log< + P: Provider, + D: CallDecoder + Unpin + std::fmt::Debug + Send + Sync + 'static, + >( + call: CallBuilder, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - ) -> ContractClientResult - where - ContractClientError: From>, - { + ) -> ContractClientResult { let retry_strategy = ExponentialBackoff::from_millis(contract_view_retry_descriptor.base) .factor(contract_view_retry_descriptor.factor) .map(|e| { @@ -220,12 +216,9 @@ pub trait ViewCaller { .take(contract_view_retry_descriptor.max_attempts); let res = Retry::spawn(retry_strategy, || async { - let result = call.call().await.map_err(|e| { - let e: ContractClientError = e.into(); - e - })?; + let result = call.call().await?; - Result::::Ok(result) + Result::::Ok(result) }) .await?; @@ -235,18 +228,18 @@ pub trait ViewCaller { pub mod node_registry { use crate::error::ContractClientResult; + use alloy::primitives::Address; + use alloy::rpc::types::TransactionReceipt; + use alloy::signers::local::PrivateKeySigner; use arpa_core::Node; use async_trait::async_trait; - use ethers::core::types::Address; - use ethers::signers::LocalWallet; - use ethers::types::TransactionReceipt; #[async_trait] pub trait NodeRegistryTransactions { async fn node_register_as_eigenlayer_operator( &self, id_public_key: Vec, - asset_account_signer: &LocalWallet, + asset_account_signer: &PrivateKeySigner, ) -> ContractClientResult; async fn node_register_by_consistent_native_staking( @@ -256,7 +249,7 @@ pub mod node_registry { async fn node_activate_as_eigenlayer_operator( &self, - asset_account_signer: &LocalWallet, + asset_account_signer: &PrivateKeySigner, ) -> ContractClientResult; async fn node_activate_by_consistent_native_staking( @@ -281,10 +274,10 @@ pub mod node_registry { pub mod controller { use crate::error::ContractClientResult; + use alloy::primitives::Address; + use alloy::rpc::types::TransactionReceipt; use arpa_core::{DKGTask, Group}; use async_trait::async_trait; - use ethers::core::types::Address; - use ethers::types::TransactionReceipt; use std::future::Future; use threshold_bls::group::Curve; @@ -339,9 +332,10 @@ pub mod controller { pub mod controller_oracle { use crate::error::ContractClientResult; + use alloy::primitives::Address; + use alloy::rpc::types::TransactionReceipt; use arpa_core::Group; use async_trait::async_trait; - use ethers::types::{Address, TransactionReceipt}; use threshold_bls::group::Curve; #[async_trait] @@ -366,14 +360,14 @@ pub mod controller_oracle { pub mod controller_relayer { use crate::error::ContractClientResult; + use alloy::rpc::types::TransactionReceipt; use async_trait::async_trait; - use ethers::types::TransactionReceipt; #[async_trait] pub trait ControllerRelayerTransactions { async fn relay_group( &self, - chain_id: usize, + chain_id: u64, group_index: usize, ) -> ContractClientResult; } @@ -386,9 +380,10 @@ pub mod controller_relayer { } pub mod coordinator { + use alloy::primitives::Address; + use alloy::rpc::types::TransactionReceipt; use async_trait::async_trait; use dkg_core::BoardPublisher; - use ethers::{core::types::Address, types::TransactionReceipt}; use thiserror::Error; use threshold_bls::group::Curve; @@ -446,10 +441,10 @@ pub mod coordinator { } pub mod adapter { + use alloy::primitives::{Address, U256}; + use alloy::rpc::types::TransactionReceipt; use arpa_core::{PartialSignature, RandomnessTask}; use async_trait::async_trait; - use ethers::core::types::Address; - use ethers::types::{TransactionReceipt, U256}; use std::collections::BTreeMap; use std::future::Future; diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index c382b97b..b99efe71 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -14,10 +14,8 @@ exclude.workspace = true [dependencies] threshold-bls.workspace = true -ethers-providers = { workspace = true, features = ["rustls", "ws"] } -ethers-core.workspace = true -ethers-signers.workspace = true -ethers-middleware.workspace = true +futures-util = "0.3" +alloy = { workspace = true, features = ["full", "signer-keystore", "signer-mnemonic"] } thiserror = "1.0.15" serde = "1.0.106" log = "0.4" @@ -32,6 +30,12 @@ serde_json = "1.0.53" serde_yaml = "0.8" parking_lot = "0.12.0" lazy_static = "1.4.0" +rand = "0.8" + +[dev-dependencies] +tokio = { version = "1.37.0", features = ["full"] } +alloy = { workspace = true, features = ["full", "signer-keystore", "signer-mnemonic", "provider-anvil-node"] } + [lib] name = "arpa_core" diff --git a/crates/core/src/log/encoder.rs b/crates/core/src/log/encoder.rs index 5a153c89..49b1c981 100644 --- a/crates/core/src/log/encoder.rs +++ b/crates/core/src/log/encoder.rs @@ -49,14 +49,14 @@ lazy_static! { #[derive(Clone, Debug, Default)] pub struct JsonEncoder { node_id: String, - l1_chain_id: usize, + l1_chain_id: u64, show_context: bool, version: String, } impl JsonEncoder { /// Returns a new `JsonEncoder` with a default configuration. - pub fn new(node_id: String, l1_chain_id: usize, version: String) -> Self { + pub fn new(node_id: String, l1_chain_id: u64, version: String) -> Self { JsonEncoder { node_id, l1_chain_id, @@ -136,7 +136,7 @@ struct Message<'a> { thread: Option<&'a str>, thread_id: usize, node_id: &'a str, - l1_chain_id: usize, + l1_chain_id: u64, mdc: Mdc, node_info: &'a str, group_info: &'a str, diff --git a/crates/core/src/log/mod.rs b/crates/core/src/log/mod.rs index a080e6a0..1a2c2303 100644 --- a/crates/core/src/log/mod.rs +++ b/crates/core/src/log/mod.rs @@ -1,8 +1,7 @@ use crate::ser_bytes_in_hex_string; -use crate::ser_u256_in_dec_string; use crate::Group; use crate::TaskType; -use ethers_core::types::{Address, H256, U256}; +use alloy::primitives::{Address, B256}; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; use std::fmt::Display; @@ -48,7 +47,7 @@ pub enum LogType { pub struct Payload<'a> { pub log_type: LogType, pub message: &'a str, - pub chain_id: Option, + pub chain_id: Option, pub group_log: Option, pub task_log: Option>, pub transaction_receipt_log: Option, @@ -70,7 +69,7 @@ pub struct GroupLog { pub public_key: Option, pub members: Vec, pub committers: Vec
, - pub relayed_chain_id: Option, + pub relayed_chain_id: Option, } #[derive(Serialize, Deserialize, Debug)] @@ -117,14 +116,16 @@ pub struct TaskLog<'a> { #[derive(Serialize, Deserialize, Debug)] pub struct TransactionReceiptLog { - pub transaction_hash: H256, - #[serde(serialize_with = "ser_u256_in_dec_string")] - pub gas_used: U256, - #[serde(serialize_with = "ser_u256_in_dec_string")] - pub effective_gas_price: U256, + pub transaction_hash: B256, + pub gas_used: u64, + pub effective_gas_price: u128, } -pub fn build_general_payload(log_type: LogType, message: &str, chain_id: Option) -> Payload { +pub fn build_general_payload<'a>( + log_type: LogType, + message: &'a str, + chain_id: Option, +) -> Payload<'a> { Payload { log_type, message, @@ -138,7 +139,7 @@ pub fn build_general_payload(log_type: LogType, message: &str, chain_id: Option< pub fn build_group_related_payload<'a, C: Curve>( log_type: LogType, message: &'a str, - chain_id: usize, + chain_id: u64, group: &'a Group, ) -> Payload<'a> { Payload { @@ -154,7 +155,7 @@ pub fn build_group_related_payload<'a, C: Curve>( pub fn build_task_related_payload<'a>( log_type: LogType, message: &'a str, - chain_id: usize, + chain_id: u64, request_id: &'a [u8], task_type: TaskType, task_json: Value, @@ -175,14 +176,14 @@ pub fn build_task_related_payload<'a>( } } -pub fn build_transaction_receipt_payload( +pub fn build_transaction_receipt_payload<'a>( log_type: LogType, - message: &str, - chain_id: usize, - transaction_hash: H256, - gas_used: U256, - effective_gas_price: U256, -) -> Payload { + message: &'a str, + chain_id: u64, + transaction_hash: B256, + gas_used: u64, + effective_gas_price: u128, +) -> Payload<'a> { Payload { log_type, message, @@ -201,12 +202,12 @@ pub fn build_transaction_receipt_payload( pub fn build_group_related_transaction_receipt_payload<'a, C: Curve>( log_type: LogType, message: &'a str, - chain_id: usize, + chain_id: u64, group: &'a Group, - relayed_chain_id: Option, - transaction_hash: H256, - gas_used: U256, - effective_gas_price: U256, + relayed_chain_id: Option, + transaction_hash: B256, + gas_used: u64, + effective_gas_price: u128, ) -> Payload<'a> { let mut group_log: GroupLog = group.into(); group_log.relayed_chain_id = relayed_chain_id; @@ -229,13 +230,13 @@ pub fn build_group_related_transaction_receipt_payload<'a, C: Curve>( pub fn build_task_related_transaction_receipt_payload<'a>( log_type: LogType, message: &'a str, - chain_id: usize, + chain_id: u64, request_id: &'a [u8], task_type: TaskType, task_json: Value, - transaction_hash: H256, - gas_used: U256, - effective_gas_price: U256, + transaction_hash: B256, + gas_used: u64, + effective_gas_price: u128, ) -> Payload<'a> { Payload { log_type, @@ -287,9 +288,9 @@ mod test { &request_id, TaskType::BLS(BLSTaskType::Randomness), json!({ "task": "Randomness" }), - H256::zero(), - U256::zero(), - U256::zero(), + B256::ZERO, + 0, + 0, ); println!("{}", payload); } diff --git a/crates/core/src/types/config.rs b/crates/core/src/types/config.rs index c1d6a85a..5493bfa4 100644 --- a/crates/core/src/types/config.rs +++ b/crates/core/src/types/config.rs @@ -1,8 +1,8 @@ use crate::{ConfigError, SchedulerError}; -use ethers_core::rand::{thread_rng, Rng}; -use ethers_core::types::U256; -use ethers_core::{k256::ecdsa::SigningKey, types::Address}; -use ethers_signers::{coins_bip39::English, LocalWallet, MnemonicBuilder, Wallet}; +use alloy::primitives::Address; +use alloy::signers::local::PrivateKeySigner; +use alloy::signers::local::{coins_bip39::English, MnemonicBuilder}; +use rand::{thread_rng, Rng}; use serde::de; use serde::{Deserialize, Serialize}; use std::env; @@ -10,7 +10,7 @@ use std::fmt::{self}; use std::time::Duration; use std::{fs::read_to_string, path::PathBuf}; -pub const PLACEHOLDER_ADDRESS: Address = Address::zero(); +pub const PLACEHOLDER_ADDRESS: Address = Address::ZERO; pub const GAS_RAISE_PERCENTAGE: u32 = 40; @@ -59,7 +59,7 @@ pub const DEFAULT_ROLLING_LOG_FILE_SIZE: u64 = 10 * 1024 * 1024 * 1024; pub const DEFAULT_BLOCK_TIME: usize = 12; pub const DEFAULT_MAX_RANDOMNESS_FULFILLMENT_ATTEMPTS: usize = 3; -pub const DEFAULT_WEBSOCKET_PROVIDER_RECONNECT_TIMES: usize = 1000000; +pub const DEFAULT_WEBSOCKET_PROVIDER_RECONNECT_TIMES: u32 = 1000000; pub fn jitter(duration: Duration) -> Duration { duration.mul_f64(thread_rng().gen_range(0.5..=1.0)) @@ -77,7 +77,7 @@ struct ConfigHolder { pub node_management_rpc_token: String, pub node_statistics_http_endpoint: String, pub provider_endpoint: String, - pub chain_id: usize, + pub chain_id: u64, pub is_eigenlayer: Option, pub is_consistent_asset_and_node_account: Option, pub enable_node_auto_activation: Option, @@ -279,7 +279,7 @@ struct ListenerDescriptorHolder { #[derive(Debug, Copy, Clone, Serialize, Deserialize)] pub struct ListenerDescriptor { - pub chain_id: usize, + pub chain_id: u64, pub l_type: ListenerType, pub interval_millis: u64, pub use_jitter: bool, @@ -288,7 +288,7 @@ pub struct ListenerDescriptor { impl ListenerDescriptor { fn from( - chain_id: usize, + chain_id: u64, listener_descriptor_holder: ListenerDescriptorHolder, provider_reset_descriptor: FixedIntervalRetryDescriptor, ) -> Self { @@ -309,7 +309,7 @@ impl ListenerDescriptor { } fn build( - chain_id: usize, + chain_id: u64, l_type: ListenerType, interval_millis: u64, reset_descriptor: FixedIntervalRetryDescriptor, @@ -323,7 +323,7 @@ impl ListenerDescriptor { } } - pub fn default(chain_id: usize, l_type: ListenerType) -> Self { + pub fn default(chain_id: u64, l_type: ListenerType) -> Self { Self { chain_id, l_type, @@ -435,11 +435,9 @@ impl From for TimeLimitDescriptor { } else { time_limit_descriptor_holder.randomness_task_exclusive_window }; - let randomness_aggregation_waiting_block_number = - match time_limit_descriptor_holder.randomness_aggregation_waiting_block_number { - None => 0, - Some(v) => v, - }; + let randomness_aggregation_waiting_block_number = time_limit_descriptor_holder + .randomness_aggregation_waiting_block_number + .unwrap_or_default(); let provider_polling_interval_millis = if time_limit_descriptor_holder.provider_polling_interval_millis == 0 { DEFAULT_PROVIDER_POLLING_INTERVAL_MILLIS @@ -499,7 +497,7 @@ pub struct Config { node_management_rpc_token: String, node_statistics_http_endpoint: String, provider_endpoint: String, - chain_id: usize, + chain_id: u64, is_eigenlayer: bool, is_consistent_asset_and_node_account: bool, enable_node_auto_activation: bool, @@ -511,7 +509,7 @@ pub struct Config { // Data file for persistence data_path: String, account: Account, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, listeners: Vec, logger: LoggerDescriptor, time_limits: TimeLimitDescriptor, @@ -658,7 +656,7 @@ impl From for Config { }; let max_priority_fee_per_gas = config_holder .max_priority_fee_per_gas - .map(|s| U256::from_dec_str(&s).unwrap()); + .map(|s| s.parse::().unwrap()); let listeners = if config_holder.listeners.is_none() { vec![ ListenerDescriptor::build( @@ -787,11 +785,11 @@ impl Config { self.enable_node_auto_activation } - pub fn get_main_chain_id(&self) -> usize { + pub fn get_main_chain_id(&self) -> u64 { self.chain_id } - pub fn get_relayed_chain_ids(&self) -> Vec { + pub fn get_relayed_chain_ids(&self) -> Vec { self.relayed_chains.iter().map(|c| c.chain_id).collect() } @@ -843,11 +841,11 @@ impl Config { &self.account } - pub fn get_max_priority_fee_per_gas(&self) -> Option { + pub fn get_max_priority_fee_per_gas(&self) -> Option { self.max_priority_fee_per_gas } - pub fn find_max_priority_fee_per_gas(&self, chain_id: usize) -> anyhow::Result> { + pub fn find_max_priority_fee_per_gas(&self, chain_id: u64) -> anyhow::Result> { if chain_id == self.chain_id { Ok(self.max_priority_fee_per_gas) } else { @@ -859,7 +857,7 @@ impl Config { } } - pub fn find_provider_endpoint(&self, chain_id: usize) -> anyhow::Result { + pub fn find_provider_endpoint(&self, chain_id: u64) -> anyhow::Result { if chain_id == self.chain_id { Ok(self.provider_endpoint.clone()) } else { @@ -871,7 +869,7 @@ impl Config { } } - pub fn find_controller_address(&self, chain_id: usize) -> anyhow::Result
{ + pub fn find_controller_address(&self, chain_id: u64) -> anyhow::Result
{ if chain_id == self.chain_id { Ok(self.controller_address.parse()?) } else { @@ -883,7 +881,7 @@ impl Config { } } - pub fn find_controller_relayer_address(&self, chain_id: usize) -> anyhow::Result
{ + pub fn find_controller_relayer_address(&self, chain_id: u64) -> anyhow::Result
{ if chain_id == self.chain_id { Ok(self.controller_relayer_address.parse()?) } else { @@ -895,7 +893,7 @@ impl Config { } } - pub fn find_arpa_address(&self, chain_id: usize) -> anyhow::Result
{ + pub fn find_arpa_address(&self, chain_id: u64) -> anyhow::Result
{ if chain_id == self.chain_id { if self.arpa_contract_address.is_empty() { return Err(ConfigError::LackOfARPAContractAddress.into()); @@ -915,7 +913,7 @@ impl Config { } } - pub fn find_adapter_address(&self, chain_id: usize) -> anyhow::Result
{ + pub fn find_adapter_address(&self, chain_id: u64) -> anyhow::Result
{ if chain_id == self.chain_id { Ok(self.adapter_address.parse()?) } else { @@ -927,7 +925,7 @@ impl Config { } } - pub fn find_adapter_deployed_block_height(&self, chain_id: usize) -> anyhow::Result { + pub fn find_adapter_deployed_block_height(&self, chain_id: u64) -> anyhow::Result { if chain_id == self.chain_id { Ok(self.adapter_deployed_block_height) } else { @@ -961,7 +959,7 @@ impl Config { pub fn contract_transaction_retry_descriptor( &self, - chain_id: usize, + chain_id: u64, ) -> anyhow::Result { if chain_id == self.chain_id { Ok(self.time_limits.contract_transaction_retry_descriptor) @@ -976,7 +974,7 @@ impl Config { pub fn contract_view_retry_descriptor( &self, - chain_id: usize, + chain_id: u64, ) -> anyhow::Result { if chain_id == self.chain_id { Ok(self.time_limits.contract_view_retry_descriptor) @@ -992,7 +990,7 @@ impl Config { #[derive(Debug, Clone, Serialize, Deserialize)] struct RelayedChainHolder { - pub chain_id: usize, + pub chain_id: u64, pub description: String, pub provider_endpoint: String, pub controller_oracle_address: String, @@ -1006,14 +1004,14 @@ struct RelayedChainHolder { #[derive(Clone, Serialize, Deserialize)] pub struct RelayedChain { - chain_id: usize, + chain_id: u64, description: String, provider_endpoint: String, controller_oracle_address: String, adapter_address: String, adapter_deployed_block_height: u64, arpa_contract_address: String, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, listeners: Vec, time_limits: TimeLimitDescriptor, } @@ -1071,7 +1069,7 @@ impl From for RelayedChain { let max_priority_fee_per_gas = relayed_chain_holder .max_priority_fee_per_gas - .map(|s| U256::from_dec_str(&s).unwrap()); + .map(|s| s.parse::().unwrap()); let time_limits = if relayed_chain_holder.time_limits.is_none() { TimeLimitDescriptor::default() @@ -1139,7 +1137,7 @@ impl From for RelayedChain { } impl RelayedChain { - pub fn get_chain_id(&self) -> usize { + pub fn get_chain_id(&self) -> u64 { self.chain_id } @@ -1167,7 +1165,7 @@ impl RelayedChain { &self.arpa_contract_address } - pub fn get_max_priority_fee_per_gas(&self) -> Option { + pub fn get_max_priority_fee_per_gas(&self) -> Option { self.max_priority_fee_per_gas } @@ -1182,8 +1180,8 @@ impl RelayedChain { #[derive(Debug, Eq, Clone, Copy, Hash, PartialEq)] pub enum ComponentTaskType { - Listener(usize, ListenerType), - Subscriber(usize, SubscriberType), + Listener(u64, ListenerType), + Subscriber(u64, SubscriberType), RpcServer(RpcServerType), HttpServer(HttpServerType), } @@ -1343,7 +1341,7 @@ pub struct HDWallet { pub index: u32, pub passphrase: Option, } -pub fn build_wallet_from_config(account: &Account) -> Result, ConfigError> { +pub fn build_wallet_from_config(account: &Account) -> Result { if account.hdwallet.is_some() { let mut hd = account.hdwallet.clone().unwrap(); if hd.mnemonic.starts_with('$') { @@ -1354,10 +1352,10 @@ pub fn build_wallet_from_config(account: &Account) -> Result, let mut wallet = MnemonicBuilder::::default().phrase(&*hd.mnemonic); if hd.path.is_some() { - wallet = wallet.derivation_path(&hd.path.unwrap()).unwrap(); + wallet = wallet.derivation_path(hd.path.unwrap()).unwrap(); } if hd.passphrase.is_some() { - wallet = wallet.password(&hd.passphrase.unwrap()); + wallet = wallet.password(hd.passphrase.unwrap()); } return Ok(wallet.index(hd.index).unwrap().build()?); } else if account.keystore.is_some() { @@ -1367,7 +1365,7 @@ pub fn build_wallet_from_config(account: &Account) -> Result, } else if keystore.password.eq("env") { keystore.password = env::var("ARPA_NODE_ACCOUNT_KEYSTORE_PASSWORD")?; } - return Ok(LocalWallet::decrypt_keystore( + return Ok(PrivateKeySigner::decrypt_keystore( &keystore.path, &keystore.password, )?); @@ -1378,7 +1376,7 @@ pub fn build_wallet_from_config(account: &Account) -> Result, } else if private_key.eq("env") { private_key = env::var("ARPA_NODE_ACCOUNT_PRIVATE_KEY")?; } - return Ok(private_key.parse::>()?); + return Ok(private_key.parse::()?); } Err(ConfigError::LackOfAccount) diff --git a/crates/core/src/types/contract.rs b/crates/core/src/types/contract.rs index 752d17a2..6252b9dc 100644 --- a/crates/core/src/types/contract.rs +++ b/crates/core/src/types/contract.rs @@ -1,7 +1,7 @@ use crate::address_to_string; use crate::types::node::{Group as NodeGroup, Member as NodeMember}; -use ethers_core::types::Address; -use ethers_core::utils::hex; +use alloy::hex; +use alloy::primitives::Address; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; use std::hash::{Hash, Hasher}; diff --git a/crates/core/src/types/error.rs b/crates/core/src/types/error.rs index 3bede868..f9ecdf6a 100644 --- a/crates/core/src/types/error.rs +++ b/crates/core/src/types/error.rs @@ -1,4 +1,4 @@ -use ethers_signers::WalletError; +use alloy::signers::local::LocalSignerError; use std::env::VarError; use std::string::FromUtf8Error; use thiserror::Error; @@ -29,10 +29,10 @@ pub enum SchedulerError { TaskAlreadyExisted, #[error("the chain id: {0} is not supported")] - InvalidChainId(usize), + InvalidChainId(u64), #[error("the listener {1} is not supported in relayed chain {0}")] - UnsupportedListenerType(usize, String), + UnsupportedListenerType(u64, String), #[error("the listener failed to initialize. Error: {0}")] ListenerInitializationError(String), @@ -47,9 +47,9 @@ pub enum ConfigError { #[error(transparent)] EnvVarNotExisted(#[from] VarError), #[error(transparent)] - BuildingAccountError(#[from] WalletError), + BuildingAccountError(#[from] LocalSignerError), #[error("the chain id: {0} is not supported")] - InvalidChainId(usize), + InvalidChainId(u64), #[error("lack of ARPA contract address")] LackOfARPAContractAddress, } diff --git a/crates/core/src/types/identity/gas_filler.rs b/crates/core/src/types/identity/gas_filler.rs new file mode 100644 index 00000000..f1762237 --- /dev/null +++ b/crates/core/src/types/identity/gas_filler.rs @@ -0,0 +1,407 @@ +use alloy::eips::eip1559::Eip1559Estimation; +use alloy::eips::eip4844::BLOB_TX_MIN_BLOB_GASPRICE; +use alloy::eips::BlockNumberOrTag; +use alloy::network::{Network, TransactionBuilder, TransactionBuilder4844}; +use alloy::primitives::utils::parse_units; +use alloy::primitives::U256; +use alloy::providers::fillers::{FillerControlFlow, TxFiller}; +use alloy::providers::{Provider, SendableTx}; +use alloy::transports::{RpcError, TransportResult}; +use futures_util::FutureExt; +use log::info; +use std::future::IntoFuture; +use thiserror::Error; + +/// An enum over the different types of gas fillable. +#[doc(hidden)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GasFillable { + Legacy { + gas_limit: u64, + gas_price: u128, + }, + Eip1559 { + gas_limit: u64, + estimate: Eip1559Estimation, + }, +} + +#[derive(Clone, Copy, Debug, Default)] +pub struct GasMiddleware { + /// This value is used to raise the gas value before sending transactions + contingency: U256, +} + +/// Contingency is expressed with 4 units +/// e.g. +/// 50% => 1 + 0.5 => 15000 +/// 20% => 1 + 0.2 => 12000 +/// 1% => 1 + 0.01 => 10100 +const CONTINGENCY_UNITS: u8 = 4; + +#[derive(Error, Debug)] +pub enum GasMiddlewareError { + // /// Thrown when the internal middleware errors + // #[error("{0}")] + // MiddlewareError(String), + /// Specific errors of this GasMiddleware. + /// Please refer to the `thiserror` crate for + /// further docs. + #[error("{0}")] + TooHighContingency(u32), + #[error("{0}")] + TooLowContingency(u32), + #[error("Cannot raise gas! Gas value not provided for this transaction.")] + NoGasSetForTransaction, +} + +impl GasMiddleware { + /// Creates an instance of GasMiddleware + /// `ìnner` the inner Middleware + /// `perc` This is an unsigned integer representing the percentage increase in the amount of gas + /// to be used for the transaction. The percentage is relative to the gas value specified in the + /// transaction. Valid contingency values are in range 1..=50. Otherwise a custom middleware + /// error is raised. + pub fn new(perc: u32) -> Result { + let contingency = match perc { + 0 => Err(GasMiddlewareError::TooLowContingency(perc))?, + 51.. => Err(GasMiddlewareError::TooHighContingency(perc))?, + 1..=50 => { + let decimals = 2; + let perc = U256::from(perc) * U256::from(10).pow(U256::from(decimals)); // e.g. 50 => 5000 + let one: U256 = parse_units("1", CONTINGENCY_UNITS).unwrap().into(); + one + perc // e.g. 50% => 1 + 0.5 => 10000 + 5000 => 15000 + } + }; + + Ok(Self { contingency }) + } + + fn raise_gas_limit(&self, gas_limit: u64) -> u64 { + info!("Original transaction gas: {gas_limit:?} wei"); + let units: U256 = U256::from(10).pow(U256::from(CONTINGENCY_UNITS)); + let raised_gas_limit: U256 = (U256::from(gas_limit) * self.contingency) / units; + info!("Raised transaction gas: {raised_gas_limit:?} wei"); + raised_gas_limit.to::() + } + + async fn prepare_legacy( + &self, + provider: &P, + tx: &N::TransactionRequest, + ) -> TransportResult + where + P: Provider, + N: Network, + { + let gas_price_fut = tx.gas_price().map_or_else( + || provider.get_gas_price().right_future(), + |gas_price| async move { Ok(gas_price) }.left_future(), + ); + + let gas_limit_fut = tx.gas_limit().map_or_else( + || { + provider + .estimate_gas(tx.clone()) + .into_future() + .right_future() + }, + |gas_limit| async move { Ok(gas_limit) }.left_future(), + ); + + let (gas_price, gas_limit) = futures_util::try_join!(gas_price_fut, gas_limit_fut)?; + + Ok(GasFillable::Legacy { + gas_limit, + gas_price, + }) + } + + async fn prepare_1559( + &self, + provider: &P, + tx: &N::TransactionRequest, + ) -> TransportResult + where + P: Provider, + N: Network, + { + let gas_limit_fut = tx.gas_limit().map_or_else( + || { + provider + .estimate_gas(tx.clone()) + .into_future() + .right_future() + }, + |gas_limit| async move { Ok(gas_limit) }.left_future(), + ); + + let eip1559_fees_fut = if let (Some(max_fee_per_gas), Some(max_priority_fee_per_gas)) = + (tx.max_fee_per_gas(), tx.max_priority_fee_per_gas()) + { + async move { + Ok(Eip1559Estimation { + max_fee_per_gas, + max_priority_fee_per_gas, + }) + } + .left_future() + } else { + provider.estimate_eip1559_fees().right_future() + }; + + let (gas_limit, estimate) = futures_util::try_join!(gas_limit_fut, eip1559_fees_fut)?; + + Ok(GasFillable::Eip1559 { + gas_limit, + estimate, + }) + } +} + +impl TxFiller for GasMiddleware { + type Fillable = GasFillable; + + fn status(&self, tx: &::TransactionRequest) -> FillerControlFlow { + // legacy and eip2930 tx + if tx.gas_price().is_some() && tx.gas_limit().is_some() { + return FillerControlFlow::Finished; + } + + // eip1559 + if tx.max_fee_per_gas().is_some() + && tx.max_priority_fee_per_gas().is_some() + && tx.gas_limit().is_some() + { + return FillerControlFlow::Finished; + } + + FillerControlFlow::Ready + } + + fn fill_sync(&self, _tx: &mut SendableTx) {} + + async fn prepare

( + &self, + provider: &P, + tx: &::TransactionRequest, + ) -> TransportResult + where + P: Provider, + { + if tx.gas_price().is_some() { + self.prepare_legacy(provider, tx).await + } else { + match self.prepare_1559(provider, tx).await { + // fallback to legacy + Ok(estimate) => Ok(estimate), + Err(RpcError::UnsupportedFeature(_)) => self.prepare_legacy(provider, tx).await, + Err(e) => Err(e), + } + } + } + + async fn fill( + &self, + fillable: Self::Fillable, + mut tx: SendableTx, + ) -> TransportResult> { + if let Some(builder) = tx.as_mut_builder() { + match fillable { + GasFillable::Legacy { + gas_limit, + gas_price, + } => { + builder.set_gas_limit(self.raise_gas_limit(gas_limit)); + builder.set_gas_price(gas_price); + } + GasFillable::Eip1559 { + gas_limit, + estimate, + } => { + builder.set_gas_limit(self.raise_gas_limit(gas_limit)); + builder.set_max_fee_per_gas(estimate.max_fee_per_gas); + builder.set_max_priority_fee_per_gas(estimate.max_priority_fee_per_gas); + } + } + }; + Ok(tx) + } +} + +/// Filler for the `max_fee_per_blob_gas` field in EIP-4844 transactions. +#[derive(Clone, Copy, Debug, Default)] +pub struct BlobGasFiller; + +impl TxFiller for BlobGasFiller +where + N::TransactionRequest: TransactionBuilder4844, +{ + type Fillable = u128; + + fn status(&self, tx: &::TransactionRequest) -> FillerControlFlow { + // Nothing to fill if non-eip4844 tx or `max_fee_per_blob_gas` is already set to a valid + // value. + if tx.blob_sidecar().is_none() + || tx + .max_fee_per_blob_gas() + .is_some_and(|gas| gas >= BLOB_TX_MIN_BLOB_GASPRICE) + { + return FillerControlFlow::Finished; + } + + FillerControlFlow::Ready + } + + fn fill_sync(&self, _tx: &mut SendableTx) {} + + async fn prepare

( + &self, + provider: &P, + tx: &::TransactionRequest, + ) -> TransportResult + where + P: Provider, + { + if let Some(max_fee_per_blob_gas) = tx.max_fee_per_blob_gas() { + if max_fee_per_blob_gas >= BLOB_TX_MIN_BLOB_GASPRICE { + return Ok(max_fee_per_blob_gas); + } + } + + provider + .get_fee_history(2, BlockNumberOrTag::Latest, &[]) + .await? + .base_fee_per_blob_gas + .last() + .ok_or(RpcError::NullResp) + .copied() + } + + async fn fill( + &self, + fillable: Self::Fillable, + mut tx: SendableTx, + ) -> TransportResult> { + if let Some(builder) = tx.as_mut_builder() { + builder.set_max_fee_per_blob_gas(fillable); + } + Ok(tx) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use alloy::consensus::{SidecarBuilder, SimpleCoder, Transaction}; + use alloy::eips::eip4844::DATA_GAS_PER_BLOB; + use alloy::primitives::{address, U256}; + use alloy::providers::ProviderBuilder; + use alloy::rpc::types::TransactionRequest; + + #[tokio::test] + async fn no_gas_price_or_limit() { + let provider = ProviderBuilder::new().connect_anvil_with_wallet(); + + // GasEstimationLayer requires chain_id to be set to handle EIP-1559 tx + let tx = TransactionRequest { + value: Some(U256::from(100)), + to: Some(address!("d8dA6BF26964aF9D7eEd9e03E53415D37aA96045").into()), + chain_id: Some(31337), + ..Default::default() + }; + + let tx = provider.send_transaction(tx).await.unwrap(); + + let receipt = tx.get_receipt().await.unwrap(); + + assert_eq!(receipt.effective_gas_price, 1_000_000_001); + assert_eq!(receipt.gas_used, 21000); + } + + #[tokio::test] + async fn no_gas_limit() { + let provider = ProviderBuilder::new().connect_anvil_with_wallet(); + + let gas_price = provider.get_gas_price().await.unwrap(); + let tx = TransactionRequest { + value: Some(U256::from(100)), + to: Some(address!("d8dA6BF26964aF9D7eEd9e03E53415D37aA96045").into()), + gas_price: Some(gas_price), + ..Default::default() + }; + + let tx = provider.send_transaction(tx).await.unwrap(); + + let receipt = tx.get_receipt().await.unwrap(); + + assert_eq!(receipt.gas_used, 21000); + } + + #[tokio::test] + async fn no_max_fee_per_blob_gas() { + let provider = ProviderBuilder::new().connect_anvil_with_wallet(); + + let sidecar: SidecarBuilder = SidecarBuilder::from_slice(b"Hello World"); + let sidecar = sidecar.build().unwrap(); + + let tx = TransactionRequest { + to: Some(address!("d8dA6BF26964aF9D7eEd9e03E53415D37aA96045").into()), + sidecar: Some(sidecar), + ..Default::default() + }; + + let tx = provider.send_transaction(tx).await.unwrap(); + + let receipt = tx.get_receipt().await.unwrap(); + + let tx = provider + .get_transaction_by_hash(receipt.transaction_hash) + .await + .unwrap() + .unwrap(); + + assert!(tx.max_fee_per_blob_gas().unwrap() >= BLOB_TX_MIN_BLOB_GASPRICE); + assert_eq!(receipt.gas_used, 21000); + assert_eq!( + receipt + .blob_gas_used + .expect("Expected to be EIP-4844 transaction"), + DATA_GAS_PER_BLOB + ); + } + + #[tokio::test] + async fn zero_max_fee_per_blob_gas() { + let provider = ProviderBuilder::new().connect_anvil_with_wallet(); + + let sidecar: SidecarBuilder = SidecarBuilder::from_slice(b"Hello World"); + let sidecar = sidecar.build().unwrap(); + + let tx = TransactionRequest { + to: Some(address!("d8dA6BF26964aF9D7eEd9e03E53415D37aA96045").into()), + max_fee_per_blob_gas: Some(0), + sidecar: Some(sidecar), + ..Default::default() + }; + + let tx = provider.send_transaction(tx).await.unwrap(); + + let receipt = tx.get_receipt().await.unwrap(); + + let tx = provider + .get_transaction_by_hash(receipt.transaction_hash) + .await + .unwrap() + .unwrap(); + + assert!(tx.max_fee_per_blob_gas().unwrap() >= BLOB_TX_MIN_BLOB_GASPRICE); + assert_eq!(receipt.gas_used, 21000); + assert_eq!( + receipt + .blob_gas_used + .expect("Expected to be EIP-4844 transaction"), + DATA_GAS_PER_BLOB + ); + } +} diff --git a/crates/core/src/types/identity/gas_middleware.rs b/crates/core/src/types/identity/gas_middleware.rs deleted file mode 100644 index 774c9fa8..00000000 --- a/crates/core/src/types/identity/gas_middleware.rs +++ /dev/null @@ -1,131 +0,0 @@ -use async_trait::async_trait; -use ethers_core::{ - types::{transaction::eip2718::TypedTransaction, BlockId, U256}, - utils::parse_units, -}; -use ethers_providers::{Middleware, MiddlewareError}; -use log::info; -use thiserror::Error; - -/// (Modified on https://github.com/gakonst/ethers-rs/blob/51fe937f6515689b17a3a83b74a05984ad3a7f11/examples/middleware/examples/create_custom_middleware.rs#L23) -/// This custom middleware increases the gas value of transactions sent through an ethers-rs -/// provider by a specified percentage and will be called for each transaction before it is sent. -/// This can be useful if you want to ensure that transactions have a higher gas value than the -/// estimated, in order to improve the chances of them not to run out of gas when landing on-chain. -#[derive(Debug)] -pub struct GasMiddleware { - inner: M, - /// This value is used to raise the gas value before sending transactions - contingency: U256, -} - -/// Contingency is expressed with 4 units -/// e.g. -/// 50% => 1 + 0.5 => 15000 -/// 20% => 1 + 0.2 => 12000 -/// 1% => 1 + 0.01 => 10100 -const CONTINGENCY_UNITS: usize = 4; - -impl GasMiddleware -where - M: Middleware, -{ - /// Creates an instance of GasMiddleware - /// `ìnner` the inner Middleware - /// `perc` This is an unsigned integer representing the percentage increase in the amount of gas - /// to be used for the transaction. The percentage is relative to the gas value specified in the - /// transaction. Valid contingency values are in range 1..=50. Otherwise a custom middleware - /// error is raised. - pub fn new(inner: M, perc: u32) -> Result> { - let contingency = match perc { - 0 => Err(GasMiddlewareError::TooLowContingency(perc))?, - 51.. => Err(GasMiddlewareError::TooHighContingency(perc))?, - 1..=50 => { - let decimals = 2; - let perc = U256::from(perc) * U256::exp10(decimals); // e.g. 50 => 5000 - let one = parse_units(1, CONTINGENCY_UNITS).unwrap(); - let one = U256::from(one); - one + perc // e.g. 50% => 1 + 0.5 => 10000 + 5000 => 15000 - } - }; - - Ok(Self { inner, contingency }) - } -} - -/// Let's implement the `Middleware` trait for our custom middleware. -/// All trait functions are derived automatically, so we just need to -/// override the needed functions. -#[async_trait] -impl Middleware for GasMiddleware -where - M: Middleware, -{ - type Error = GasMiddlewareError; - type Provider = M::Provider; - type Inner = M; - - fn inner(&self) -> &M { - &self.inner - } - - async fn fill_transaction( - &self, - tx: &mut TypedTransaction, - block: Option, - ) -> Result<(), Self::Error> { - // Delegate the call to the inner middleware to get an estimate of the gas - self.inner() - .fill_transaction(tx, block) - .await - .map_err(MiddlewareError::from_err)?; - - let curr_gas: U256 = match tx.gas() { - Some(gas) => gas.to_owned(), - None => Err(GasMiddlewareError::NoGasSetForTransaction)?, - }; - - info!("Original transaction gas: {curr_gas:?} wei"); - let units: U256 = U256::exp10(CONTINGENCY_UNITS); - let raised_gas: U256 = (curr_gas * self.contingency) / units; - tx.set_gas(raised_gas); - info!("Raised transaction gas: {raised_gas:?} wei"); - - Ok(()) - } -} - -/// This example demonstrates how to handle errors in custom middlewares. It shows how to define -/// custom error types, use them in middleware implementations, and how to propagate the errors -/// through the middleware chain. This is intended for developers who want to create custom -/// middlewares that can handle and propagate errors in a consistent and robust way. -#[derive(Error, Debug)] -pub enum GasMiddlewareError { - /// Thrown when the internal middleware errors - #[error("{0}")] - MiddlewareError(M::Error), - /// Specific errors of this GasMiddleware. - /// Please refer to the `thiserror` crate for - /// further docs. - #[error("{0}")] - TooHighContingency(u32), - #[error("{0}")] - TooLowContingency(u32), - #[error("Cannot raise gas! Gas value not provided for this transaction.")] - NoGasSetForTransaction, -} - -impl MiddlewareError for GasMiddlewareError { - type Inner = M::Error; - - fn from_err(src: M::Error) -> Self { - GasMiddlewareError::MiddlewareError(src) - } - - fn as_inner(&self) -> Option<&Self::Inner> { - match self { - GasMiddlewareError::MiddlewareError(e) => Some(e), - _ => None, - } - } -} diff --git a/crates/core/src/types/identity/mod.rs b/crates/core/src/types/identity/mod.rs index 5d5956f0..cdbf0c98 100644 --- a/crates/core/src/types/identity/mod.rs +++ b/crates/core/src/types/identity/mod.rs @@ -1,37 +1,40 @@ +use crate::ExponentialBackoffRetryDescriptor; +use alloy::{ + primitives::{Address, BlockNumber}, + signers::local::PrivateKeySigner, + transports::TransportError, +}; use async_trait::async_trait; -use ethers_core::types::{Address, BlockNumber, U256}; -use ethers_providers::{Provider, ProviderError, Ws}; -use std::sync::Arc; -mod gas_middleware; -pub use gas_middleware::*; +mod gas_filler; +pub use gas_filler::*; mod types; pub use types::*; -use crate::ExponentialBackoffRetryDescriptor; - #[async_trait] pub trait ChainIdentity { - fn get_chain_id(&self) -> usize; + fn get_chain_id(&self) -> u64; fn get_id_address(&self) -> Address; fn get_adapter_address(&self) -> Address; - fn get_client(&self) -> Arc; + fn get_signer(&self) -> &PrivateKeySigner; + + fn get_client(&self) -> ProviderClientWithSigner; fn get_contract_transaction_retry_descriptor(&self) -> ExponentialBackoffRetryDescriptor; fn get_contract_view_retry_descriptor(&self) -> ExponentialBackoffRetryDescriptor; - fn get_max_priority_fee_per_gas(&self) -> Option; + fn get_max_priority_fee_per_gas(&self) -> Option; - async fn get_current_gas_price(&self) -> Result; + async fn get_current_gas_price(&self) -> Result; async fn get_block_timestamp( &self, block_number: BlockNumber, - ) -> Result, ProviderError>; + ) -> Result, TransportError>; } pub trait MainChainIdentity: ChainIdentity { @@ -46,9 +49,9 @@ pub trait RelayedChainIdentity: ChainIdentity { #[async_trait] pub trait ChainProviderManager { - fn get_provider(&self) -> &Provider; + fn get_provider(&self) -> &ProviderClientWithSigner; fn get_provider_endpoint(&self) -> &str; - async fn reset_provider(&mut self) -> Result<(), ProviderError>; + async fn reset_provider(&mut self) -> Result<(), TransportError>; } diff --git a/crates/core/src/types/identity/types.rs b/crates/core/src/types/identity/types.rs index e938cb0c..925ecd44 100644 --- a/crates/core/src/types/identity/types.rs +++ b/crates/core/src/types/identity/types.rs @@ -1,76 +1,91 @@ use crate::{ - eip1559_gas_price_estimator, supports_eip1559, ChainProviderManager, - ExponentialBackoffRetryDescriptor, GasMiddleware, RelayedChainIdentity, - DEFAULT_WEBSOCKET_PROVIDER_RECONNECT_TIMES, GAS_RAISE_PERCENTAGE, + eip1559_gas_price_estimator, supports_eip1559, BlobGasFiller, ChainProviderManager, + ExponentialBackoffRetryDescriptor, GasMiddleware, RelayedChainIdentity, GAS_RAISE_PERCENTAGE, }; use super::{ChainIdentity, MainChainIdentity}; +use alloy::providers::fillers::ChainIdFiller; +use alloy::signers::Signer; +use alloy::{ + eips::{eip1559::Eip1559Estimation, BlockId}, + network::EthereumWallet, + primitives::{Address, BlockNumber}, + providers::{ + fillers::{FillProvider, JoinFill, NonceFiller, WalletFiller}, + utils::Eip1559Estimator, + Identity, Provider, ProviderBuilder, RootProvider, WsConnect, + }, + signers::local::PrivateKeySigner, + transports::TransportError, +}; use async_trait::async_trait; -use ethers_core::types::{Address, BlockNumber, U256}; -use ethers_middleware::{MiddlewareBuilder, NonceManagerMiddleware, SignerMiddleware}; -use ethers_providers::{Http, Middleware, Provider, ProviderError, Ws}; -use ethers_signers::{LocalWallet, Signer}; use log::debug; -use std::sync::Arc; -pub type WsWalletSigner = - NonceManagerMiddleware>>, LocalWallet>>; -pub type HttpWalletSigner = - SignerMiddleware>>, LocalWallet>; - -pub fn build_client( - wallet: LocalWallet, - chain_id: usize, - provider: Arc>, -) -> Arc { - let address = wallet.address(); - - let wallet = wallet.with_chain_id(chain_id as u32); - - let provider_with_gas_raiser = - GasMiddleware::new(provider, GAS_RAISE_PERCENTAGE).expect("Failed to create GasMiddleware"); - - let client = SignerMiddleware::new(provider_with_gas_raiser, wallet); - let client_with_nonce_manager = client.nonce_manager(address); - - Arc::new(client_with_nonce_manager) +pub type ProviderClientWithSigner = FillProvider< + JoinFill< + JoinFill< + JoinFill, NonceFiller>, BlobGasFiller>, + GasMiddleware, + >, + WalletFiller, + >, + RootProvider, +>; + +pub async fn build_client( + wallet: PrivateKeySigner, + chain_id: u64, + ws_connect: WsConnect, +) -> Result { + let wallet = wallet.with_chain_id(Some(chain_id)); + + let client = ProviderBuilder::new() + .disable_recommended_fillers() + .filler(ChainIdFiller::new(Some(chain_id))) + .with_cached_nonce_management() + .filler(BlobGasFiller) + .filler(GasMiddleware::new(GAS_RAISE_PERCENTAGE).expect("Failed to create GasMiddleware")) + .wallet(wallet) + .connect_ws(ws_connect) + .await?; + + Ok(client) } #[derive(Debug, Clone)] pub struct GeneralMainChainIdentity { - chain_id: usize, - address: Address, - client: Arc, + chain_id: u64, + wallet: PrivateKeySigner, + ws_connect: WsConnect, + client: ProviderClientWithSigner, provider_endpoint: String, controller_address: Address, controller_relayer_address: Address, adapter_address: Address, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, } impl GeneralMainChainIdentity { #[allow(clippy::too_many_arguments)] pub fn new( - chain_id: usize, - wallet: LocalWallet, - provider: Arc>, + chain_id: u64, + wallet: PrivateKeySigner, + ws_connect: WsConnect, + client: ProviderClientWithSigner, provider_endpoint: String, controller_address: Address, controller_relayer_address: Address, adapter_address: Address, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, ) -> Self { - let address = wallet.address(); - - let client = build_client(wallet, chain_id, provider); - GeneralMainChainIdentity { chain_id, - address, + wallet, + ws_connect, client, provider_endpoint, controller_address, @@ -85,19 +100,23 @@ impl GeneralMainChainIdentity { #[async_trait] impl ChainIdentity for GeneralMainChainIdentity { - fn get_chain_id(&self) -> usize { + fn get_chain_id(&self) -> u64 { self.chain_id } fn get_id_address(&self) -> Address { - self.address + self.wallet.address() } fn get_adapter_address(&self) -> Address { self.adapter_address } - fn get_client(&self) -> Arc { + fn get_signer(&self) -> &PrivateKeySigner { + &self.wallet + } + + fn get_client(&self) -> ProviderClientWithSigner { self.client.clone() } @@ -109,36 +128,38 @@ impl ChainIdentity for GeneralMainChainIdentity { self.contract_view_retry_descriptor } - fn get_max_priority_fee_per_gas(&self) -> Option { + fn get_max_priority_fee_per_gas(&self) -> Option { self.max_priority_fee_per_gas } - async fn get_current_gas_price(&self) -> Result { + async fn get_current_gas_price(&self) -> Result { if !supports_eip1559(self.chain_id) { - return self.client.provider().get_gas_price().await; + return self.client.get_gas_price().await; } - let (max_fee, _) = self + let Eip1559Estimation { + max_fee_per_gas, + max_priority_fee_per_gas: _, + } = self .client - .provider() - .estimate_eip1559_fees(Some(eip1559_gas_price_estimator)) + .estimate_eip1559_fees_with(Eip1559Estimator::Custom(Box::new( + eip1559_gas_price_estimator, + ))) .await?; - Ok(max_fee) + Ok(max_fee_per_gas) } async fn get_block_timestamp( &self, block_number: BlockNumber, - ) -> Result, ProviderError> { + ) -> Result, TransportError> { self.client - .provider() - .get_block(block_number) + .get_block(BlockId::Number(block_number.into())) .await - .map(|o| o.map(|b| b.timestamp)) + .map(|o| o.map(|b| b.header.timestamp)) } } -#[async_trait] impl MainChainIdentity for GeneralMainChainIdentity { fn get_controller_address(&self) -> Address { self.controller_address @@ -151,71 +172,58 @@ impl MainChainIdentity for GeneralMainChainIdentity { #[async_trait] impl ChainProviderManager for GeneralMainChainIdentity { - fn get_provider(&self) -> &Provider { - self.client.provider() + fn get_provider(&self) -> &ProviderClientWithSigner { + &self.client } fn get_provider_endpoint(&self) -> &str { &self.provider_endpoint } - async fn reset_provider(&mut self) -> Result<(), ProviderError> { + async fn reset_provider(&mut self) -> Result<(), TransportError> { debug!("Resetting provider for chain {}", self.chain_id); - let provider = Arc::new( - Provider::::connect_with_reconnects( - &self.provider_endpoint, - DEFAULT_WEBSOCKET_PROVIDER_RECONNECT_TIMES, - ) - .await? - .interval(self.get_provider().get_interval()), - ); + self.client = + build_client(self.wallet.clone(), self.chain_id, self.ws_connect.clone()).await?; debug!("Provider reset for chain {}", self.chain_id); - self.client = build_client( - self.client.inner().signer().clone(), - self.chain_id, - provider, - ); - Ok(()) } } #[derive(Debug, Clone)] pub struct GeneralRelayedChainIdentity { - chain_id: usize, - address: Address, - client: Arc, + chain_id: u64, + wallet: PrivateKeySigner, + ws_connect: WsConnect, + client: ProviderClientWithSigner, provider_endpoint: String, controller_oracle_address: Address, adapter_address: Address, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, } impl GeneralRelayedChainIdentity { #[allow(clippy::too_many_arguments)] pub fn new( - chain_id: usize, - wallet: LocalWallet, - provider: Arc>, + chain_id: u64, + wallet: PrivateKeySigner, + ws_connect: WsConnect, + client: ProviderClientWithSigner, provider_endpoint: String, controller_oracle_address: Address, adapter_address: Address, contract_transaction_retry_descriptor: ExponentialBackoffRetryDescriptor, contract_view_retry_descriptor: ExponentialBackoffRetryDescriptor, - max_priority_fee_per_gas: Option, + max_priority_fee_per_gas: Option, ) -> Self { - let address = wallet.address(); - - let client = build_client(wallet, chain_id, provider); - GeneralRelayedChainIdentity { chain_id, - address, + wallet, + ws_connect, client, provider_endpoint, controller_oracle_address, @@ -229,19 +237,23 @@ impl GeneralRelayedChainIdentity { #[async_trait] impl ChainIdentity for GeneralRelayedChainIdentity { - fn get_chain_id(&self) -> usize { + fn get_chain_id(&self) -> u64 { self.chain_id } fn get_id_address(&self) -> Address { - self.address + self.wallet.address() } fn get_adapter_address(&self) -> Address { self.adapter_address } - fn get_client(&self) -> Arc { + fn get_signer(&self) -> &PrivateKeySigner { + &self.wallet + } + + fn get_client(&self) -> ProviderClientWithSigner { self.client.clone() } @@ -253,32 +265,35 @@ impl ChainIdentity for GeneralRelayedChainIdentity { self.contract_view_retry_descriptor } - fn get_max_priority_fee_per_gas(&self) -> Option { + fn get_max_priority_fee_per_gas(&self) -> Option { self.max_priority_fee_per_gas } - async fn get_current_gas_price(&self) -> Result { + async fn get_current_gas_price(&self) -> Result { if !supports_eip1559(self.chain_id) { - return self.client.provider().get_gas_price().await; + return self.client.get_gas_price().await; } - let (max_fee, _) = self + let Eip1559Estimation { + max_fee_per_gas, + max_priority_fee_per_gas: _, + } = self .client - .provider() - .estimate_eip1559_fees(Some(eip1559_gas_price_estimator)) + .estimate_eip1559_fees_with(Eip1559Estimator::Custom(Box::new( + eip1559_gas_price_estimator, + ))) .await?; - Ok(max_fee) + Ok(max_fee_per_gas) } async fn get_block_timestamp( &self, block_number: BlockNumber, - ) -> Result, ProviderError> { + ) -> Result, TransportError> { self.client - .provider() - .get_block(block_number) + .get_block(BlockId::Number(block_number.into())) .await - .map(|o| o.map(|b| b.timestamp)) + .map(|o| o.map(|b| b.header.timestamp)) } } @@ -290,29 +305,21 @@ impl RelayedChainIdentity for GeneralRelayedChainIdentity { #[async_trait] impl ChainProviderManager for GeneralRelayedChainIdentity { - fn get_provider(&self) -> &Provider { - self.client.provider() + fn get_provider(&self) -> &ProviderClientWithSigner { + &self.client } fn get_provider_endpoint(&self) -> &str { &self.provider_endpoint } - async fn reset_provider(&mut self) -> Result<(), ProviderError> { - let provider = Arc::new( - Provider::::connect_with_reconnects( - &self.provider_endpoint, - DEFAULT_WEBSOCKET_PROVIDER_RECONNECT_TIMES, - ) - .await? - .interval(self.get_provider().get_interval()), - ); - - self.client = build_client( - self.client.inner().signer().clone(), - self.chain_id, - provider, - ); + async fn reset_provider(&mut self) -> Result<(), TransportError> { + debug!("Resetting provider for chain {}", self.chain_id); + + self.client = + build_client(self.wallet.clone(), self.chain_id, self.ws_connect.clone()).await?; + + debug!("Provider reset for chain {}", self.chain_id); Ok(()) } diff --git a/crates/core/src/types/node.rs b/crates/core/src/types/node.rs index 894b463e..8de20440 100644 --- a/crates/core/src/types/node.rs +++ b/crates/core/src/types/node.rs @@ -1,9 +1,7 @@ use crate::ser_bytes_in_hex_string; use crate::ser_u256_in_dec_string; -use ethers_core::{ - types::{Address, U256}, - utils::hex, -}; +use alloy::hex; +use alloy::primitives::{Address, U256}; use serde::{Deserialize, Serialize}; use std::{collections::BTreeMap, marker::PhantomData}; use threshold_bls::{group::Curve, serialize::point_to_hex}; @@ -38,8 +36,7 @@ pub struct RandomnessTask { pub seed: U256, pub request_confirmations: u16, pub callback_gas_limit: u32, - #[serde(serialize_with = "ser_u256_in_dec_string")] - pub callback_max_gas_price: U256, + pub callback_max_gas_price: u128, pub assignment_block_height: usize, } diff --git a/crates/core/src/utils/mod.rs b/crates/core/src/utils/mod.rs index 05c1df16..51a213cf 100644 --- a/crates/core/src/utils/mod.rs +++ b/crates/core/src/utils/mod.rs @@ -1,33 +1,34 @@ -use chrono::Local; -use ethers_core::{ - types::{Address, I256, U256}, - utils::{hex, keccak256}, +use alloy::{ + eips::eip1559::Eip1559Estimation, + hex, + primitives::{utils::keccak256, Address, FixedBytes, U256}, }; +use chrono::Local; use log::info; /// The threshold max change/difference (in %) at which we will ignore the fee history values /// under it. pub const EIP1559_FEE_ESTIMATION_THRESHOLD_MAX_CHANGE: i64 = 200; -pub const OP_MAINNET_CHAIN_ID: usize = 10; -pub const OP_GOERLI_TESTNET_CHAIN_ID: usize = 420; -pub const OP_SEPOLIA_TESTNET_CHAIN_ID: usize = 11155420; -pub const OP_DEVNET_CHAIN_ID: usize = 901; -pub const BASE_MAINNET_CHAIN_ID: usize = 8453; -pub const BASE_GOERLI_TESTNET_CHAIN_ID: usize = 84531; -pub const BASE_SEPOLIA_TESTNET_CHAIN_ID: usize = 84532; -pub const REDSTONE_HOLESKY_TESTNET_CHAIN_ID: usize = 17001; -pub const REDSTONE_MAINNET_CHAIN_ID: usize = 690; -pub const REDSTONE_GARNET_TESTNET_CHAIN_ID: usize = 17069; -pub const LOOT_MAINNET_CHAIN_ID: usize = 5151706; -pub const LOOT_TESTNET_CHAIN_ID: usize = 9088912; -pub const TAIKO_HEKLA_TESTNET_CHAIN_ID: usize = 167009; -pub const TAIKO_MAINNET_CHAIN_ID: usize = 167000; -pub const B3_MAINNET_CHAIN_ID: usize = 8333; -pub const B3_TESTNET_CHAIN_ID: usize = 1993; -pub const BSC_MAINNET_CHAIN_ID: usize = 56; -pub const ARPA_CHAIN_ID: usize = 4224; - -pub fn supports_eip1559(chain_id: usize) -> bool { +pub const OP_MAINNET_CHAIN_ID: u64 = 10; +pub const OP_GOERLI_TESTNET_CHAIN_ID: u64 = 420; +pub const OP_SEPOLIA_TESTNET_CHAIN_ID: u64 = 11155420; +pub const OP_DEVNET_CHAIN_ID: u64 = 901; +pub const BASE_MAINNET_CHAIN_ID: u64 = 8453; +pub const BASE_GOERLI_TESTNET_CHAIN_ID: u64 = 84531; +pub const BASE_SEPOLIA_TESTNET_CHAIN_ID: u64 = 84532; +pub const REDSTONE_HOLESKY_TESTNET_CHAIN_ID: u64 = 17001; +pub const REDSTONE_MAINNET_CHAIN_ID: u64 = 690; +pub const REDSTONE_GARNET_TESTNET_CHAIN_ID: u64 = 17069; +pub const LOOT_MAINNET_CHAIN_ID: u64 = 5151706; +pub const LOOT_TESTNET_CHAIN_ID: u64 = 9088912; +pub const TAIKO_HEKLA_TESTNET_CHAIN_ID: u64 = 167009; +pub const TAIKO_MAINNET_CHAIN_ID: u64 = 167000; +pub const B3_MAINNET_CHAIN_ID: u64 = 8333; +pub const B3_TESTNET_CHAIN_ID: u64 = 1993; +pub const BSC_MAINNET_CHAIN_ID: u64 = 56; +pub const ARPA_CHAIN_ID: u64 = 4224; + +pub fn supports_eip1559(chain_id: u64) -> bool { chain_id != LOOT_MAINNET_CHAIN_ID && chain_id != LOOT_TESTNET_CHAIN_ID } @@ -40,10 +41,13 @@ pub fn address_to_string(address: Address) -> String { to_checksum(&address, None) } +pub fn random_address() -> Address { + let nonce = rand::random::(); + Address::ZERO.create(nonce) +} + pub fn u256_to_vec(x: &U256) -> Vec { - let mut x_bytes = vec![0u8; 32]; - x.to_big_endian(&mut x_bytes); - x_bytes + x.to_be_bytes_vec() } pub fn pad_to_bytes32(s: &[u8]) -> Option<[u8; 32]> { @@ -60,6 +64,20 @@ pub fn pad_to_bytes32(s: &[u8]) -> Option<[u8; 32]> { Some(result) } +pub fn pad_to_bytes32_fixed_bytes(s: &[u8]) -> Option> { + let s_len = s.len(); + if s_len > 32 { + return None; + } + let mut result: [u8; 32] = Default::default(); + result[..s_len].clone_from_slice(s); + Some(FixedBytes::from(result)) +} + +pub fn bytes32_to_fixed_bytes(s: [u8; 32]) -> FixedBytes<32> { + FixedBytes::from(s) +} + pub fn ser_bytes_in_hex_string(v: &T, s: S) -> Result where T: AsRef<[u8]>, @@ -86,7 +104,7 @@ pub fn to_checksum(addr: &Address, chain_id: Option) -> String { let hash = hex::encode(keccak256(prefixed_addr)); let hash = hash.as_bytes(); - let addr_hex = hex::encode(addr.as_bytes()); + let addr_hex = hex::encode(addr); let addr_hex = addr_hex.as_bytes(); addr_hex @@ -102,8 +120,10 @@ pub fn to_checksum(addr: &Address, chain_id: Option) -> String { }) } +// fn estimate(&self, base_fee: u128, rewards: &[Vec]) -> Eip1559Estimation; + /// The EIP-1559 fee estimator which is based on the work by [ethers-rs](https://github.com/gakonst/ethers-rs/blob/e0e79df7e9032e882fce4f47bcc25d87bceaec68/ethers-core/src/utils/mod.rs#L500) and [MyCrypto](https://github.com/MyCryptoHQ/MyCrypto/blob/master/src/services/ApiService/Gas/eip1559.ts) -pub fn eip1559_gas_price_estimator(base: U256, tips: Vec>) -> (U256, U256) { +pub fn eip1559_gas_price_estimator(base: u128, tips: &[Vec]) -> Eip1559Estimation { info!("base: {:?}", base); info!("tips: {:?}", tips); @@ -113,9 +133,9 @@ pub fn eip1559_gas_price_estimator(base: U256, tips: Vec>) -> (U256, U } pub fn fallback_eip1559_gas_price_estimator( - base: U256, - max_priority_fee_per_gas: U256, -) -> (U256, U256) { + base: u128, + max_priority_fee_per_gas: u128, +) -> Eip1559Estimation { info!("base: {:?}", base); info!("max_priority_fee_per_gas: {:?}", max_priority_fee_per_gas); @@ -126,17 +146,17 @@ pub fn fallback_eip1559_gas_price_estimator( } else { potential_max_fee }; - (max_fee_per_gas, max_priority_fee_per_gas) + + Eip1559Estimation { + max_fee_per_gas, + max_priority_fee_per_gas, + } } -fn estimate_priority_fee(rewards: Vec>) -> U256 { - let mut rewards: Vec = rewards - .iter() - .map(|r| r[0]) - .filter(|r| *r > U256::zero()) - .collect(); +fn estimate_priority_fee(rewards: &[Vec]) -> u128 { + let mut rewards: Vec = rewards.iter().map(|r| r[0]).filter(|r| *r > 0).collect(); if rewards.is_empty() { - return U256::zero(); + return 0; } if rewards.len() == 1 { return rewards[0]; @@ -149,12 +169,12 @@ fn estimate_priority_fee(rewards: Vec>) -> U256 { let mut rewards_copy = rewards.clone(); rewards_copy.rotate_left(1); - let mut percentage_change: Vec = rewards + let mut percentage_change: Vec = rewards .iter() .zip(rewards_copy.iter()) .map(|(a, b)| { - let a = I256::try_from(*a).expect("priority fee overflow"); - let b = I256::try_from(*b).expect("priority fee overflow"); + let a = *a as i128; + let b = *b as i128; ((b - a) * 100) / a }) .collect(); @@ -184,9 +204,9 @@ fn estimate_priority_fee(rewards: Vec>) -> U256 { #[cfg(test)] pub mod util_tests { - use ethers_core::types::Address; + use alloy::primitives::Address; - use crate::{address_to_string, format_now_date}; + use crate::{address_to_string, format_now_date, random_address}; #[test] fn test_format_now_date() { @@ -206,4 +226,12 @@ pub mod util_tests { let address = bad_address_in_str.parse::

(); assert!(address.is_err()); } + + #[test] + fn test_random_address() { + for _ in 0..10 { + let address = random_address(); + println!("{:?}", address); + } + } } diff --git a/crates/dal/Cargo.toml b/crates/dal/Cargo.toml index 3df64b58..f23a49d5 100644 --- a/crates/dal/Cargo.toml +++ b/crates/dal/Cargo.toml @@ -17,7 +17,7 @@ dkg-core.workspace = true threshold-bls.workspace = true tokio = { version = "1.37.0", features = ["full"] } -ethers-core.workspace = true +alloy = { workspace = true, features = ["full"] } thiserror = "1.0.15" anyhow = "1.0.31" serde = "1.0.106" diff --git a/crates/dal/sqlite/Cargo.toml b/crates/dal/sqlite/Cargo.toml index fa94db69..edb6202f 100644 --- a/crates/dal/sqlite/Cargo.toml +++ b/crates/dal/sqlite/Cargo.toml @@ -12,13 +12,14 @@ keywords.workspace = true exclude.workspace = true [dependencies] -entity = { version = "0.3.0-alpha.2", path = "./entity" } -migration = { version = "0.3.0-alpha.2", path = "./migration" } +entity = { version = "0.4.0-alpha.1", path = "./entity" } +migration = { version = "0.4.0-alpha.1", path = "./migration" } arpa-core.workspace = true arpa-dal.workspace = true threshold-bls.workspace = true dkg-core.workspace = true +alloy = { workspace = true, features = ["full"] } sea-orm = { version = "0.12", features = [ "sqlx-sqlite", "runtime-tokio-rustls", @@ -34,7 +35,6 @@ libsqlite3-sys = { version = "^0.26.0", default-features = false, features = [ chrono = "0.4" log = "0.4" tokio = { version = "1.37.0", features = ["full"] } -ethers-core.workspace = true thiserror = "1.0.15" anyhow = "1.0.31" bincode = "1.2.1" diff --git a/crates/dal/sqlite/migration/Cargo.toml b/crates/dal/sqlite/migration/Cargo.toml index 1cedfb7c..3d19fe25 100644 --- a/crates/dal/sqlite/migration/Cargo.toml +++ b/crates/dal/sqlite/migration/Cargo.toml @@ -16,7 +16,7 @@ name = "migration" path = "src/lib.rs" [dependencies] -entity = { version = "0.3.0-alpha.2", path = "../entity" } +entity = { version = "0.4.0-alpha.1", path = "../entity" } async-std = { version = "^1", features = ["attributes", "tokio1"] } libsqlite3-sys = { version = "^0.26.0", default-features = false, features = [ "pkg-config", diff --git a/crates/dal/sqlite/src/group.rs b/crates/dal/sqlite/src/group.rs index ea438541..eb7ef368 100644 --- a/crates/dal/sqlite/src/group.rs +++ b/crates/dal/sqlite/src/group.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::DBResult; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::Group; use arpa_core::Member; use arpa_core::{format_now_date, DKGStatus}; @@ -12,7 +13,6 @@ use arpa_dal::{DKGOutput, GroupInfoFetcher, GroupInfoUpdater}; use async_trait::async_trait; use entity::group_info; use entity::prelude::GroupInfo; -use ethers_core::types::Address; use log::info; use sea_orm::{ActiveModelTrait, DbConn, DbErr, EntityTrait, QueryOrder, Set}; use std::collections::BTreeMap; diff --git a/crates/dal/sqlite/src/lib.rs b/crates/dal/sqlite/src/lib.rs index 99ac205f..d2467654 100644 --- a/crates/dal/sqlite/src/lib.rs +++ b/crates/dal/sqlite/src/lib.rs @@ -17,6 +17,7 @@ pub use crate::task::OPBLSTasksDBClient; pub use crate::types::DBError; pub use crate::types::DBResult; pub use crate::types::SqliteDB; +use alloy::hex; use arpa_core::RandomnessTask; use arpa_core::ARPA_CHAIN_ID; use arpa_core::B3_MAINNET_CHAIN_ID; @@ -43,7 +44,6 @@ use arpa_dal::BLSTasksHandler; use arpa_dal::GroupInfoHandler; use arpa_dal::NodeInfoHandler; use arpa_dal::SignatureResultCacheHandler; -use ethers_core::utils::hex; use log::LevelFilter; use migration::Migrator; use migration::MigratorTrait; @@ -112,7 +112,7 @@ impl SqliteDB { pub fn build_randomness_tasks_cache( &self, - chain_id: usize, + chain_id: u64, ) -> DataAccessResult>> { match chain_id { 0 => Ok(Box::new(self.get_bls_tasks_client::())), @@ -149,7 +149,7 @@ impl SqliteDB { pub async fn build_randomness_result_cache( &self, - chain_id: usize, + chain_id: u64, ) -> DataAccessResult>> { match chain_id { 0 => Ok(Box::new(self.get_randomness_result_client().await?)), @@ -285,6 +285,7 @@ impl SignatureResultCacheHandler pub mod sqlite_tests { use crate::test_helper; use crate::SqliteDB; + use alloy::primitives::{Address, U256}; use arpa_core::DKGStatus; use arpa_core::DKGTask; use arpa_core::RandomnessRequestType; @@ -297,8 +298,6 @@ pub mod sqlite_tests { use arpa_dal::GroupInfoUpdater; use arpa_dal::NodeInfoFetcher; use arpa_dal::NodeInfoUpdater; - use ethers_core::types::Address; - use ethers_core::types::U256; use std::{fs, path::PathBuf}; use threshold_bls::curve::bn254::G2Curve; use threshold_bls::schemes::bn254::G2Scheme; @@ -639,7 +638,7 @@ pub mod sqlite_tests { let request_id = vec![1]; - let seed = U256::from_big_endian(&String::from("test task").into_bytes()); + let seed = U256::from_be_slice(String::from("test task").as_bytes()); let task = RandomnessTask { request_id: request_id.clone(), @@ -651,7 +650,7 @@ pub mod sqlite_tests { seed, request_confirmations: 0, callback_gas_limit: 0, - callback_max_gas_price: 0.into(), + callback_max_gas_price: 0, assignment_block_height: 100, }; @@ -704,7 +703,7 @@ pub mod sqlite_tests { let request_id = vec![1]; - let seed = U256::from_big_endian(&String::from("test task").into_bytes()); + let seed = U256::from_be_slice(String::from("test task").as_bytes()); let task = RandomnessTask { request_id: request_id.clone(), @@ -716,7 +715,7 @@ pub mod sqlite_tests { seed, request_confirmations: 0, callback_gas_limit: 0, - callback_max_gas_price: 0.into(), + callback_max_gas_price: 0, assignment_block_height: 100, }; diff --git a/crates/dal/sqlite/src/node.rs b/crates/dal/sqlite/src/node.rs index 314818ce..44c36096 100644 --- a/crates/dal/sqlite/src/node.rs +++ b/crates/dal/sqlite/src/node.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::DBResult; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::{address_to_string, format_now_date}; use arpa_dal::cache::InMemoryNodeInfoCache; use arpa_dal::error::DataAccessResult; @@ -10,7 +11,6 @@ use arpa_dal::NodeInfoUpdater; use async_trait::async_trait; use entity::node_info; use entity::prelude::NodeInfo; -use ethers_core::types::Address; use sea_orm::{ActiveModelTrait, DbConn, DbErr, EntityTrait, QueryOrder, Set}; use std::sync::Arc; use threshold_bls::group::Curve; diff --git a/crates/dal/sqlite/src/result/arpa_chain.rs b/crates/dal/sqlite/src/result/arpa_chain.rs index 4293cdd6..eb7e7add 100644 --- a/crates/dal/sqlite/src/result/arpa_chain.rs +++ b/crates/dal/sqlite/src/result/arpa_chain.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::RandomnessRecord; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::format_now_date; use arpa_core::BLSTaskError; use arpa_core::{RandomnessTask, Task}; @@ -15,7 +16,6 @@ use arpa_dal::SignatureResultCacheUpdater; use async_trait::async_trait; use entity::arpa_chain_randomness_result; use entity::prelude::ArpaChainRandomnessResult; -use ethers_core::types::Address; use migration::Expr; use migration::Query; use migration::SelectStatement; diff --git a/crates/dal/sqlite/src/result/b3.rs b/crates/dal/sqlite/src/result/b3.rs index 0d336f5a..8f70be93 100644 --- a/crates/dal/sqlite/src/result/b3.rs +++ b/crates/dal/sqlite/src/result/b3.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::RandomnessRecord; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::format_now_date; use arpa_core::BLSTaskError; use arpa_core::{RandomnessTask, Task}; @@ -15,7 +16,6 @@ use arpa_dal::SignatureResultCacheUpdater; use async_trait::async_trait; use entity::b3_randomness_result; use entity::prelude::B3RandomnessResult; -use ethers_core::types::Address; use migration::Expr; use migration::Query; use migration::SelectStatement; diff --git a/crates/dal/sqlite/src/result/base.rs b/crates/dal/sqlite/src/result/base.rs index fdf29492..ea9251be 100644 --- a/crates/dal/sqlite/src/result/base.rs +++ b/crates/dal/sqlite/src/result/base.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::RandomnessRecord; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::format_now_date; use arpa_core::BLSTaskError; use arpa_core::PartialSignature; @@ -16,7 +17,6 @@ use arpa_dal::SignatureResultCacheUpdater; use async_trait::async_trait; use entity::base_randomness_result; use entity::prelude::BaseRandomnessResult; -use ethers_core::types::Address; use migration::Expr; use migration::Query; use migration::SelectStatement; diff --git a/crates/dal/sqlite/src/result/bsc.rs b/crates/dal/sqlite/src/result/bsc.rs index db6d04a9..6760cc5c 100644 --- a/crates/dal/sqlite/src/result/bsc.rs +++ b/crates/dal/sqlite/src/result/bsc.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::RandomnessRecord; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::format_now_date; use arpa_core::BLSTaskError; use arpa_core::{RandomnessTask, Task}; @@ -15,7 +16,6 @@ use arpa_dal::SignatureResultCacheUpdater; use async_trait::async_trait; use entity::bsc_randomness_result; use entity::prelude::BscRandomnessResult; -use ethers_core::types::Address; use migration::Expr; use migration::Query; use migration::SelectStatement; diff --git a/crates/dal/sqlite/src/result/loot.rs b/crates/dal/sqlite/src/result/loot.rs index 8826998f..6a21c73b 100644 --- a/crates/dal/sqlite/src/result/loot.rs +++ b/crates/dal/sqlite/src/result/loot.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::RandomnessRecord; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::format_now_date; use arpa_core::BLSTaskError; use arpa_core::{RandomnessTask, Task}; @@ -15,7 +16,6 @@ use arpa_dal::SignatureResultCacheUpdater; use async_trait::async_trait; use entity::loot_randomness_result; use entity::prelude::LootRandomnessResult; -use ethers_core::types::Address; use migration::Expr; use migration::Query; use migration::SelectStatement; diff --git a/crates/dal/sqlite/src/result/main.rs b/crates/dal/sqlite/src/result/main.rs index 4356d7c1..4d763067 100644 --- a/crates/dal/sqlite/src/result/main.rs +++ b/crates/dal/sqlite/src/result/main.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::RandomnessRecord; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::format_now_date; use arpa_core::BLSTaskError; use arpa_core::{RandomnessTask, Task}; @@ -15,7 +16,6 @@ use arpa_dal::SignatureResultCacheUpdater; use async_trait::async_trait; use entity::prelude::RandomnessResult; use entity::randomness_result; -use ethers_core::types::Address; use migration::Expr; use migration::Query; use migration::SelectStatement; diff --git a/crates/dal/sqlite/src/result/op.rs b/crates/dal/sqlite/src/result/op.rs index 3c9c2690..a03e606b 100644 --- a/crates/dal/sqlite/src/result/op.rs +++ b/crates/dal/sqlite/src/result/op.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::RandomnessRecord; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::format_now_date; use arpa_core::BLSTaskError; use arpa_core::{RandomnessTask, Task}; @@ -15,7 +16,6 @@ use arpa_dal::SignatureResultCacheUpdater; use async_trait::async_trait; use entity::op_randomness_result; use entity::prelude::OpRandomnessResult; -use ethers_core::types::Address; use migration::Expr; use migration::Query; use migration::SelectStatement; diff --git a/crates/dal/sqlite/src/result/redstone.rs b/crates/dal/sqlite/src/result/redstone.rs index cf2bbe3f..d6c8b891 100644 --- a/crates/dal/sqlite/src/result/redstone.rs +++ b/crates/dal/sqlite/src/result/redstone.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::RandomnessRecord; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::format_now_date; use arpa_core::BLSTaskError; use arpa_core::{RandomnessTask, Task}; @@ -15,7 +16,6 @@ use arpa_dal::SignatureResultCacheUpdater; use async_trait::async_trait; use entity::prelude::RedstoneRandomnessResult; use entity::redstone_randomness_result; -use ethers_core::types::Address; use migration::Expr; use migration::Query; use migration::SelectStatement; diff --git a/crates/dal/sqlite/src/result/taiko.rs b/crates/dal/sqlite/src/result/taiko.rs index 4913cf89..90caf118 100644 --- a/crates/dal/sqlite/src/result/taiko.rs +++ b/crates/dal/sqlite/src/result/taiko.rs @@ -1,6 +1,7 @@ use crate::types::DBError; use crate::types::RandomnessRecord; use crate::types::SqliteDB; +use alloy::primitives::Address; use arpa_core::format_now_date; use arpa_core::BLSTaskError; use arpa_core::{RandomnessTask, Task}; @@ -15,7 +16,6 @@ use arpa_dal::SignatureResultCacheUpdater; use async_trait::async_trait; use entity::prelude::TaikoRandomnessResult; use entity::taiko_randomness_result; -use ethers_core::types::Address; use migration::Expr; use migration::Query; use migration::SelectStatement; diff --git a/crates/dal/sqlite/src/task/arpa_chain.rs b/crates/dal/sqlite/src/task/arpa_chain.rs index 068d60e9..20b7b547 100644 --- a/crates/dal/sqlite/src/task/arpa_chain.rs +++ b/crates/dal/sqlite/src/task/arpa_chain.rs @@ -94,7 +94,7 @@ impl BLSTasksUpdater for ArpaChainBLSTasksDBClient for ArpaChainBLSTasksDBClient DataAccessResult> { let before_assignment_block_height = - if current_block_height > randomness_task_exclusive_window { - current_block_height - randomness_task_exclusive_window - } else { - 0 - }; + current_block_height.saturating_sub(randomness_task_exclusive_window); ArpaChainRandomnessTaskMutation::fetch_available_tasks( self.get_connection(), current_group_index as i32, diff --git a/crates/dal/sqlite/src/task/b3.rs b/crates/dal/sqlite/src/task/b3.rs index 7620a278..39ba5dd1 100644 --- a/crates/dal/sqlite/src/task/b3.rs +++ b/crates/dal/sqlite/src/task/b3.rs @@ -93,7 +93,7 @@ impl BLSTasksUpdater for B3BLSTasksDBClient { seed_bytes, task.request_confirmations as i32, task.callback_gas_limit as i32, - u256_to_vec(&task.callback_max_gas_price), + task.callback_max_gas_price.to_be_bytes().to_vec(), task.assignment_block_height as i64, ) .await @@ -112,11 +112,7 @@ impl BLSTasksUpdater for B3BLSTasksDBClient { randomness_task_exclusive_window: usize, ) -> DataAccessResult> { let before_assignment_block_height = - if current_block_height > randomness_task_exclusive_window { - current_block_height - randomness_task_exclusive_window - } else { - 0 - }; + current_block_height.saturating_sub(randomness_task_exclusive_window); B3RandomnessTaskMutation::fetch_available_tasks( self.get_connection(), current_group_index as i32, diff --git a/crates/dal/sqlite/src/task/base.rs b/crates/dal/sqlite/src/task/base.rs index 007215bd..fe0f7d2b 100644 --- a/crates/dal/sqlite/src/task/base.rs +++ b/crates/dal/sqlite/src/task/base.rs @@ -93,7 +93,7 @@ impl BLSTasksUpdater for BaseBLSTasksDBClient { seed_bytes, task.request_confirmations as i32, task.callback_gas_limit as i32, - u256_to_vec(&task.callback_max_gas_price), + task.callback_max_gas_price.to_be_bytes().to_vec(), task.assignment_block_height as i64, ) .await @@ -112,11 +112,7 @@ impl BLSTasksUpdater for BaseBLSTasksDBClient { randomness_task_exclusive_window: usize, ) -> DataAccessResult> { let before_assignment_block_height = - if current_block_height > randomness_task_exclusive_window { - current_block_height - randomness_task_exclusive_window - } else { - 0 - }; + current_block_height.saturating_sub(randomness_task_exclusive_window); BaseRandomnessTaskMutation::fetch_available_tasks( self.get_connection(), current_group_index as i32, diff --git a/crates/dal/sqlite/src/task/bsc.rs b/crates/dal/sqlite/src/task/bsc.rs index 63408a75..58ed1456 100644 --- a/crates/dal/sqlite/src/task/bsc.rs +++ b/crates/dal/sqlite/src/task/bsc.rs @@ -93,7 +93,7 @@ impl BLSTasksUpdater for BSCBLSTasksDBClient { seed_bytes, task.request_confirmations as i32, task.callback_gas_limit as i32, - u256_to_vec(&task.callback_max_gas_price), + task.callback_max_gas_price.to_be_bytes().to_vec(), task.assignment_block_height as i64, ) .await @@ -112,11 +112,7 @@ impl BLSTasksUpdater for BSCBLSTasksDBClient { randomness_task_exclusive_window: usize, ) -> DataAccessResult> { let before_assignment_block_height = - if current_block_height > randomness_task_exclusive_window { - current_block_height - randomness_task_exclusive_window - } else { - 0 - }; + current_block_height.saturating_sub(randomness_task_exclusive_window); BSCRandomnessTaskMutation::fetch_available_tasks( self.get_connection(), current_group_index as i32, diff --git a/crates/dal/sqlite/src/task/loot.rs b/crates/dal/sqlite/src/task/loot.rs index a48e4e9c..14047421 100644 --- a/crates/dal/sqlite/src/task/loot.rs +++ b/crates/dal/sqlite/src/task/loot.rs @@ -93,7 +93,7 @@ impl BLSTasksUpdater for LootBLSTasksDBClient { seed_bytes, task.request_confirmations as i32, task.callback_gas_limit as i32, - u256_to_vec(&task.callback_max_gas_price), + task.callback_max_gas_price.to_be_bytes().to_vec(), task.assignment_block_height as i64, ) .await @@ -112,11 +112,7 @@ impl BLSTasksUpdater for LootBLSTasksDBClient { randomness_task_exclusive_window: usize, ) -> DataAccessResult> { let before_assignment_block_height = - if current_block_height > randomness_task_exclusive_window { - current_block_height - randomness_task_exclusive_window - } else { - 0 - }; + current_block_height.saturating_sub(randomness_task_exclusive_window); LootRandomnessTaskMutation::fetch_available_tasks( self.get_connection(), current_group_index as i32, diff --git a/crates/dal/sqlite/src/task/main.rs b/crates/dal/sqlite/src/task/main.rs index 5b604705..6730a775 100644 --- a/crates/dal/sqlite/src/task/main.rs +++ b/crates/dal/sqlite/src/task/main.rs @@ -3,7 +3,6 @@ use crate::types::DBError; use crate::types::SqliteDB; use arpa_core::format_now_date; use arpa_core::u256_to_vec; -use arpa_core::RandomnessRequestType; use arpa_core::{address_to_string, RandomnessTask, Task}; use arpa_dal::error::DataAccessResult; use arpa_dal::error::RandomnessTaskError; @@ -11,8 +10,6 @@ use arpa_dal::{BLSTasksFetcher, BLSTasksUpdater}; use async_trait::async_trait; use entity::prelude::RandomnessTask as RandomnessTaskEntity; use entity::randomness_task; -use ethers_core::types::Address; -use ethers_core::types::U256; use sea_orm::{ActiveModelTrait, DbBackend, DbConn, DbErr, FromQueryResult, Set, Statement}; use sea_orm::{ColumnTrait, EntityTrait, QueryFilter}; use std::{marker::PhantomData, sync::Arc}; @@ -94,7 +91,7 @@ impl BLSTasksUpdater for BLSTasksDBClient { seed_bytes, task.request_confirmations as i32, task.callback_gas_limit as i32, - u256_to_vec(&task.callback_max_gas_price), + task.callback_max_gas_price.to_be_bytes().to_vec(), task.assignment_block_height as i64, ) .await @@ -113,11 +110,7 @@ impl BLSTasksUpdater for BLSTasksDBClient { randomness_task_exclusive_window: usize, ) -> DataAccessResult> { let before_assignment_block_height = - if current_block_height > randomness_task_exclusive_window { - current_block_height - randomness_task_exclusive_window - } else { - 0 - }; + current_block_height.saturating_sub(randomness_task_exclusive_window); RandomnessTaskMutation::fetch_available_tasks( self.get_connection(), current_group_index as i32, @@ -127,19 +120,7 @@ impl BLSTasksUpdater for BLSTasksDBClient { .map(|models| { models .into_iter() - .map(|model| RandomnessTask { - request_id: model.request_id, - subscription_id: model.subscription_id as u64, - group_index: model.group_index as u32, - request_type: RandomnessRequestType::from(model.request_type as u8), - params: model.params, - requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), - request_confirmations: model.request_confirmations as u16, - callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), - assignment_block_height: model.assignment_block_height as usize, - }) + .map(model_to_randomness_task) .collect::>() }) .map_err(|e| { diff --git a/crates/dal/sqlite/src/task/op.rs b/crates/dal/sqlite/src/task/op.rs index b1bb2a6d..6d3c0ff9 100644 --- a/crates/dal/sqlite/src/task/op.rs +++ b/crates/dal/sqlite/src/task/op.rs @@ -3,7 +3,6 @@ use crate::types::DBError; use crate::types::SqliteDB; use arpa_core::format_now_date; use arpa_core::u256_to_vec; -use arpa_core::RandomnessRequestType; use arpa_core::{address_to_string, RandomnessTask, Task}; use arpa_dal::error::DataAccessResult; use arpa_dal::error::RandomnessTaskError; @@ -11,8 +10,6 @@ use arpa_dal::{BLSTasksFetcher, BLSTasksUpdater}; use async_trait::async_trait; use entity::op_randomness_task; use entity::prelude::OpRandomnessTask; -use ethers_core::types::Address; -use ethers_core::types::U256; use sea_orm::{ActiveModelTrait, DbBackend, DbConn, DbErr, FromQueryResult, Set, Statement}; use sea_orm::{ColumnTrait, EntityTrait, QueryFilter}; use std::{marker::PhantomData, sync::Arc}; @@ -94,7 +91,7 @@ impl BLSTasksUpdater for OPBLSTasksDBClient { seed_bytes, task.request_confirmations as i32, task.callback_gas_limit as i32, - u256_to_vec(&task.callback_max_gas_price), + task.callback_max_gas_price.to_be_bytes().to_vec(), task.assignment_block_height as i64, ) .await @@ -113,11 +110,7 @@ impl BLSTasksUpdater for OPBLSTasksDBClient { randomness_task_exclusive_window: usize, ) -> DataAccessResult> { let before_assignment_block_height = - if current_block_height > randomness_task_exclusive_window { - current_block_height - randomness_task_exclusive_window - } else { - 0 - }; + current_block_height.saturating_sub(randomness_task_exclusive_window); OPRandomnessTaskMutation::fetch_available_tasks( self.get_connection(), current_group_index as i32, @@ -127,19 +120,7 @@ impl BLSTasksUpdater for OPBLSTasksDBClient { .map(|models| { models .into_iter() - .map(|model| RandomnessTask { - request_id: model.request_id, - subscription_id: model.subscription_id as u64, - group_index: model.group_index as u32, - request_type: RandomnessRequestType::from(model.request_type as u8), - params: model.params, - requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), - request_confirmations: model.request_confirmations as u16, - callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), - assignment_block_height: model.assignment_block_height as usize, - }) + .map(op_model_to_randomness_task) .collect::>() }) .map_err(|e| { diff --git a/crates/dal/sqlite/src/task/redstone.rs b/crates/dal/sqlite/src/task/redstone.rs index 5b106155..3e2fefc1 100644 --- a/crates/dal/sqlite/src/task/redstone.rs +++ b/crates/dal/sqlite/src/task/redstone.rs @@ -93,7 +93,7 @@ impl BLSTasksUpdater for RedstoneBLSTasksDBClient for RedstoneBLSTasksDBClient DataAccessResult> { let before_assignment_block_height = - if current_block_height > randomness_task_exclusive_window { - current_block_height - randomness_task_exclusive_window - } else { - 0 - }; + current_block_height.saturating_sub(randomness_task_exclusive_window); RedstoneRandomnessTaskMutation::fetch_available_tasks( self.get_connection(), current_group_index as i32, diff --git a/crates/dal/sqlite/src/task/taiko.rs b/crates/dal/sqlite/src/task/taiko.rs index cd51b309..29777a0f 100644 --- a/crates/dal/sqlite/src/task/taiko.rs +++ b/crates/dal/sqlite/src/task/taiko.rs @@ -93,7 +93,7 @@ impl BLSTasksUpdater for TaikoBLSTasksDBClient { seed_bytes, task.request_confirmations as i32, task.callback_gas_limit as i32, - u256_to_vec(&task.callback_max_gas_price), + task.callback_max_gas_price.to_be_bytes().to_vec(), task.assignment_block_height as i64, ) .await @@ -112,11 +112,7 @@ impl BLSTasksUpdater for TaikoBLSTasksDBClient { randomness_task_exclusive_window: usize, ) -> DataAccessResult> { let before_assignment_block_height = - if current_block_height > randomness_task_exclusive_window { - current_block_height - randomness_task_exclusive_window - } else { - 0 - }; + current_block_height.saturating_sub(randomness_task_exclusive_window); TaikoRandomnessTaskMutation::fetch_available_tasks( self.get_connection(), current_group_index as i32, diff --git a/crates/dal/sqlite/src/types.rs b/crates/dal/sqlite/src/types.rs index f18725dc..2b358d6d 100644 --- a/crates/dal/sqlite/src/types.rs +++ b/crates/dal/sqlite/src/types.rs @@ -1,3 +1,4 @@ +use alloy::primitives::{Address, U256}; use arpa_core::PartialSignature; use arpa_core::RandomnessRequestType; use arpa_core::RandomnessTask; @@ -14,8 +15,6 @@ use entity::op_randomness_task; use entity::randomness_task; use entity::redstone_randomness_task; use entity::taiko_randomness_task; -use ethers_core::types::Address; -use ethers_core::types::U256; use sea_orm::FromQueryResult; use sea_orm::{DatabaseConnection, DbErr}; use std::collections::BTreeMap; @@ -63,36 +62,34 @@ pub(crate) struct RandomnessRecord { } impl From for BLSResultCache { - fn from(randomness_record: RandomnessRecord) -> Self { + fn from(model: RandomnessRecord) -> Self { let task = RandomnessTask { - request_id: randomness_record.request_id.clone(), - subscription_id: randomness_record.subscription_id as u64, - group_index: randomness_record.group_index as u32, - request_type: RandomnessRequestType::from(randomness_record.request_type as u8), - params: randomness_record.params, - requester: randomness_record.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&randomness_record.seed), - request_confirmations: randomness_record.request_confirmations as u16, - callback_gas_limit: randomness_record.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian( - &randomness_record.callback_max_gas_price, - ), - assignment_block_height: randomness_record.assignment_block_height as usize, + request_id: model.request_id.clone(), + subscription_id: model.subscription_id as u64, + group_index: model.group_index as u32, + request_type: RandomnessRequestType::from(model.request_type as u8), + params: model.params, + requester: model.requester.parse::
().unwrap(), + seed: U256::from_be_slice(&model.seed), + request_confirmations: model.request_confirmations as u16, + callback_gas_limit: model.callback_gas_limit as u32, + callback_max_gas_price: compatible_u256_vec_to_u128(&model.callback_max_gas_price), + assignment_block_height: model.assignment_block_height as usize, }; let partial_signatures: BTreeMap = - serde_json::from_str(&randomness_record.partial_signatures).unwrap_or(BTreeMap::new()); + serde_json::from_str(&model.partial_signatures).unwrap_or(BTreeMap::new()); BLSResultCache { result_cache: RandomnessResultCache { - group_index: randomness_record.group_index as usize, - message: randomness_record.message, + group_index: model.group_index as usize, + message: model.message, randomness_task: task, partial_signatures, - threshold: randomness_record.threshold as usize, - committed_times: randomness_record.committed_times as usize, + threshold: model.threshold as usize, + committed_times: model.committed_times as usize, }, - state: BLSResultCacheState::from(randomness_record.state), + state: BLSResultCacheState::from(model.state), } } } @@ -105,10 +102,10 @@ pub(crate) fn model_to_randomness_task(model: randomness_task::Model) -> Randomn request_type: RandomnessRequestType::from(model.request_type as u8), params: model.params, requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), + seed: U256::from_be_slice(&model.seed), request_confirmations: model.request_confirmations as u16, callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + callback_max_gas_price: compatible_u256_vec_to_u128(&model.callback_max_gas_price), assignment_block_height: model.assignment_block_height as usize, } } @@ -121,10 +118,10 @@ pub(crate) fn op_model_to_randomness_task(model: op_randomness_task::Model) -> R request_type: RandomnessRequestType::from(model.request_type as u8), params: model.params, requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), + seed: U256::from_be_slice(&model.seed), request_confirmations: model.request_confirmations as u16, callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + callback_max_gas_price: compatible_u256_vec_to_u128(&model.callback_max_gas_price), assignment_block_height: model.assignment_block_height as usize, } } @@ -137,10 +134,10 @@ pub(crate) fn base_model_to_randomness_task(model: base_randomness_task::Model) request_type: RandomnessRequestType::from(model.request_type as u8), params: model.params, requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), + seed: U256::from_be_slice(&model.seed), request_confirmations: model.request_confirmations as u16, callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + callback_max_gas_price: compatible_u256_vec_to_u128(&model.callback_max_gas_price), assignment_block_height: model.assignment_block_height as usize, } } @@ -155,10 +152,10 @@ pub(crate) fn redstone_model_to_randomness_task( request_type: RandomnessRequestType::from(model.request_type as u8), params: model.params, requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), + seed: U256::from_be_slice(&model.seed), request_confirmations: model.request_confirmations as u16, callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + callback_max_gas_price: compatible_u256_vec_to_u128(&model.callback_max_gas_price), assignment_block_height: model.assignment_block_height as usize, } } @@ -171,10 +168,10 @@ pub(crate) fn loot_model_to_randomness_task(model: loot_randomness_task::Model) request_type: RandomnessRequestType::from(model.request_type as u8), params: model.params, requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), + seed: U256::from_be_slice(&model.seed), request_confirmations: model.request_confirmations as u16, callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + callback_max_gas_price: compatible_u256_vec_to_u128(&model.callback_max_gas_price), assignment_block_height: model.assignment_block_height as usize, } } @@ -189,10 +186,10 @@ pub(crate) fn taiko_model_to_randomness_task( request_type: RandomnessRequestType::from(model.request_type as u8), params: model.params, requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), + seed: U256::from_be_slice(&model.seed), request_confirmations: model.request_confirmations as u16, callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + callback_max_gas_price: compatible_u256_vec_to_u128(&model.callback_max_gas_price), assignment_block_height: model.assignment_block_height as usize, } } @@ -205,10 +202,10 @@ pub(crate) fn b3_model_to_randomness_task(model: b3_randomness_task::Model) -> R request_type: RandomnessRequestType::from(model.request_type as u8), params: model.params, requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), + seed: U256::from_be_slice(&model.seed), request_confirmations: model.request_confirmations as u16, callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + callback_max_gas_price: compatible_u256_vec_to_u128(&model.callback_max_gas_price), assignment_block_height: model.assignment_block_height as usize, } } @@ -221,10 +218,10 @@ pub(crate) fn bsc_model_to_randomness_task(model: bsc_randomness_task::Model) -> request_type: RandomnessRequestType::from(model.request_type as u8), params: model.params, requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), + seed: U256::from_be_slice(&model.seed), request_confirmations: model.request_confirmations as u16, callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + callback_max_gas_price: compatible_u256_vec_to_u128(&model.callback_max_gas_price), assignment_block_height: model.assignment_block_height as usize, } } @@ -239,10 +236,47 @@ pub(crate) fn arpa_chain_model_to_randomness_task( request_type: RandomnessRequestType::from(model.request_type as u8), params: model.params, requester: model.requester.parse::
().unwrap(), - seed: U256::from_big_endian(&model.seed), + seed: U256::from_be_slice(&model.seed), request_confirmations: model.request_confirmations as u16, callback_gas_limit: model.callback_gas_limit as u32, - callback_max_gas_price: U256::from_big_endian(&model.callback_max_gas_price), + callback_max_gas_price: compatible_u256_vec_to_u128(&model.callback_max_gas_price), assignment_block_height: model.assignment_block_height as usize, } } + +pub(crate) fn compatible_u256_vec_to_u128(vec: &[u8]) -> u128 { + if vec.len() == 32 { + let u256 = U256::from_be_slice(vec); + u256.to::() + } else { + u128::from_be_bytes(vec.try_into().unwrap()) + } +} + +#[cfg(test)] +mod tests { + use alloy::primitives::U256; + + use crate::types::compatible_u256_vec_to_u128; + + #[test] + fn test_u128_vec_to_u128() { + let u: u128 = 3124; + let vec = u.to_be_bytes().to_vec(); + assert_eq!(vec.len(), 16); + assert_eq!(compatible_u256_vec_to_u128(&vec), 3124); + let u128 = u128::from_be_bytes(vec.try_into().unwrap()); + assert_eq!(u128, 3124); + } + + #[test] + fn test_old_u256_vec_to_u128() { + let x: U256 = U256::from(3124); + let vec = x.to_be_bytes_vec(); + assert_eq!(vec.len(), 32); + assert_eq!(compatible_u256_vec_to_u128(&vec), 3124); + let u256 = U256::from_be_slice(&vec); + let u128 = u256.to::(); + assert_eq!(u128, 3124); + } +} diff --git a/crates/dal/src/cache.rs b/crates/dal/src/cache.rs index 0490b3ee..311ad1c0 100644 --- a/crates/dal/src/cache.rs +++ b/crates/dal/src/cache.rs @@ -9,6 +9,7 @@ use super::{ GroupInfoUpdater, NodeInfoFetcher, NodeInfoUpdater, ResultCache, SignatureResultCacheFetcher, SignatureResultCacheUpdater, }; +use alloy::primitives::Address; use arpa_core::log::encoder; use arpa_core::{ BLSTask, BLSTaskError, DKGStatus, DKGTask, Group, Member, PartialSignature, RandomnessTask, @@ -16,7 +17,6 @@ use arpa_core::{ }; use async_trait::async_trait; use dkg_core::primitives::DKGOutput; -use ethers_core::types::Address; use log::info; use std::collections::{BTreeMap, HashMap}; use threshold_bls::group::{Curve, Element}; @@ -25,13 +25,13 @@ use threshold_bls::sig::Share; #[derive(Debug, Default)] pub struct InMemoryBlockInfoCache { - chain_id: usize, + chain_id: u64, block_height: usize, block_time: usize, } impl InMemoryBlockInfoCache { - pub fn new(chain_id: usize, block_time: usize) -> Self { + pub fn new(chain_id: u64, block_time: usize) -> Self { InMemoryBlockInfoCache { chain_id, block_height: 0, @@ -43,7 +43,7 @@ impl InMemoryBlockInfoCache { impl BlockInfoHandler for InMemoryBlockInfoCache {} impl BlockInfoFetcher for InMemoryBlockInfoCache { - fn get_chain_id(&self) -> usize { + fn get_chain_id(&self) -> u64 { self.chain_id } diff --git a/crates/dal/src/error.rs b/crates/dal/src/error.rs index 085a3de5..33275a6a 100644 --- a/crates/dal/src/error.rs +++ b/crates/dal/src/error.rs @@ -21,7 +21,7 @@ pub enum DataAccessError { DBError(anyhow::Error), #[error("the chain id: {0} is not supported")] - InvalidChainId(usize), + InvalidChainId(u64), #[error("could not deserialize: {0}")] DeserializationError(#[from] bincode::Error), diff --git a/crates/dal/src/lib.rs b/crates/dal/src/lib.rs index 7e338f6a..f37a48b7 100644 --- a/crates/dal/src/lib.rs +++ b/crates/dal/src/lib.rs @@ -1,12 +1,12 @@ pub mod cache; pub mod error; +use alloy::primitives::Address; use arpa_core::{DKGStatus, DKGTask, Group, Member, Task}; use async_trait::async_trait; use cache::BLSResultCache; pub use dkg_core::primitives::DKGOutput; use error::DataAccessResult; -use ethers_core::types::Address; use std::collections::BTreeMap; use std::fmt::Debug; use threshold_bls::{group::Curve, sig::Share}; @@ -35,7 +35,7 @@ pub trait SignatureResultCacheHandler: } pub trait BlockInfoFetcher { - fn get_chain_id(&self) -> usize; + fn get_chain_id(&self) -> u64; fn get_block_height(&self) -> usize; diff --git a/crates/dkg-core/src/lib.rs b/crates/dkg-core/src/lib.rs index 7fa06a62..ab6222f6 100644 --- a/crates/dkg-core/src/lib.rs +++ b/crates/dkg-core/src/lib.rs @@ -6,7 +6,6 @@ //! The implementation is a state machine which has Phases 0 to 3. Phase 3 is only reachable if any of the //! n parties does not publish its shares in the first phase. If less than t parties participate in any stage, //! the DKG fails. - /// Board trait and implementations for publishing data from each DKG phase pub mod board; pub use board::BoardPublisher; diff --git a/crates/dkg-core/src/primitives/common.rs b/crates/dkg-core/src/primitives/common.rs index 1d6166eb..735b87d3 100644 --- a/crates/dkg-core/src/primitives/common.rs +++ b/crates/dkg-core/src/primitives/common.rs @@ -169,9 +169,9 @@ pub fn compute_bundle_response( /// following way: /// /// - All responses get broadcast: You assume that shares of other nodes are -/// not good unless you hear otherwise. - Broadcast only responses which -/// are complaints: You assume that shares of other nodes are good unless -/// you hear otherwise. +/// not good unless you hear otherwise. - Broadcast only responses which +/// are complaints: You assume that shares of other nodes are good unless +/// you hear otherwise. pub fn process_shares_get_all( dealers: &Group, share_holders: &Group, diff --git a/crates/dkg-core/src/primitives/joint_feldman.rs b/crates/dkg-core/src/primitives/joint_feldman.rs index 13a46296..6777716f 100644 --- a/crates/dkg-core/src/primitives/joint_feldman.rs +++ b/crates/dkg-core/src/primitives/joint_feldman.rs @@ -354,7 +354,8 @@ where /// - bundle's dealer index is in range /// - a justification was required for the given share (no-op) /// - share corresponds to public polynomial received in the bundled shares during - /// first period. + /// first period. + /// /// Return an output if `len(qual) > thr` fn process_justifications( self, diff --git a/crates/dkg-core/src/primitives/resharing.rs b/crates/dkg-core/src/primitives/resharing.rs index cef1a232..8cfe19af 100644 --- a/crates/dkg-core/src/primitives/resharing.rs +++ b/crates/dkg-core/src/primitives/resharing.rs @@ -362,7 +362,8 @@ where /// - bundle's dealer index is in range /// - a justification was required for the given share (no-op) /// - share corresponds to public polynomial received in the bundled shares during - /// first period. + /// first period. + /// /// Return an output if `len(qual) > thr` fn process_justifications( self, diff --git a/crates/log/Cargo.toml b/crates/log/Cargo.toml index d6f0145a..2679e3cc 100644 --- a/crates/log/Cargo.toml +++ b/crates/log/Cargo.toml @@ -12,7 +12,7 @@ keywords.workspace = true exclude.workspace = true [dependencies] -arpa-log-impl = { version = "0.3.0-alpha.2", path = "./impl" } +arpa-log-impl = { version = "0.4.0-alpha.1", path = "./impl" } log = "0.4" log-mdc = "0.1.0" diff --git a/crates/log/impl/src/lib.rs b/crates/log/impl/src/lib.rs index d85a43d0..20156221 100644 --- a/crates/log/impl/src/lib.rs +++ b/crates/log/impl/src/lib.rs @@ -1,5 +1,4 @@ #![feature(box_patterns)] - use proc_macro::TokenStream; use proc_macro2::{Ident, TokenStream as TokenStream2}; use quote::quote; diff --git a/crates/log/src/lib.rs b/crates/log/src/lib.rs index 09e2d521..369c211e 100644 --- a/crates/log/src/lib.rs +++ b/crates/log/src/lib.rs @@ -1,31 +1,32 @@ //! As an attribute macro, log_function will //! 1. Automatically log the name, input and return value of current function at debug level -//! before it returns by trying to recognize return stmt and inserting a `debug!` stmt. +//! before it returns by trying to recognize return stmt and inserting a `debug!` stmt. //! 2. Set the name of current function as a key in `mdc` at the beginning of the function and -//! remove it before the function returns. +//! remove it before the function returns. //! //! Note: //! 1. Input and return type need to implement `Debug`. //! 2. When dealing with async function, using `#![feature(async_fn_in_trait)]` is recommended. -//! Also this is compatible with `#[async_trait]`. +//! Also this is compatible with `#[async_trait]`. //! 3. To protect secrets, input and return values are ignored by default. -//! You can specify whether to print all values, or a subset of them with semantic literal options. +//! You can specify whether to print all values, or a subset of them with semantic literal options. +//! //! For example: -//! ``` -//! use arpa_log::*; +//! ``` +//! use arpa_log::*; //! -//! #[log_function("show-input", "except foo bar", "show-return")] -//! fn show_subset_of_input_and_return_value(foo: usize, bar: usize, baz: usize) -> usize { -//! foo + bar + baz -//! } -//! ``` -//! Then the log should be: {"message":"LogModel { fn_name: \"show_subset_of_input_and_return_value\", -//! fn_args: [\"foo: ignored\", \"bar: ignored\", \"baz: 3\"], fn_return: \"6\" }","level":"DEBUG", -//! "target":"show_subset_of_input_and_return_value","mdc":{"fn_name":"show_subset_of_input_and_return_value"}} -//! with test logger. +//! #[log_function("show-input", "except foo bar", "show-return")] +//! fn show_subset_of_input_and_return_value(foo: usize, bar: usize, baz: usize) -> usize { +//! foo + bar + baz +//! } +//! ``` +//! Then the log should be: {"message":"LogModel { fn_name: \"show_subset_of_input_and_return_value\", +//! fn_args: [\"foo: ignored\", \"bar: ignored\", \"baz: 3\"], fn_return: \"6\" }","level":"DEBUG", +//! "target":"show_subset_of_input_and_return_value","mdc":{"fn_name":"show_subset_of_input_and_return_value"}} +//! with test logger. //! //! Note: Logging result can be different with different logger implementation. - +#![allow(clippy::doc_overindented_list_items)] pub use arpa_log_impl::*; pub use log::debug; pub use log_mdc; diff --git a/crates/threshold-bls/Cargo.toml b/crates/threshold-bls/Cargo.toml index 52b2323c..e2483ae6 100644 --- a/crates/threshold-bls/Cargo.toml +++ b/crates/threshold-bls/Cargo.toml @@ -27,18 +27,18 @@ hkdf = "0.8" sha2 = "0.8" # bls12_381 -ark-bls12-381 = { version = "0.3.0", optional = true } +ark-bls12-381 = { version = "0.5.0", optional = true } # bn -ark-bn254 = { version = "0.3.0", optional = true } +ark-bn254 = { version = "0.5.0", optional = true } -ark-serialize = { version = "0.3.0", features = ["derive"] } -ark-ff = { version = "0.3.0", features = ["std"] } -ark-ec = { version = "0.3.0", features = ["std"] } +ark-serialize = { version = "0.5.0", features = ["derive"] } +ark-ff = { version = "0.5.0", features = ["std"] } +ark-ec = { version = "0.5.0", features = ["std"] } thiserror = "1.0.15" bincode = "1.2.1" -ethers-core.workspace = true +alloy = { workspace = true, features = ["full"] } log = "0.4" [features] diff --git a/crates/threshold-bls/src/curve/bls12381.rs b/crates/threshold-bls/src/curve/bls12381.rs index 13fa6b5b..f20956ed 100644 --- a/crates/threshold-bls/src/curve/bls12381.rs +++ b/crates/threshold-bls/src/curve/bls12381.rs @@ -1,12 +1,15 @@ +use super::{BLSError, CurveType}; use crate::group::{self, Element, PairingCurve as PC, Point, Scalar as Sc}; use crate::hash::hasher::Keccak256Hasher; use crate::hash::try_and_increment::TryAndIncrement; use crate::hash::HashToCurve; use ark_bls12_381 as bls12_381; -use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; +use ark_ec::pairing::Pairing; +use ark_ec::CurveGroup; +use ark_ec::PrimeGroup; use ark_ff::PrimeField; use ark_ff::{Field, One, UniformRand, Zero}; -use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Compress}; use rand_core::RngCore; use serde::{ de::{Error as DeserializeError, SeqAccess, Visitor}, @@ -18,11 +21,8 @@ use std::{ marker::PhantomData, ops::{AddAssign, MulAssign, Neg, SubAssign}, }; - use thiserror::Error; -use super::{BLSError, CurveType}; - #[derive(Debug, Error)] pub enum BLS12Error { #[error("{0}")] @@ -35,10 +35,10 @@ pub enum BLS12Error { pub struct Scalar( #[serde(deserialize_with = "deserialize_field")] #[serde(serialize_with = "serialize_field")] - ::Fr, + bls12_381::Fr, ); -type ZG1 = ::G1Projective; +type ZG1 = bls12_381::G1Projective; #[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize)] pub struct G1( @@ -47,7 +47,7 @@ pub struct G1( ZG1, ); -type ZG2 = ::G2Projective; +type ZG2 = bls12_381::G2Projective; #[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize)] pub struct G2( @@ -60,7 +60,7 @@ pub struct G2( pub struct GT( #[serde(deserialize_with = "deserialize_field")] #[serde(serialize_with = "serialize_field")] - ::Fqk, + bls12_381::Fq12, ); impl Element for Scalar { @@ -120,7 +120,7 @@ impl Element for G1 { } fn one() -> Self { - Self(ZG1::prime_subgroup_generator()) + Self(ZG1::generator()) } fn rand(rng: &mut R) -> Self { @@ -145,7 +145,7 @@ impl Point for G1 { let hash = hasher.hash(&[], data)?; - *self = Self(hash); + *self = Self(hash.into()); Ok(()) } @@ -166,7 +166,7 @@ impl Element for G2 { } fn one() -> Self { - Self(ZG2::prime_subgroup_generator()) + Self(ZG2::generator()) } fn rand(mut rng: &mut R) -> Self { @@ -191,7 +191,7 @@ impl Point for G2 { let hash = hasher.hash(&[], data)?; - *self = Self(hash); + *self = Self(hash.into()); Ok(()) } @@ -216,7 +216,7 @@ impl Element for GT { self.0.mul_assign(s2.0); } fn mul(&mut self, mul: &Scalar) { - let scalar = mul.0.into_repr(); + let scalar = mul.0.into_bigint(); let mut res = Self::one(); let mut temp = *self; for b in ark_ff::BitIteratorLE::without_trailing_zeros(scalar) { @@ -251,7 +251,7 @@ impl PC for PairingCurve { type GT = GT; fn pair(a: &Self::G1, b: &Self::G2) -> Self::GT { - GT(::pairing(a.0, b.0)) + GT(bls12_381::Bls12_381::pairing(a.0, b.0).0) } } @@ -278,7 +278,7 @@ where where S: SeqAccess<'de>, { - let len = C::zero().serialized_size(); + let len = C::ZERO.serialized_size(Compress::Yes); let bytes: Vec = (0..len) .map(|_| { seq.next_element()? @@ -286,13 +286,14 @@ where }) .collect::, _>>()?; - let res = C::deserialize(&mut &bytes[..]).map_err(DeserializeError::custom)?; + let res = + C::deserialize_compressed(&mut &bytes[..]).map_err(DeserializeError::custom)?; Ok(res) } } let visitor = FieldVisitor(PhantomData); - deserializer.deserialize_tuple(C::zero().serialized_size(), visitor) + deserializer.deserialize_tuple(C::ZERO.serialized_size(Compress::Yes), visitor) } fn serialize_field(c: &C, s: S) -> Result @@ -300,9 +301,9 @@ where S: Serializer, C: Field, { - let len = c.serialized_size(); + let len = c.serialized_size(Compress::Yes); let mut bytes = Vec::with_capacity(len); - c.serialize(&mut bytes) + c.serialize_compressed(&mut bytes) .map_err(SerializationError::custom)?; let mut tup = s.serialize_tuple(len)?; @@ -315,14 +316,14 @@ where fn deserialize_group<'de, D, C>(deserializer: D) -> Result where D: Deserializer<'de>, - C: ProjectiveCurve, + C: CurveGroup, C::Affine: CanonicalDeserialize + CanonicalSerialize, { struct GroupVisitor(PhantomData); impl<'de, C> Visitor<'de> for GroupVisitor where - C: ProjectiveCurve, + C: CurveGroup, //C::Affine: CanonicalDeserialize + CanonicalSerialize, { type Value = C; @@ -335,7 +336,7 @@ where where S: SeqAccess<'de>, { - let len = C::Affine::zero().serialized_size(); //C::Affine::SERIALIZED_SIZE; + let len = C::ZERO.serialized_size(Compress::Yes); //C::Affine::SERIALIZED_SIZE; let bytes: Vec = (0..len) .map(|_| { seq.next_element()? @@ -343,27 +344,27 @@ where }) .collect::, _>>()?; - let affine = - C::Affine::deserialize(&mut &bytes[..]).map_err(DeserializeError::custom)?; - Ok(affine.into_projective()) + let affine = C::Affine::deserialize_compressed(&mut &bytes[..]) + .map_err(DeserializeError::custom)?; + Ok(affine.into()) } } let visitor = GroupVisitor(PhantomData); - deserializer.deserialize_tuple(C::Affine::zero().serialized_size(), visitor) + deserializer.deserialize_tuple(C::ZERO.serialized_size(Compress::Yes), visitor) } fn serialize_group(c: &C, s: S) -> Result where S: Serializer, - C: ProjectiveCurve, + C: CurveGroup, C::Affine: CanonicalSerialize, { let affine = c.into_affine(); - let len = affine.serialized_size(); + let len = affine.serialized_size(Compress::Yes); let mut bytes = Vec::with_capacity(len); affine - .serialize(&mut bytes) + .serialize_compressed(&mut bytes) .map_err(SerializationError::custom)?; let mut tup = s.serialize_tuple(len)?; diff --git a/crates/threshold-bls/src/curve/bn254.rs b/crates/threshold-bls/src/curve/bn254.rs index f8a72e99..b80e9f8c 100644 --- a/crates/threshold-bls/src/curve/bn254.rs +++ b/crates/threshold-bls/src/curve/bn254.rs @@ -4,9 +4,12 @@ use crate::hash::try_and_increment::TryAndIncrement; use crate::hash::HashToCurve; use crate::serialize::ContractSerialize; use ark_bn254 as bn254; -use ark_ec::{PairingEngine, ProjectiveCurve}; +// use ark_ec::{PairingEngine, ProjectiveCurve}; +use ark_ec::pairing::Pairing; +use ark_ec::PrimeGroup; use ark_ff::PrimeField; use ark_ff::{Field, One, UniformRand, Zero}; +use ark_serialize::Compress; use rand_core::RngCore; use serde::{ de::{Error as DeserializeError, SeqAccess, Visitor}, @@ -35,15 +38,15 @@ pub enum BNError { pub struct Scalar( #[serde(deserialize_with = "deserialize_field")] #[serde(serialize_with = "serialize_field")] - ::Fr, + bn254::Fr, ); -type ZG1 = ::G1Projective; +type ZG1 = bn254::G1Projective; #[derive(Debug, Clone, Copy, Eq, PartialEq)] pub struct G1(pub(crate) ZG1); -type ZG2 = ::G2Projective; +type ZG2 = bn254::G2Projective; #[derive(Debug, Clone, Copy, Eq, PartialEq)] pub struct G2(pub(crate) ZG2); @@ -154,7 +157,7 @@ impl<'de> Deserialize<'de> for G2 { pub struct GT( #[serde(deserialize_with = "deserialize_field")] #[serde(serialize_with = "serialize_field")] - ::Fqk, + bn254::Fq12, ); impl Element for Scalar { @@ -214,7 +217,7 @@ impl Element for G1 { } fn one() -> Self { - Self(ZG1::prime_subgroup_generator()) + Self(ZG1::generator()) } fn rand(rng: &mut R) -> Self { @@ -239,7 +242,7 @@ impl Point for G1 { let hash = hasher.hash(&[], data)?; - *self = Self(hash); + *self = Self(hash.into()); Ok(()) } @@ -260,7 +263,7 @@ impl Element for G2 { } fn one() -> Self { - Self(ZG2::prime_subgroup_generator()) + Self(ZG2::generator()) } fn rand(mut rng: &mut R) -> Self { @@ -285,7 +288,7 @@ impl Point for G2 { let hash = hasher.hash(&[], data)?; - *self = Self(hash); + *self = Self(hash.into()); Ok(()) } @@ -310,7 +313,7 @@ impl Element for GT { self.0.mul_assign(s2.0); } fn mul(&mut self, mul: &Scalar) { - let scalar = mul.0.into_repr(); + let scalar = mul.0.into_bigint(); let mut res = Self::one(); let mut temp = *self; for b in ark_ff::BitIteratorLE::without_trailing_zeros(scalar) { @@ -345,7 +348,7 @@ impl PC for PairingCurve { type GT = GT; fn pair(a: &Self::G1, b: &Self::G2) -> Self::GT { - GT(::pairing(a.0, b.0)) + GT(bn254::Bn254::pairing(a.0, b.0).0) } } @@ -372,7 +375,7 @@ where where S: SeqAccess<'de>, { - let len = C::zero().serialized_size(); + let len = C::ZERO.serialized_size(Compress::Yes); let bytes: Vec = (0..len) .map(|_| { seq.next_element()? @@ -380,13 +383,14 @@ where }) .collect::, _>>()?; - let res = C::deserialize(&mut &bytes[..]).map_err(DeserializeError::custom)?; + let res = + C::deserialize_compressed(&mut &bytes[..]).map_err(DeserializeError::custom)?; Ok(res) } } let visitor = FieldVisitor(PhantomData); - deserializer.deserialize_tuple(C::zero().serialized_size(), visitor) + deserializer.deserialize_tuple(C::ZERO.serialized_size(Compress::Yes), visitor) } fn serialize_field(c: &C, s: S) -> Result @@ -394,9 +398,9 @@ where S: Serializer, C: Field, { - let len = c.serialized_size(); + let len = c.serialized_size(Compress::Yes); let mut bytes = Vec::with_capacity(len); - c.serialize(&mut bytes) + c.serialize_compressed(&mut bytes) .map_err(SerializationError::custom)?; let mut tup = s.serialize_tuple(len)?; diff --git a/crates/threshold-bls/src/curve/mod.rs b/crates/threshold-bls/src/curve/mod.rs index 26695d3c..c131219a 100644 --- a/crates/threshold-bls/src/curve/mod.rs +++ b/crates/threshold-bls/src/curve/mod.rs @@ -71,11 +71,10 @@ mod tests { use crate::curve::bn254::G2Curve; use crate::group::Curve; use crate::group::Element; - use ethers_core::utils::hex; - use rand::prelude::*; + use alloy::hex; fn keypair() -> (C::Scalar, C::Point) { - let private = C::Scalar::rand(&mut thread_rng()); + let private = C::Scalar::rand(&mut rand::thread_rng()); let mut public = C::Point::one(); public.mul(&private); (private, public) diff --git a/crates/threshold-bls/src/group.rs b/crates/threshold-bls/src/group.rs index 0d740b66..51c454ac 100644 --- a/crates/threshold-bls/src/group.rs +++ b/crates/threshold-bls/src/group.rs @@ -1,6 +1,6 @@ //! Traits for operating on Groups and Elliptic Curves. -use rand_core::RngCore; +use rand::Rng; use serde::{Deserialize, Serialize}; use std::fmt::{Debug, Display}; use std::marker::PhantomData; @@ -28,7 +28,7 @@ pub trait Element: fn mul(&mut self, mul: &Self::RHS); /// Samples a random element using the provided RNG - fn rand(rng: &mut R) -> Self; + fn rand(rng: &mut R) -> Self; /// Returns the zero element of the group fn zero() -> Self { diff --git a/crates/threshold-bls/src/hash/hasher.rs b/crates/threshold-bls/src/hash/hasher.rs index 78c72f9e..27b5a71f 100644 --- a/crates/threshold-bls/src/hash/hasher.rs +++ b/crates/threshold-bls/src/hash/hasher.rs @@ -13,13 +13,13 @@ impl Hasher for Keccak256Hasher { type Error = BLSError; fn hash(&self, _domain: &[u8], message: &[u8]) -> Result, Self::Error> { - Ok(ethers_core::utils::keccak256(message).into()) + Ok(alloy::primitives::keccak256(message).to_vec()) } } #[cfg(test)] pub mod tests { - use ethers_core::utils::hex; + use alloy::primitives::hex; use super::{Hasher, Keccak256Hasher}; diff --git a/crates/threshold-bls/src/hash/mod.rs b/crates/threshold-bls/src/hash/mod.rs index 38c643a4..c2b68569 100644 --- a/crates/threshold-bls/src/hash/mod.rs +++ b/crates/threshold-bls/src/hash/mod.rs @@ -20,31 +20,35 @@ mod test { try_and_increment::TryAndIncrement, *, }; - use ark_bn254::Parameters; - use ark_ec::{bn::BnParameters, models::SWModelParameters, ProjectiveCurve}; + use alloy::{hex, primitives::U256}; + use ark_bn254::g2::Config as G2Config; + use ark_ec::short_weierstrass::SWCurveConfig; + // use ark_ec::{ + // bn::BnParameters, models::short_weierstrass::SWModelParameters, + // short_weierstrass::SWCurveConfig, ProjectiveCurve, + // }; use ark_serialize::CanonicalSerialize; - use ethers_core::{types::U256, utils::hex}; #[test] fn hash_to_curve_direct_g1() { let h = Keccak256Hasher; // hash_to_curve_test::<_, ::G1Parameters>(h, b"hello"); - hash_to_curve_test::<_, ::G2Parameters>(h, b"hello01"); - hash_to_curve_test::<_, ::G2Parameters>(h, b"hello02"); - hash_to_curve_test::<_, ::G2Parameters>(h, b"hello03"); - hash_to_curve_test::<_, ::G2Parameters>(h, b"hello04"); - hash_to_curve_test::<_, ::G2Parameters>(h, b"hello05"); + hash_to_curve_test::<_, G2Config>(h, b"hello01"); + hash_to_curve_test::<_, G2Config>(h, b"hello02"); + hash_to_curve_test::<_, G2Config>(h, b"hello03"); + hash_to_curve_test::<_, G2Config>(h, b"hello04"); + hash_to_curve_test::<_, G2Config>(h, b"hello05"); } - fn hash_to_curve_test, P: SWModelParameters>(h: X, input: &[u8]) { + fn hash_to_curve_test, P: SWCurveConfig>(h: X, input: &[u8]) { let hasher = TryAndIncrement::::new(&h); let g = hasher.hash(&[], input).unwrap(); let mut xbytes = vec![]; - g.into_affine().x.serialize(&mut xbytes).unwrap(); + g.x.serialize_compressed(&mut xbytes).unwrap(); println!("{}", g); let mut ybytes = vec![]; - g.into_affine().y.serialize(&mut ybytes).unwrap(); + g.y.serialize_compressed(&mut ybytes).unwrap(); print_point("x", &xbytes); print_point("y", &ybytes); } @@ -62,9 +66,9 @@ mod test { print!(" "); println!("{:?}", hex::encode(x2.clone())); // Dec - print!("{:?}", U256::from(&x1 as &[u8])); + print!("{:?}", U256::from_be_slice(&x1)); print!(" "); - println!("{:?}", U256::from(&x2 as &[u8])); + println!("{:?}", U256::from_be_slice(&x2)); println!(""); } } diff --git a/crates/threshold-bls/src/hash/try_and_increment.rs b/crates/threshold-bls/src/hash/try_and_increment.rs index 02ca6717..3793cc1e 100644 --- a/crates/threshold-bls/src/hash/try_and_increment.rs +++ b/crates/threshold-bls/src/hash/try_and_increment.rs @@ -1,11 +1,10 @@ use super::{hasher::Hasher, HashToCurve}; use crate::curve::BLSError; -use ark_ec::models::{ - short_weierstrass_jacobian::{GroupAffine, GroupProjective}, - SWModelParameters, -}; -use ark_ff::{Field, PrimeField, Zero}; -use ethers_core::utils::hex; +use alloy::hex; +use ark_ec::{models::short_weierstrass::Affine, short_weierstrass::SWCurveConfig}; +// GroupAffine, GroupProjective, SWCurveConfig +use ark_ec::AffineRepr; +use ark_ff::{Field, PrimeField}; use log::debug; use std::marker::PhantomData; @@ -21,7 +20,7 @@ pub struct TryAndIncrement<'a, H, P> { impl<'a, H, P> TryAndIncrement<'a, H, P> where H: Hasher, - P: SWModelParameters, + P: SWCurveConfig, { /// Instantiates a new Try-and-increment hasher with the provided hashing method /// and curve parameters based on the type @@ -36,9 +35,9 @@ where impl<'a, H, P> HashToCurve for TryAndIncrement<'a, H, P> where H: Hasher, - P: SWModelParameters, + P: SWCurveConfig, { - type Output = GroupProjective

; + type Output = Affine

; fn hash(&self, domain: &[u8], message: &[u8]) -> Result { self.hash_with_attempt(domain, message).map(|res| res.0) @@ -48,13 +47,13 @@ where impl<'a, H, P> TryAndIncrement<'a, H, P> where H: Hasher, - P: SWModelParameters, + P: SWCurveConfig, { pub fn hash_with_attempt( &self, domain: &[u8], message: &[u8], - ) -> Result<(GroupProjective

, usize), BLSError> { + ) -> Result<(Affine

, usize), BLSError> { let mut candidate_hash = self.hasher.hash(domain, message)?; for c in 0..NUM_TRIES { @@ -63,20 +62,20 @@ where let f = ::BasePrimeField::from_be_bytes_mod_order( &candidate_hash, ); - P::BaseField::from_base_prime_field_elems(&[f]) + P::BaseField::from_base_prime_field_elems([f]) } else { P::BaseField::from_random_bytes(&candidate_hash) }; if let Some(x) = xfield { - if let Some(p) = GroupAffine::get_point_from_x(x, false) { + if let Some(p) = Affine::get_point_from_x_unchecked(x, false) { debug!( "succeeded hashing \"{}\" to curve in {} tries", hex::encode(message), c + 1 ); - let scaled = p.scale_by_cofactor(); + let scaled = p.mul_by_cofactor(); if scaled.is_zero() { continue; } diff --git a/crates/threshold-bls/src/poly.rs b/crates/threshold-bls/src/poly.rs index 47339b3a..7e5d1d18 100644 --- a/crates/threshold-bls/src/poly.rs +++ b/crates/threshold-bls/src/poly.rs @@ -68,8 +68,7 @@ impl Poly { /// /// In the context of secret sharing, the threshold is the degree + 1. pub fn new(degree: usize) -> Self { - use rand::prelude::*; - Self::new_from(degree, &mut thread_rng()) + Self::new_from(degree, &mut rand::thread_rng()) } /// Returns a polynomial from the given list of coefficients @@ -358,7 +357,6 @@ pub mod tests { use super::*; use crate::curve::bls12381::Scalar as Sc; use crate::curve::bls12381::G1; - use rand::prelude::*; #[test] fn poly_degree() { @@ -574,7 +572,7 @@ pub mod tests { #[test] fn new_neg_constant() { - let mut constant = Sc::rand(&mut thread_rng()); + let mut constant = Sc::rand(&mut rand::thread_rng()); let p = Poly::::new_neg_constant(constant); constant.negate(); diff --git a/crates/threshold-bls/src/serialize/mod.rs b/crates/threshold-bls/src/serialize/mod.rs index c87ba00a..70e7d93e 100644 --- a/crates/threshold-bls/src/serialize/mod.rs +++ b/crates/threshold-bls/src/serialize/mod.rs @@ -1,10 +1,11 @@ use crate::curve::{bn254, BLSError}; use crate::group::{Point, Scalar}; -use ark_ec::{AffineCurve, ModelParameters, ProjectiveCurve}; +use alloy::hex; +use ark_ec::CurveConfig; +use ark_ec::CurveGroup; use ark_ff::Field; use ark_ff::PrimeField; use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; -use ethers_core::utils::hex; pub trait ContractSerialize: Sized { /// Serialize the group element into a byte vector. @@ -16,7 +17,10 @@ pub trait ContractSerialize: Sized { impl ContractSerialize for bn254::G1 { fn serialize_to_contract_form(&self) -> Result, BLSError> { let mut xbytes = vec![]; - self.0.into_affine().serialize(&mut xbytes).unwrap(); + self.0 + .into_affine() + .serialize_compressed(&mut xbytes) + .unwrap(); xbytes.reverse(); @@ -27,17 +31,21 @@ impl ContractSerialize for bn254::G1 { let mut ele_bytes = bytes.to_vec(); ele_bytes.reverse(); - let affine = ark_bn254::G1Affine::deserialize(&mut &ele_bytes[..]) + let affine = ark_bn254::G1Affine::deserialize_compressed(&mut &ele_bytes[..]) .map_err(|_| BLSError::ContractSerializationError)?; - Ok(bn254::G1(affine.into_projective())) + Ok(bn254::G1(affine.into())) } } impl ContractSerialize for bn254::G2 { fn serialize_to_contract_form(&self) -> Result, BLSError> { let mut xbytes = vec![]; - self.0.into_affine().x.serialize(&mut xbytes).unwrap(); + self.0 + .into_affine() + .x + .serialize_compressed(&mut xbytes) + .unwrap(); let mut x1 = xbytes[..32].to_vec(); let mut x2 = xbytes[32..].to_vec(); @@ -46,7 +54,11 @@ impl ContractSerialize for bn254::G2 { x2.reverse(); let mut ybytes = vec![]; - self.0.into_affine().y.serialize(&mut ybytes).unwrap(); + self.0 + .into_affine() + .y + .serialize_compressed(&mut ybytes) + .unwrap(); let mut y1 = ybytes[..32].to_vec(); let mut y2 = ybytes[32..].to_vec(); @@ -64,20 +76,19 @@ impl ContractSerialize for bn254::G2 { let mut x2 = bytes[32..64].to_vec(); let f_y1 = - <::BaseField as Field>::BasePrimeField::from_be_bytes_mod_order( + <::BaseField as Field>::BasePrimeField::from_be_bytes_mod_order( &bytes[64..96], ); let f_y2 = - <::BaseField as Field>::BasePrimeField::from_be_bytes_mod_order( + <::BaseField as Field>::BasePrimeField::from_be_bytes_mod_order( &bytes[96..], ); - let f_y = - ::BaseField::from_base_prime_field_elems( - &[f_y1, f_y2], - ) - .ok_or(BLSError::NotValidPoint)?; + let f_y = ::BaseField::from_base_prime_field_elems([ + f_y1, f_y2, + ]) + .ok_or(BLSError::NotValidPoint)?; if f_y > -f_y { x2[0] |= 1 << 7; @@ -88,10 +99,10 @@ impl ContractSerialize for bn254::G2 { let bytes = [&x1[..], &x2[..]].concat(); - let affine = ark_bn254::G2Affine::deserialize(&mut &bytes[..]) + let affine = ark_bn254::G2Affine::deserialize_compressed(&mut &bytes[..]) .map_err(|_| BLSError::ContractSerializationError)?; - Ok(bn254::G2(affine.into_projective())) + Ok(bn254::G2(affine.into())) } } diff --git a/crates/threshold-bls/src/sig/bls.rs b/crates/threshold-bls/src/sig/bls.rs index f267dd63..b664147a 100644 --- a/crates/threshold-bls/src/sig/bls.rs +++ b/crates/threshold-bls/src/sig/bls.rs @@ -209,10 +209,9 @@ mod tests { use super::*; use crate::curve::bn254::{G1Curve, G2Curve, PairingCurve as PCurve}; use crate::group::Curve; - use rand::prelude::*; fn keypair() -> (C::Scalar, C::Point) { - let private = C::Scalar::rand(&mut thread_rng()); + let private = C::Scalar::rand(&mut rand::thread_rng()); let mut public = C::Point::one(); public.mul(&private); (private, public) diff --git a/crates/threshold-bls/src/sig/sig.rs b/crates/threshold-bls/src/sig/sig.rs index 434c45d4..07940268 100644 --- a/crates/threshold-bls/src/sig/sig.rs +++ b/crates/threshold-bls/src/sig/sig.rs @@ -98,7 +98,6 @@ pub trait SignatureScheme: Scheme { /// // clear message. /// G2Scheme::::blind_verify(&public,&blinded_msg,&blinded_sig) /// .expect("blinded signatures should be correct"); - /// // the owner of the message can then unblind the signature to reveal a /// // regular signature that can be verified using the regular method of the /// // SignatureScheme. diff --git a/crates/threshold-bls/src/test_bls.rs b/crates/threshold-bls/src/test_bls.rs index bd687df4..fd436684 100644 --- a/crates/threshold-bls/src/test_bls.rs +++ b/crates/threshold-bls/src/test_bls.rs @@ -1,9 +1,5 @@ #[cfg(test)] pub mod tests { - use ark_ec::ProjectiveCurve; - use ark_serialize::CanonicalSerialize; - use ethers_core::{types::U256, utils::hex}; - use crate::curve::bn254::PairingCurve; use crate::group::{Element, Scalar}; use crate::poly::Eval; @@ -14,6 +10,9 @@ pub mod tests { schemes::bn254::G2Scheme as SigScheme, sig::{G2Scheme, Scheme, Share, SignatureScheme, ThresholdScheme}, }; + use alloy::{hex, primitives::U256}; + use ark_ec::CurveGroup; + use ark_serialize::CanonicalSerialize; #[test] fn test_dkg_bls_over_bn254() { @@ -89,8 +88,7 @@ pub mod tests { for i in 0..seed_arr.len() { let seed = hex::decode(seed_arr[i]).unwrap(); let block_num = U256::from(block_num_arr[i]); - let mut block_num_bytes = vec![0u8; 32]; - block_num.to_big_endian(&mut block_num_bytes); + let block_num_bytes = block_num.to_be_bytes::<32>().to_vec(); // Generate the partial signatures let msg = [seed, block_num_bytes].concat(); @@ -171,9 +169,9 @@ pub mod tests { print!(" "); println!("{:?}", hex::encode(x2.clone())); // Dec - print!("{:?}", U256::from(&x1 as &[u8])); + print!("{:?}", U256::from_be_slice(&x1)); print!(" "); - println!("{:?}", U256::from(&x2 as &[u8])); + println!("{:?}", U256::from_be_slice(&x2)); println!(""); } @@ -186,24 +184,36 @@ pub mod tests { // Hex println!("{:?}", hex::encode(x1.clone())); // Dec - println!("{:?}", U256::from(&x1 as &[u8])); + println!("{:?}", U256::from_be_slice(&x1)); println!(""); } fn print_g2_point(p: &G2) { let mut xbytes = vec![]; - p.0.into_affine().x.serialize(&mut xbytes).unwrap(); + p.0.into_affine() + .x + .serialize_compressed(&mut xbytes) + .unwrap(); let mut ybytes = vec![]; - p.0.into_affine().y.serialize(&mut ybytes).unwrap(); + p.0.into_affine() + .y + .serialize_compressed(&mut ybytes) + .unwrap(); print_g2_affine("x", &xbytes); print_g2_affine("y", &ybytes); } fn print_g1_point(p: &G1) { let mut xbytes = vec![]; - p.0.into_affine().x.serialize(&mut xbytes).unwrap(); + p.0.into_affine() + .x + .serialize_compressed(&mut xbytes) + .unwrap(); let mut ybytes = vec![]; - p.0.into_affine().y.serialize(&mut ybytes).unwrap(); + p.0.into_affine() + .y + .serialize_compressed(&mut ybytes) + .unwrap(); print_g1_affine("x", &xbytes); print_g1_affine("y", &ybytes); } diff --git a/crates/user-cli/Cargo.toml b/crates/user-cli/Cargo.toml index 058d3501..9c9e007c 100644 --- a/crates/user-cli/Cargo.toml +++ b/crates/user-cli/Cargo.toml @@ -19,10 +19,10 @@ path = "src/user_shell.rs" arpa-contract-client.workspace = true arpa-core.workspace = true +alloy = { version = "1.0.36", features = ["full", "provider-anvil-node"] } tokio = { version = "1.37.0", features = ["full"] } serde = "1.0.106" serde_yaml = "0.8" -ethers.workspace = true thiserror = "1.0.15" bincode = "1.2.1" hex = "0.4.2" diff --git a/crates/user-cli/src/config.rs b/crates/user-cli/src/config.rs index 7ee9afe6..6d54372e 100644 --- a/crates/user-cli/src/config.rs +++ b/crates/user-cli/src/config.rs @@ -1,3 +1,6 @@ +use alloy::primitives::Address; +use alloy::signers::local::coins_bip39::English; +use alloy::signers::local::{MnemonicBuilder, PrivateKeySigner}; use arpa_core::{ ExponentialBackoffRetryDescriptor, DEFAULT_CONTRACT_TRANSACTION_RETRY_BASE, DEFAULT_CONTRACT_TRANSACTION_RETRY_FACTOR, DEFAULT_CONTRACT_TRANSACTION_RETRY_MAX_ATTEMPTS, @@ -5,10 +8,6 @@ use arpa_core::{ DEFAULT_CONTRACT_VIEW_RETRY_FACTOR, DEFAULT_CONTRACT_VIEW_RETRY_MAX_ATTEMPTS, DEFAULT_CONTRACT_VIEW_RETRY_USE_JITTER, }; -use ethers::core::k256::ecdsa::SigningKey; -use ethers::signers::WalletError; -use ethers::signers::{coins_bip39::English, LocalWallet, MnemonicBuilder, Wallet}; -use ethers::types::{Address, U256}; use serde::{Deserialize, Serialize}; use std::env::{self, VarError}; use std::{fs::read_to_string, path::PathBuf}; @@ -17,7 +16,7 @@ use thiserror::Error; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Config { provider_endpoint: String, - chain_id: u32, + chain_id: u64, adapter_address: String, adapter_deployed_block_height: u64, staking_address: String, @@ -59,7 +58,7 @@ impl Default for Config { #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RelayedChain { - chain_id: u32, + chain_id: u64, provider_endpoint: String, adapter_address: String, adapter_deployed_block_height: u64, @@ -82,15 +81,15 @@ impl Config { serde_yaml::from_str(config_str).expect("Error loading configuration file") } - pub fn main_chain_id(&self) -> u32 { + pub fn main_chain_id(&self) -> u64 { self.chain_id } - pub fn relayed_chain_ids(&self) -> Vec { + pub fn relayed_chain_ids(&self) -> Vec { self.relayed_chains.iter().map(|c| c.chain_id).collect() } - pub fn provider_endpoint(&self, chain_id: u32) -> anyhow::Result { + pub fn provider_endpoint(&self, chain_id: u64) -> anyhow::Result { if chain_id == self.chain_id { Ok(self.provider_endpoint.clone()) } else { @@ -102,7 +101,7 @@ impl Config { } } - pub fn account(&self, chain_id: u32) -> anyhow::Result> { + pub fn account(&self, chain_id: u64) -> anyhow::Result { if chain_id == self.chain_id { build_wallet_from_config(&self.account) } else { @@ -110,11 +109,11 @@ impl Config { .iter() .find(|c| c.chain_id == chain_id) .map(|c| build_wallet_from_config(&c.account)) - .ok_or_else(|| ConfigError::InvalidChainId(chain_id))? + .ok_or(ConfigError::InvalidChainId(chain_id))? } } - pub fn adapter_address(&self, chain_id: u32) -> anyhow::Result

{ + pub fn adapter_address(&self, chain_id: u64) -> anyhow::Result
{ if chain_id == self.chain_id { Ok(self.adapter_address.parse().unwrap()) } else { @@ -126,7 +125,7 @@ impl Config { } } - pub fn adapter_deployed_block_height(&self, chain_id: u32) -> anyhow::Result { + pub fn adapter_deployed_block_height(&self, chain_id: u64) -> anyhow::Result { if chain_id == self.chain_id { Ok(self.adapter_deployed_block_height) } else { @@ -142,7 +141,7 @@ impl Config { self.staking_address.parse().unwrap() } - pub fn arpa_address(&self, chain_id: u32) -> anyhow::Result
{ + pub fn arpa_address(&self, chain_id: u64) -> anyhow::Result
{ if chain_id == self.chain_id { Ok(self.arpa_address.parse().unwrap()) } else { @@ -156,7 +155,7 @@ impl Config { pub fn contract_transaction_retry_descriptor( &self, - chain_id: u32, + chain_id: u64, ) -> anyhow::Result { if chain_id == self.chain_id { Ok(self.contract_transaction_retry_descriptor) @@ -171,7 +170,7 @@ impl Config { pub fn contract_view_retry_descriptor( &self, - chain_id: u32, + chain_id: u64, ) -> anyhow::Result { if chain_id == self.chain_id { Ok(self.contract_view_retry_descriptor) @@ -184,12 +183,12 @@ impl Config { } } - pub fn max_priority_fee_per_gas(&self, chain_id: u32) -> anyhow::Result> { + pub fn max_priority_fee_per_gas(&self, chain_id: u64) -> anyhow::Result> { if chain_id == self.chain_id { Ok(self .max_priority_fee_per_gas .as_ref() - .map(|s| U256::from_dec_str(s).unwrap())) + .map(|s| s.parse::().unwrap())) } else { self.relayed_chains .iter() @@ -197,7 +196,7 @@ impl Config { .map(|c| { c.max_priority_fee_per_gas .as_ref() - .map(|s| U256::from_dec_str(s).unwrap()) + .map(|s| s.parse::().unwrap()) }) .ok_or_else(|| ConfigError::InvalidChainId(chain_id).into()) } @@ -225,7 +224,7 @@ pub struct HDWallet { pub index: u32, pub passphrase: Option, } -pub fn build_wallet_from_config(account: &Account) -> anyhow::Result> { +pub fn build_wallet_from_config(account: &Account) -> anyhow::Result { if account.hdwallet.is_some() { let mut hd = account.hdwallet.clone().unwrap(); if hd.mnemonic.starts_with('$') { @@ -234,10 +233,10 @@ pub fn build_wallet_from_config(account: &Account) -> anyhow::Result::default().phrase(&*hd.mnemonic); if hd.path.is_some() { - wallet = wallet.derivation_path(&hd.path.unwrap()).unwrap(); + wallet = wallet.derivation_path(hd.path.unwrap()).unwrap(); } if hd.passphrase.is_some() { - wallet = wallet.password(&hd.passphrase.unwrap()); + wallet = wallet.password(hd.passphrase.unwrap()); } return Ok(wallet.index(hd.index).unwrap().build()?); } else if account.keystore.is_some() { @@ -245,7 +244,7 @@ pub fn build_wallet_from_config(account: &Account) -> anyhow::Result anyhow::Result>()?); + return Ok(private_key.parse::()?); } Err(ConfigError::LackOfAccount.into()) @@ -268,8 +267,6 @@ pub enum ConfigError { BadFormat, #[error(transparent)] EnvVarNotExisted(#[from] VarError), - #[error(transparent)] - BuildingAccountError(#[from] WalletError), #[error("the chain id: {0} is not supported")] - InvalidChainId(u32), + InvalidChainId(u64), } diff --git a/crates/user-cli/src/lib.rs b/crates/user-cli/src/lib.rs index ef68c369..e090af38 100644 --- a/crates/user-cli/src/lib.rs +++ b/crates/user-cli/src/lib.rs @@ -1 +1,2 @@ +#![allow(clippy::large_enum_variant)] pub mod config; diff --git a/crates/user-cli/src/user_shell.rs b/crates/user-cli/src/user_shell.rs index 1f09ed56..383787fe 100644 --- a/crates/user-cli/src/user_shell.rs +++ b/crates/user-cli/src/user_shell.rs @@ -1,18 +1,23 @@ -use arpa_contract_client::contract_stub::adapter::Adapter as AdapterContract; -use arpa_contract_client::contract_stub::ierc20::IERC20 as ArpaContract; -use arpa_contract_client::contract_stub::staking::Staking as StakingContract; +use alloy::eips::{BlockId, BlockNumberOrTag}; +use alloy::node_bindings::Anvil; +use alloy::primitives::{Address, Bytes, B256, U256}; +use alloy::providers::fillers::ChainIdFiller; +use alloy::providers::Provider; +use alloy::providers::ProviderBuilder; +use alloy::rpc::types::Topic; +use arpa_contract_client::ethers::adapter::Adapter; +use arpa_contract_client::ethers::adapter::Adapter as AdapterContract; use arpa_contract_client::ethers::adapter::AdapterClient; +use arpa_contract_client::ethers::ierc20::IERC20 as ArpaContract; +use arpa_contract_client::ethers::staking::Staking; +use arpa_contract_client::ethers::staking::Staking as StakingContract; use arpa_contract_client::{TransactionCaller, ViewCaller}; -use arpa_core::RandomnessRequestType; -use arpa_core::{address_to_string, pad_to_bytes32}; -use arpa_core::{u256_to_vec, HttpWalletSigner}; +use arpa_core::{address_to_string, pad_to_bytes32, BlobGasFiller}; +use arpa_core::{pad_to_bytes32_fixed_bytes, u256_to_vec}; +use arpa_core::{ + GasMiddleware, ProviderClientWithSigner, RandomnessRequestType, GAS_RAISE_PERCENTAGE, +}; use arpa_user_cli::config::{Config, ConfigError}; -use ethers::abi::AbiEncode; -use ethers::prelude::{NonceManagerMiddleware, SignerMiddleware}; -use ethers::providers::{Http, Middleware, Provider}; -use ethers::signers::Signer; -use ethers::types::{Address, BlockId, BlockNumber, Topic, H256, U256, U64}; -use ethers::utils::Anvil; use reedline_repl_rs::clap::{value_parser, Arg, ArgAction, ArgMatches, Command}; use reedline_repl_rs::Repl; use std::collections::BTreeMap; @@ -20,8 +25,6 @@ use std::env; use std::fs::File; use std::io::{BufRead, BufReader, Read}; use std::path::PathBuf; -use std::str::FromStr; -use std::sync::Arc; use structopt::StructOpt; pub const SIMPLE_ADAPTER_CODE: &str = "0x6080604052348015600f57600080fd5b506004361060325760003560e01c806376a911bc146037578063a39402d7146066575b600080fd5b60486042366004607e565b50600090565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6071604236600460b9565b604051908152602001605d565b600060208284031215608f57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811460b257600080fd5b9392505050565b60006020828403121560ca57600080fd5b813567ffffffffffffffff81111560e057600080fd5b820160e0818503121560b257600080fdfea264697066735822122060db0656f5a3a02d609b3fb8d9ae455165807d775077e751b503136af39395c464736f6c63430008120033"; @@ -54,62 +57,78 @@ pub struct Opt { } struct Context { + address: Address, config: Config, history_file_path: PathBuf, - providers: BTreeMap>>, - signers: BTreeMap>, + providers: BTreeMap, } impl Context { - fn build_signer(config: &Config, chain_id: u32) -> anyhow::Result> { - let wallet = config.account(chain_id)?.with_chain_id(chain_id); + pub fn new( + config: Config, + history_file_path: PathBuf, + providers: BTreeMap, + ) -> Self { + let address = config.account(config.main_chain_id()).unwrap().address(); - let nonce_manager = - NonceManagerMiddleware::new(Self::build_provider(config, chain_id)?, wallet.address()); - - let signer = Arc::new(SignerMiddleware::new(nonce_manager, wallet)); - Ok(signer) + Self { + address, + config, + history_file_path, + providers, + } } - fn build_provider(config: &Config, chain_id: u32) -> anyhow::Result>> { - let provider = - Arc::new(Provider::::try_from(config.provider_endpoint(chain_id)?).unwrap()); - Ok(provider) + fn build_provider(config: &Config, chain_id: u64) -> anyhow::Result { + // let wallet = config.account(chain_id)?.with_chain_id(chain_id); + + // let nonce_manager = + // NonceManagerMiddleware::new(Self::build_provider(config, chain_id)?, wallet.address()); + + // let signer = Arc::new(SignerMiddleware::new(nonce_manager, wallet)); + + let http_connect = config.provider_endpoint(chain_id)?.parse()?; + + let client = ProviderBuilder::new() + .disable_recommended_fillers() + .filler(ChainIdFiller::new(Some(chain_id))) + .with_cached_nonce_management() + .filler(BlobGasFiller) + .filler( + GasMiddleware::new(GAS_RAISE_PERCENTAGE).expect("Failed to create GasMiddleware"), + ) + .wallet(config.account(chain_id)?) + .connect_http(http_connect); + + Ok(client) } - pub fn provider(&mut self, chain_id: u32) -> anyhow::Result>> { + pub fn provider(&mut self, chain_id: u64) -> anyhow::Result { if !self.providers.contains_key(&chain_id) { return Err(ConfigError::InvalidChainId(chain_id).into()); } Ok(self.providers.get(&chain_id).unwrap().clone()) } - - pub fn signer(&mut self, chain_id: u32) -> anyhow::Result> { - if !self.signers.contains_key(&chain_id) { - return Err(ConfigError::InvalidChainId(chain_id).into()); - } - Ok(self.signers.get(&chain_id).unwrap().clone()) - } } #[derive(Debug)] pub struct Block { /// Hash of the block - pub hash: Option, + pub hash: Option, /// Hash of the parent - pub parent_hash: H256, + pub parent_hash: B256, /// Hash of the uncles - pub uncles_hash: H256, + pub uncles_hash: B256, /// Miner/author's address. None if pending. pub author: Option
, /// State root hash - pub state_root: H256, + pub state_root: B256, /// Transactions root hash - pub transactions_root: H256, + pub transactions_root: B256, /// Transactions receipts root hash - pub receipts_root: H256, + pub receipts_root: B256, /// Block number. None if pending. - pub number: Option, + pub number: Option, /// Gas Used pub gas_used: U256, /// Gas Limit @@ -120,38 +139,37 @@ pub struct Block { pub size: Option, } -impl From> for Block { - fn from(block: ethers::types::Block) -> Self { +impl From> for Block { + fn from(block: alloy::rpc::types::Block) -> Self { Self { - hash: block.hash, - parent_hash: block.parent_hash, - uncles_hash: block.uncles_hash, - author: block.author, - state_root: block.state_root, - transactions_root: block.transactions_root, - receipts_root: block.receipts_root, - number: block.number, - gas_used: block.gas_used, - gas_limit: block.gas_limit, - timestamp: block.timestamp, - size: block.size, + hash: Some(block.header.hash), + parent_hash: block.header.parent_hash, + uncles_hash: block.header.ommers_hash, + author: Some(block.header.beneficiary), + state_root: block.header.state_root, + transactions_root: block.header.transactions_root, + receipts_root: block.header.receipts_root, + number: Some(block.header.number), + gas_used: U256::from(block.header.gas_used), + gas_limit: U256::from(block.header.gas_limit), + timestamp: U256::from(block.header.timestamp), + size: block.header.size, } } } - #[derive(Debug)] pub struct RandomnessRequest { pub request_id: String, pub sub_id: u64, pub group_index: u32, pub request_type: RandomnessRequestType, - pub params: ethers::core::types::Bytes, - pub sender: ethers::core::types::Address, - pub seed: ethers::core::types::U256, + pub params: Bytes, + pub sender: Address, + pub seed: U256, pub request_confirmations: u16, pub callback_gas_limit: u32, - pub callback_max_gas_price: ethers::core::types::U256, - pub estimated_payment: ethers::core::types::U256, + pub callback_max_gas_price: U256, + pub estimated_payment: U256, pub fulfillment_result: Option, } @@ -159,11 +177,11 @@ pub struct RandomnessRequest { pub struct RandomnessRequestResult { pub request_id: String, pub group_index: u32, - pub committer: ethers::core::types::Address, - pub participant_members: Vec, - pub randommness: ethers::core::types::U256, - pub payment: ethers::core::types::U256, - pub flat_fee: ethers::core::types::U256, + pub committer: Address, + pub participant_members: Vec
, + pub randommness: U256, + pub payment: U256, + pub flat_fee: U256, pub success: bool, } @@ -189,17 +207,17 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result { let main_chain_id = context.config.main_chain_id(); let amount = sub_matches.get_one::("amount").unwrap(); - let amount = U256::from_dec_str(amount).unwrap(); + let amount = U256::from_str_radix(amount, 10).unwrap(); let arpa_contract = ArpaContract::new( context.config.arpa_address(main_chain_id)?, - context.signer(main_chain_id)?, + context.provider(main_chain_id)?, ); let trx_hash = ArpaClient::call_contract_transaction( - main_chain_id as usize, + main_chain_id, "approve-arpa-to-staking", - arpa_contract.client_ref(), + arpa_contract.provider(), arpa_contract.approve(context.config.staking_address(), amount), context .config @@ -217,22 +235,22 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result { let main_chain_id = context.config.main_chain_id(); let amount = sub_matches.get_one::("amount").unwrap(); - let amount = U256::from_dec_str(amount).unwrap(); + let amount = U256::from_str_radix(amount, 10).unwrap(); let staking_contract = StakingContract::new( context.config.staking_address(), - context.signer(main_chain_id)?, + context.provider(main_chain_id)?, ); let arpa_contract = ArpaContract::new( context.config.arpa_address(main_chain_id)?, - context.signer(main_chain_id)?, + context.provider(main_chain_id)?, ); let balance = ArpaClient::call_contract_view( - main_chain_id as usize, + main_chain_id, "balance_of", - arpa_contract.balance_of(context.signer(main_chain_id)?.address()), + arpa_contract.balanceOf(context.address), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -247,12 +265,9 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result anyhow::Result anyhow::Result { let main_chain_id = context.config.main_chain_id(); let amount = sub_matches.get_one::("amount").unwrap(); - let amount = U256::from_dec_str(amount).unwrap(); + let amount = U256::from_str_radix(amount, 10).unwrap(); let staking_contract = StakingContract::new( context.config.staking_address(), - context.signer(main_chain_id)?, + context.provider(main_chain_id)?, ); let staked_amount = StakingClient::call_contract_view( - main_chain_id as usize, + main_chain_id, "staked_amount", - staking_contract.get_stake(context.signer(main_chain_id)?.address()), + staking_contract.getStake(context.address), context .config .contract_view_retry_descriptor(main_chain_id)?, @@ -312,9 +327,9 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result anyhow::Result anyhow::Result anyhow::Result anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let trx_hash = AdapterClient::call_contract_transaction( - *chain_id as usize, + *chain_id, "create_subscription", - adapter_contract.client_ref(), - adapter_contract.create_subscription(), + adapter_contract.provider(), + adapter_contract.createSubscription(), context .config .contract_transaction_retry_descriptor(*chain_id)?, @@ -430,20 +445,20 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let sub_id = sub_matches.get_one::("sub-id").unwrap(); let consumer = sub_matches.get_one::("consumer").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let trx_hash = AdapterClient::call_contract_transaction( - *chain_id as usize, + *chain_id, "add_consumer", - adapter_contract.client_ref(), - adapter_contract.add_consumer(*sub_id, consumer.parse().unwrap()), + adapter_contract.provider(), + adapter_contract.addConsumer(*sub_id, consumer.parse().unwrap()), context .config .contract_transaction_retry_descriptor(*chain_id)?, @@ -458,21 +473,21 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let sub_id = sub_matches.get_one::("sub-id").unwrap(); let amount = sub_matches.get_one::("amount").unwrap(); - let amount = U256::from_dec_str(amount).unwrap(); + let amount = U256::from_str_radix(amount, 10).unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let trx_hash = AdapterClient::call_contract_transaction( - *chain_id as usize, + *chain_id, "fund_subscription", - adapter_contract.client_ref(), - adapter_contract.fund_subscription(*sub_id).value(amount), + adapter_contract.provider(), + adapter_contract.fundSubscription(*sub_id).value(amount), context .config .contract_transaction_retry_descriptor(*chain_id)?, @@ -487,20 +502,20 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let sub_id = sub_matches.get_one::("sub-id").unwrap(); let referral_sub_id = sub_matches.get_one::("referral-sub-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let trx_hash = AdapterClient::call_contract_transaction( - *chain_id as usize, + *chain_id, "set_referral", - adapter_contract.client_ref(), - adapter_contract.set_referral(*sub_id, *referral_sub_id), + adapter_contract.provider(), + adapter_contract.setReferral(*sub_id, *referral_sub_id), context .config .contract_transaction_retry_descriptor(*chain_id)?, @@ -515,20 +530,20 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let sub_id = sub_matches.get_one::("sub-id").unwrap(); let recipient = sub_matches.get_one::("recipient").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let trx_hash = AdapterClient::call_contract_transaction( - *chain_id as usize, + *chain_id, "cancel_subscription", - adapter_contract.client_ref(), - adapter_contract.cancel_subscription(*sub_id, recipient.parse().unwrap()), + adapter_contract.provider(), + adapter_contract.cancelSubscription(*sub_id, recipient.parse().unwrap()), context .config .contract_transaction_retry_descriptor(*chain_id)?, @@ -543,20 +558,20 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let sub_id = sub_matches.get_one::("sub-id").unwrap(); let consumer = sub_matches.get_one::("consumer").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let trx_hash = AdapterClient::call_contract_transaction( - *chain_id as usize, + *chain_id, "remove_consumer", - adapter_contract.client_ref(), - adapter_contract.remove_consumer(*sub_id, consumer.parse().unwrap()), + adapter_contract.provider(), + adapter_contract.removeConsumer(*sub_id, consumer.parse().unwrap()), context .config .contract_transaction_retry_descriptor(*chain_id)?, @@ -571,7 +586,7 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let consumer = sub_matches.get_one::("consumer").unwrap(); let consumer_owner_private_key = sub_matches .get_one::("consumer-owner-private-key") @@ -609,7 +624,7 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let consumer = sub_matches.get_one::("consumer").unwrap(); let consumer_owner_private_key = sub_matches .get_one::("consumer-owner-private-key") @@ -652,19 +667,19 @@ async fn send(args: ArgMatches, context: &mut Context) -> anyhow::Result anyhow::Result> { match args.subcommand() { Some(("current-gas-price", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let gas_price = context.provider(*chain_id)?.get_gas_price().await?; Ok(Some(format!("current gas price: {:#?}", gas_price))) } Some(("block", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let block_number = sub_matches.get_one::("block-number").unwrap(); match block_number.as_str() { "latest" => { let block: Option = context .provider(*chain_id)? - .get_block(BlockNumber::Latest) + .get_block(BlockId::Number(BlockNumberOrTag::Latest)) .await? .map(|block| block.into()); return Ok(Some(format!("block: {:#?}", block))); @@ -672,7 +687,7 @@ async fn call(args: ArgMatches, context: &mut Context) -> anyhow::Result { let block: Option = context .provider(*chain_id)? - .get_block(BlockNumber::Earliest) + .get_block(BlockId::Number(BlockNumberOrTag::Earliest)) .await? .map(|block| block.into()); return Ok(Some(format!("block: {:#?}", block))); @@ -680,7 +695,7 @@ async fn call(args: ArgMatches, context: &mut Context) -> anyhow::Result { let block: Option = context .provider(*chain_id)? - .get_block(BlockNumber::Pending) + .get_block(BlockId::Number(BlockNumberOrTag::Pending)) .await? .map(|block| block.into()); return Ok(Some(format!("block: {:#?}", block))); @@ -689,7 +704,7 @@ async fn call(args: ArgMatches, context: &mut Context) -> anyhow::Result() { let block: Option = context .provider(*chain_id)? - .get_block(BlockNumber::Number(block_number.into())) + .get_block(BlockId::Number(block_number.into())) .await? .map(|block| block.into()); return Ok(Some(format!("block: {:#?}", block))); @@ -699,13 +714,13 @@ async fn call(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let trx_hash = sub_matches.get_one::("trx-hash").unwrap(); let receipt = context .provider(*chain_id)? .get_transaction_receipt( - pad_to_bytes32(&hex::decode( + pad_to_bytes32_fixed_bytes(&hex::decode( if let Some(trx_hash_without_prefix) = trx_hash.strip_prefix("0x") { trx_hash_without_prefix } else { @@ -719,28 +734,25 @@ async fn call(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let balance = context .provider(*chain_id)? - .get_balance( - context.signer(*chain_id)?.address(), - Some(BlockId::Number(BlockNumber::Latest)), - ) + .get_balance(context.address) .await?; Ok(Some(format!("balance: {:#?}", balance))) } Some(("balance-of-arpa", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let arpa_contract = ArpaContract::new( context.config.arpa_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let balance = ArpaClient::call_contract_view( - *chain_id as usize, + *chain_id, "balance_of", - arpa_contract.balance_of(context.signer(*chain_id)?.address()), + arpa_contract.balanceOf(context.address), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -771,13 +783,14 @@ fn call_cast(rpc_url: &str, args: &[&str]) -> String { reader .read_to_string(&mut line) .expect("Failed to read line from cast process"); + child.wait().expect("Failed to wait for cast child process"); line.trim_end_matches('\n').to_string() } async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result> { match args.subcommand() { Some(("nonces", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let consumer = sub_matches.get_one::("consumer").unwrap(); let sub_id = sub_matches.get_one::("sub-id").unwrap(); @@ -787,7 +800,7 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let consumer = sub_matches.get_one::("consumer").unwrap(); let callback_gas_limit_args = vec!["call", consumer, "callbackGasLimit()(uint32)"]; @@ -802,7 +815,7 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let consumer = sub_matches.get_one::("consumer").unwrap(); let callback_max_gas_fee_args = vec!["call", consumer, "callbackMaxGasFee()(uint256)"]; @@ -817,7 +830,7 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let consumer = sub_matches.get_one::("consumer").unwrap(); let request_sender = sub_matches.get_one::("request-sender").unwrap(); let request_signature = sub_matches.get_one::("request-signature").unwrap(); @@ -832,7 +845,7 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let callback_gas_limit = sub_matches.get_one::("callback-gas-limit").unwrap(); let gas_price = context.provider(*chain_id)?.get_gas_price().await?; let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let payment_amount_in_eth = AdapterClient::call_contract_view( - *chain_id as usize, + *chain_id, "estimate_payment_amount", - adapter_contract.estimate_payment_amount_in_eth( + adapter_contract.estimatePaymentAmountInETH( *callback_gas_limit, GAS_EXCEPT_CALLBACK, 0, - gas_price * 3, + U256::from(gas_price * 3), DEFAULT_MINIMUM_THRESHOLD, ), context.config.contract_view_retry_descriptor(*chain_id)?, @@ -941,24 +954,24 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); - let ( - minimum_request_confirmations, - max_gas_limit, - gas_after_payment_calculation, - gas_except_callback, - signature_task_exclusive_window, - reward_per_signature, - committer_reward_per_signature, - ) = AdapterClient::call_contract_view( - *chain_id as usize, + let Adapter::getAdapterConfigReturn { + minimumRequestConfirmations, + maxGasLimit, + gasAfterPaymentCalculation, + gasExceptCallback, + signatureTaskExclusiveWindow, + rewardPerSignature, + committerRewardPerSignature, + } = AdapterClient::call_contract_view( + *chain_id, "adapter_config", - adapter_contract.get_adapter_config(), + adapter_contract.getAdapterConfig(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -966,38 +979,38 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); - let ( - fulfillment_flat_fee_link_ppm_tier1, - fulfillment_flat_fee_link_ppm_tier2, - fulfillment_flat_fee_link_ppm_tier3, - fulfillment_flat_fee_link_ppm_tier4, - fulfillment_flat_fee_link_ppm_tier5, - reqs_for_tier2, - reqs_for_tier3, - reqs_for_tier4, - reqs_for_tier5, - flat_fee_promotion_global_percentage, - is_flat_fee_promotion_enabled_permanently, - flat_fee_promotion_start_timestamp, - flat_fee_promotion_end_timestamp, - ) = AdapterClient::call_contract_view_without_log( - adapter_contract.get_flat_fee_config(), + let Adapter::getFlatFeeConfigReturn { + fulfillmentFlatFeeLinkPPMTier1, + fulfillmentFlatFeeLinkPPMTier2, + fulfillmentFlatFeeLinkPPMTier3, + fulfillmentFlatFeeLinkPPMTier4, + fulfillmentFlatFeeLinkPPMTier5, + reqsForTier2, + reqsForTier3, + reqsForTier4, + reqsForTier5, + flatFeePromotionGlobalPercentage, + isFlatFeePromotionEnabledPermanently, + flatFeePromotionStartTimestamp, + flatFeePromotionEndTimestamp, + } = AdapterClient::call_contract_view_without_log( + adapter_contract.getFlatFeeConfig(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1005,59 +1018,59 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); - let ( - is_referral_enabled, - free_request_count_for_referrer, - free_request_count_for_referee, - ) = AdapterClient::call_contract_view( - *chain_id as usize, + let Adapter::getReferralConfigReturn { + isReferralEnabled, + freeRequestCountForReferrer, + freeRequestCountForReferee, + } = AdapterClient::call_contract_view( + *chain_id, "referral_config", - adapter_contract.get_referral_config(), + adapter_contract.getReferralConfig(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; Ok(Some(format!( "is_referral_enabled: {:#?}, free_request_count_for_referrer: {:#?}, free_request_count_for_referee: {:#?}", - is_referral_enabled, - free_request_count_for_referrer, - free_request_count_for_referee, + isReferralEnabled, + freeRequestCountForReferrer, + freeRequestCountForReferee, ))) } Some(("fee-tier", sub_matches)) => { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let req_count = sub_matches.get_one::("req-count").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let fee_ppm = AdapterClient::call_contract_view( - *chain_id as usize, + *chain_id, "fee_tier", - adapter_contract.get_fee_tier(*req_count), + adapter_contract.getFeeTier(*req_count), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1065,27 +1078,27 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let sub_id = sub_matches.get_one::("sub-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); - let ( + let Adapter::getSubscriptionReturn { owner, consumers, balance, - inflight_cost, - req_count, - free_request_count, - referral_sub_id, - req_count_in_current_period, - last_request_timestamp, - ) = AdapterClient::call_contract_view( - *chain_id as usize, + inflightCost, + reqCount, + freeRequestCount, + referralSubId, + reqCountInCurrentPeriod, + lastRequestTimestamp, + } = AdapterClient::call_contract_view( + *chain_id, "get_subscription", - adapter_contract.get_subscription(*sub_id), + adapter_contract.getSubscription(*sub_id), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1095,53 +1108,50 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let created_filter = adapter_contract - .subscription_created_filter() - .topic2(context.signer(*chain_id)?.address()) + .SubscriptionCreated_filter() + .topic2(context.address) .from_block(context.config.adapter_deployed_block_height(*chain_id)?) - .to_block(BlockNumber::Latest); + .to_block(BlockNumberOrTag::Latest); let created_logs = created_filter.query().await?; - let created_subids = created_logs - .iter() - .map(|created_log| { - H256::from_str(&U256::from(created_log.sub_id).encode_hex()).map(Some) - }) - .collect::, _>>()?; + let created_subids = created_logs.iter().map(|(created_log, _)| { + B256::from_slice(&U256::from(created_log.subId).to_be_bytes::<32>()) + }); let canceled_filter = adapter_contract - .subscription_canceled_filter() - .topic1(Topic::Array(created_subids)) + .SubscriptionCanceled_filter() + .topic1(Topic::from_iter(created_subids)) .from_block(context.config.adapter_deployed_block_height(*chain_id)?) - .to_block(BlockNumber::Latest); + .to_block(BlockNumberOrTag::Latest); let canceled_logs = canceled_filter.query().await?; // get existed subscriptions by filtering out canceled subscriptions from created subscriptions let existed_subscriptions: Vec = created_logs .into_iter() - .filter(|created_log| { + .filter(|(created_log, _)| { !canceled_logs .iter() - .any(|canceled_log| canceled_log.sub_id == created_log.sub_id) + .any(|(canceled_log, _)| canceled_log.subId == created_log.subId) }) - .map(|created_log| created_log.sub_id) + .map(|(created_log, _)| created_log.subId) .collect(); Ok(Some(format!( @@ -1150,32 +1160,32 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let sub_id = sub_matches.get_one::("sub-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); - let ( - _owner, - consumer_addresses, - _balance, - _inflight_cost, - _req_count, - _free_request_count, - _referral_sub_id, - _req_count_in_current_period, - _last_request_timestamp, - ) = AdapterClient::call_contract_view( - *chain_id as usize, + let Adapter::getSubscriptionReturn { + owner: _, + consumers, + balance: _, + inflightCost: _, + reqCount: _, + freeRequestCount: _, + referralSubId: _, + reqCountInCurrentPeriod: _, + lastRequestTimestamp: _, + } = AdapterClient::call_contract_view( + *chain_id, "get_subscription", - adapter_contract.get_subscription(*sub_id), + adapter_contract.getSubscription(*sub_id), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; - let mut consumers: BTreeMap = consumer_addresses + let mut consumers: BTreeMap = consumers .into_iter() .map(|consumer_address: Address| { ( @@ -1190,41 +1200,40 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let sub_id = sub_matches.get_one::("sub-id").unwrap(); let consumer = sub_matches.get_one::("consumer"); let is_pending = sub_matches.get_flag("pending"); @@ -1233,33 +1242,33 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result>(); @@ -1267,29 +1276,29 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result().unwrap()) .collect::>(); } for result in results.iter_mut() { let fulfillment_filter = adapter_contract - .randomness_request_result_filter() - .topic1(H256::from( + .RandomnessRequestResult_filter() + .topic1(B256::from( pad_to_bytes32(&hex::decode(&result.request_id)?).unwrap(), )) .from_block(context.config.adapter_deployed_block_height(*chain_id)?) - .to_block(BlockNumber::Latest); + .to_block(BlockNumberOrTag::Latest); let fulfillments = fulfillment_filter.query().await?; - fulfillments.iter().for_each(|fulfillment| { + fulfillments.iter().for_each(|(fulfillment, _)| { result.fulfillment_result = Some(RandomnessRequestResult { - request_id: format!("0x{}", hex::encode(fulfillment.request_id)), - group_index: fulfillment.group_index, + request_id: format!("0x{}", hex::encode(fulfillment.requestId)), + group_index: fulfillment.groupIndex, committer: fulfillment.committer, - participant_members: fulfillment.participant_members.clone(), + participant_members: fulfillment.participantMembers.clone(), randommness: fulfillment.randommness, payment: fulfillment.payment, - flat_fee: fulfillment.flat_fee, + flat_fee: fulfillment.flatFee, success: fulfillment.success, }); }); @@ -1328,16 +1337,16 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let last_assigned_group_index = AdapterClient::call_contract_view( - *chain_id as usize, + *chain_id, "get_last_assigned_group_index", - adapter_contract.get_last_assigned_group_index(), + adapter_contract.getLastAssignedGroupIndex(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1348,16 +1357,16 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let randomness_count = AdapterClient::call_contract_view( - *chain_id as usize, + *chain_id, "get_randomness_count", - adapter_contract.get_randomness_count(), + adapter_contract.getRandomnessCount(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1365,20 +1374,20 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); - let ( - cumulative_flat_fee, - cumulative_committer_reward, - cumulative_partial_signature_reward, - ) = AdapterClient::call_contract_view( - *chain_id as usize, + let Adapter::getCumulativeDataReturn { + _0: cumulative_flat_fee, + _1: cumulative_committer_reward, + _2: cumulative_partial_signature_reward, + } = AdapterClient::call_contract_view( + *chain_id, "cumulative_data", - adapter_contract.get_cumulative_data(), + adapter_contract.getCumulativeData(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1387,16 +1396,16 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let last_randomness = AdapterClient::call_contract_view( - *chain_id as usize, + *chain_id, "get_last_randomness", - adapter_contract.get_last_randomness(), + adapter_contract.getLastRandomness(), context.config.contract_view_retry_descriptor(*chain_id)?, ) .await?; @@ -1404,16 +1413,19 @@ async fn randcast(args: ArgMatches, context: &mut Context) -> anyhow::Result { - let chain_id = sub_matches.get_one::("chain-id").unwrap(); + let chain_id = sub_matches.get_one::("chain-id").unwrap(); let adapter_contract = AdapterContract::new( context.config.adapter_address(*chain_id)?, - context.signer(*chain_id)?, + context.provider(*chain_id)?, ); let r_id = sub_matches.get_one::("request-id").unwrap(); let pending_request_commitment = adapter_contract - .get_pending_request_commitment(pad_to_bytes32(&hex::decode(r_id)?).unwrap()) + .getPendingRequestCommitment( + pad_to_bytes32_fixed_bytes(&hex::decode(r_id)?).unwrap(), + ) + .call() .await?; Ok(Some(format!( @@ -1432,13 +1444,13 @@ async fn stake(args: ArgMatches, context: &mut Context) -> anyhow::Result