@@ -54,7 +54,7 @@ impl From<ContractDataV0> for ContractData {
5454 extra_msg_relayer_white_list : IterableSet :: new ( StorageKey :: ExtraMsgRelayerWhiteList ) ,
5555 post_action_receiver_id_white_list,
5656 post_action_msg_templates : IterableMap :: new ( StorageKey :: PostActionMsgTemplates ) ,
57- unlimited_txs_white_list : IterableSet :: new ( StorageKey :: UnlimitedTxsWhiteList ) ,
57+ multi_txs_white_list : IterableSet :: new ( StorageKey :: MultiTxsWhiteList ) ,
5858 lost_found,
5959 acc_collected_protocol_fee,
6060 cur_available_protocol_fee,
@@ -189,6 +189,7 @@ impl From<ConfigV0> for Config {
189189 rbf_num_limit,
190190 max_btc_tx_pending_sec,
191191 unhealthy_utxo_amount : 1000 ,
192+ max_pending_sign_txs : 1 ,
192193 #[ cfg( feature = "zcash" ) ]
193194 expiry_height_gap : 1000 ,
194195 }
@@ -329,6 +330,7 @@ impl From<ConfigV1> for Config {
329330 rbf_num_limit,
330331 max_btc_tx_pending_sec,
331332 unhealthy_utxo_amount,
333+ max_pending_sign_txs : 1 ,
332334 #[ cfg( feature = "zcash" ) ]
333335 expiry_height_gap,
334336 }
@@ -388,7 +390,7 @@ impl From<ContractDataV1> for ContractData {
388390 extra_msg_relayer_white_list : IterableSet :: new ( StorageKey :: ExtraMsgRelayerWhiteList ) ,
389391 post_action_receiver_id_white_list,
390392 post_action_msg_templates,
391- unlimited_txs_white_list : IterableSet :: new ( StorageKey :: UnlimitedTxsWhiteList ) ,
393+ multi_txs_white_list : IterableSet :: new ( StorageKey :: MultiTxsWhiteList ) ,
392394 lost_found,
393395 acc_collected_protocol_fee,
394396 cur_available_protocol_fee,
@@ -463,7 +465,7 @@ impl From<ContractDataV2> for ContractData {
463465 extra_msg_relayer_white_list,
464466 post_action_receiver_id_white_list,
465467 post_action_msg_templates,
466- unlimited_txs_white_list : IterableSet :: new ( StorageKey :: UnlimitedTxsWhiteList ) ,
468+ multi_txs_white_list : IterableSet :: new ( StorageKey :: MultiTxsWhiteList ) ,
467469 lost_found,
468470 acc_collected_protocol_fee,
469471 cur_available_protocol_fee,
@@ -474,9 +476,82 @@ impl From<ContractDataV2> for ContractData {
474476 }
475477}
476478
479+ #[ near( serializers = [ borsh] ) ]
480+ #[ derive( Clone ) ]
481+ pub struct ConfigV2 {
482+ pub chain : crate :: network:: Chain ,
483+ pub btc_light_client_account_id : AccountId ,
484+ pub nbtc_account_id : AccountId ,
485+ pub chain_signatures_account_id : AccountId ,
486+ pub chain_signatures_root_public_key : Option < PublicKey > ,
487+ pub change_address : Option < String > ,
488+ pub confirmations_strategy : HashMap < String , u8 > ,
489+ pub confirmations_delta : u8 ,
490+ pub extra_msg_confirmations_delta : u8 ,
491+ pub deposit_bridge_fee : BridgeFee ,
492+ pub withdraw_bridge_fee : BridgeFee ,
493+ pub min_deposit_amount : u128 ,
494+ pub min_withdraw_amount : u128 ,
495+ pub min_change_amount : u128 ,
496+ pub max_change_amount : u128 ,
497+ pub min_btc_gas_fee : u128 ,
498+ pub max_btc_gas_fee : u128 ,
499+ pub max_withdrawal_input_number : u8 ,
500+ pub max_change_number : u8 ,
501+ pub max_active_utxo_management_input_number : u8 ,
502+ pub max_active_utxo_management_output_number : u8 ,
503+ pub active_management_lower_limit : u32 ,
504+ pub active_management_upper_limit : u32 ,
505+ pub passive_management_lower_limit : u32 ,
506+ pub passive_management_upper_limit : u32 ,
507+ pub rbf_num_limit : u8 ,
508+ pub max_btc_tx_pending_sec : u32 ,
509+ pub unhealthy_utxo_amount : u64 ,
510+ #[ cfg( feature = "zcash" ) ]
511+ pub expiry_height_gap : u32 ,
512+ }
513+
514+ impl From < ConfigV2 > for Config {
515+ fn from ( c : ConfigV2 ) -> Self {
516+ Self {
517+ chain : c. chain ,
518+ btc_light_client_account_id : c. btc_light_client_account_id ,
519+ nbtc_account_id : c. nbtc_account_id ,
520+ chain_signatures_account_id : c. chain_signatures_account_id ,
521+ chain_signatures_root_public_key : c. chain_signatures_root_public_key ,
522+ change_address : c. change_address ,
523+ confirmations_strategy : c. confirmations_strategy ,
524+ confirmations_delta : c. confirmations_delta ,
525+ extra_msg_confirmations_delta : c. extra_msg_confirmations_delta ,
526+ deposit_bridge_fee : c. deposit_bridge_fee ,
527+ withdraw_bridge_fee : c. withdraw_bridge_fee ,
528+ min_deposit_amount : c. min_deposit_amount ,
529+ min_withdraw_amount : c. min_withdraw_amount ,
530+ min_change_amount : c. min_change_amount ,
531+ max_change_amount : c. max_change_amount ,
532+ min_btc_gas_fee : c. min_btc_gas_fee ,
533+ max_btc_gas_fee : c. max_btc_gas_fee ,
534+ max_withdrawal_input_number : c. max_withdrawal_input_number ,
535+ max_change_number : c. max_change_number ,
536+ max_active_utxo_management_input_number : c. max_active_utxo_management_input_number ,
537+ max_active_utxo_management_output_number : c. max_active_utxo_management_output_number ,
538+ active_management_lower_limit : c. active_management_lower_limit ,
539+ active_management_upper_limit : c. active_management_upper_limit ,
540+ passive_management_lower_limit : c. passive_management_lower_limit ,
541+ passive_management_upper_limit : c. passive_management_upper_limit ,
542+ rbf_num_limit : c. rbf_num_limit ,
543+ max_btc_tx_pending_sec : c. max_btc_tx_pending_sec ,
544+ unhealthy_utxo_amount : c. unhealthy_utxo_amount ,
545+ max_pending_sign_txs : 1 ,
546+ #[ cfg( feature = "zcash" ) ]
547+ expiry_height_gap : c. expiry_height_gap ,
548+ }
549+ }
550+ }
551+
477552#[ near( serializers = [ borsh] ) ]
478553pub struct ContractDataV3 {
479- pub config : LazyOption < Config > ,
554+ pub config : LazyOption < ConfigV2 > ,
480555 pub accounts : IterableMap < AccountId , VAccount > ,
481556 pub utxos : IterableMap < String , VUTXO > ,
482557 pub unavailable_utxos : IterableMap < String , VUTXO > ,
@@ -518,7 +593,10 @@ impl From<ContractDataV3> for ContractData {
518593 } = c;
519594
520595 Self {
521- config,
596+ config : LazyOption :: new (
597+ StorageKey :: Config ,
598+ Some ( config. get ( ) . clone ( ) . unwrap ( ) . into ( ) ) ,
599+ ) ,
522600 accounts,
523601 utxos,
524602 unavailable_utxos,
@@ -529,7 +607,7 @@ impl From<ContractDataV3> for ContractData {
529607 extra_msg_relayer_white_list,
530608 post_action_receiver_id_white_list,
531609 post_action_msg_templates,
532- unlimited_txs_white_list : IterableSet :: new ( StorageKey :: UnlimitedTxsWhiteList ) ,
610+ multi_txs_white_list : IterableSet :: new ( StorageKey :: MultiTxsWhiteList ) ,
533611 lost_found,
534612 acc_collected_protocol_fee,
535613 cur_available_protocol_fee,
0 commit comments