(&mut self)
| 95 | } |
| 96 | |
| 97 | pub fn generate(&mut self) { |
| 98 | let quorum = 5; |
| 99 | let users: Vec<_> = (0..100) |
| 100 | .map(|_| AdminUser { |
| 101 | id: next_unique_uuid(), |
| 102 | name: format!("user_{}", next_unique_id()), |
| 103 | identities: vec![Principal::from_slice(&next_unique_id().to_le_bytes())], |
| 104 | }) |
| 105 | .collect(); |
| 106 | let committee = DisasterRecoveryCommittee { quorum, users }; |
| 107 | set_disaster_recovery_committee( |
| 108 | self.env, |
| 109 | self.upgrader_id, |
| 110 | self.station_id, |
| 111 | committee.clone(), |
| 112 | ) |
| 113 | .unwrap(); |
| 114 | self.committee = Some(committee); |
| 115 | self.recovery_requests.clear(); |
| 116 | |
| 117 | let accounts: Vec<_> = (0..6) |
| 118 | .map(|_| Account { |
| 119 | id: next_unique_uuid(), |
| 120 | name: format!("account_{}", next_unique_id()), |
| 121 | metadata: (0..2) |
| 122 | .map(|_| MetadataDTO { |
| 123 | key: format!("asset_metadata_key_{}", next_unique_id()), |
| 124 | value: format!("asset_metadata_value_{}", next_unique_id()), |
| 125 | }) |
| 126 | .collect(), |
| 127 | blockchain: "icp".to_string(), |
| 128 | address: next_unique_id().to_string(), |
| 129 | standard: "icp_native".to_string(), |
| 130 | symbol: "ICP".to_string(), |
| 131 | decimals: 8, |
| 132 | }) |
| 133 | .collect(); |
| 134 | set_disaster_recovery_accounts( |
| 135 | self.env, |
| 136 | self.upgrader_id, |
| 137 | self.station_id, |
| 138 | accounts.clone(), |
| 139 | ) |
| 140 | .unwrap(); |
| 141 | self.accounts = accounts; |
| 142 | |
| 143 | let multi_asset_accounts: Vec<_> = (0..8) |
| 144 | .map(|_| MultiAssetAccount { |
| 145 | id: next_unique_uuid(), |
| 146 | name: format!("multi_asset_account_{}", next_unique_id()), |
| 147 | metadata: (0..2) |
| 148 | .map(|_| MetadataDTO { |
| 149 | key: format!("multi_asset_metadata_key_{}", next_unique_id()), |
| 150 | value: format!("multi_asset_metadata_value_{}", next_unique_id()), |
| 151 | }) |
| 152 | .collect(), |
| 153 | assets: (0..2).map(|_| next_unique_uuid()).collect(), |
| 154 | seed: *Uuid::from_u128(next_unique_id().into()).as_bytes(), |
nothing calls this directly
no test coverage detected