diff --git a/fplus-lib/src/config.rs b/fplus-lib/src/config.rs index 084e40b..2498cca 100644 --- a/fplus-lib/src/config.rs +++ b/fplus-lib/src/config.rs @@ -40,7 +40,7 @@ pub fn default_env_vars() -> &'static HashMap<&'static str, &'static str> { "ALLOCATOR_CONTRACT_ADDRESS", "0x640bD4be149f40714D95aBcD414338bc7CfF39a3", ); - m.insert("AUTOALLOCATION_AMOUNT", "68719476736"); // 68719476736 B == 64 GB + m.insert("AUTOALLOCATION_AMOUNT", "68719476736"); // 68719476736 B == 64 GiB m }) } diff --git a/fplus-lib/src/core/autoallocator/metaallocator_interaction.rs b/fplus-lib/src/core/autoallocator/metaallocator_interaction.rs index f8e1fd4..2a71c14 100644 --- a/fplus-lib/src/core/autoallocator/metaallocator_interaction.rs +++ b/fplus-lib/src/core/autoallocator/metaallocator_interaction.rs @@ -58,13 +58,16 @@ pub async fn add_verified_client(address: &str, amount: &u64) -> Result<(), LDNE .with_input(input) .with_gas_limit(45_000_000); - provider + let tx = provider .send_transaction(tx) .await .map_err(|e| LDNError::New(format!("RPC error: {}", e)))? - .watch() + .get_receipt() .await .map_err(|e| LDNError::New(format!("Transaction failed: {}", e)))?; + if !tx.status() { + return Err(LDNError::New("Transaction failed.".to_string())); + } Ok(()) }