diff --git a/aptos-move/framework/supra-framework/doc/automation_registry.md b/aptos-move/framework/supra-framework/doc/automation_registry.md index 037620815bbe1..168daaa73e7a0 100644 --- a/aptos-move/framework/supra-framework/doc/automation_registry.md +++ b/aptos-move/framework/supra-framework/doc/automation_registry.md @@ -20,7 +20,7 @@ This contract is part of the Supra Framework and is designed to manage automated - [Function `initializate_by_default`](#0x1_automation_registry_initializate_by_default) - [Function `initialize`](#0x1_automation_registry_initialize) - [Function `on_new_epoch`](#0x1_automation_registry_on_new_epoch) -- [Function `config_update_from_buffer`](#0x1_automation_registry_config_update_from_buffer) +- [Function `update_config_from_buffer`](#0x1_automation_registry_update_config_from_buffer) - [Function `withdraw_automation_task_fees`](#0x1_automation_registry_withdraw_automation_task_fees) - [Function `transfer_fee_to_account_internal`](#0x1_automation_registry_transfer_fee_to_account_internal) - [Function `update_config`](#0x1_automation_registry_update_config) @@ -789,7 +789,7 @@ On new epoch this function will be triggered and update the automation registry }); // Apply the latest configuration if any parameter has been updated. - config_update_from_buffer(); + update_config_from_buffer(); automation_registry.gas_committed_for_next_epoch = gas_committed_for_next_epoch; automation_epoch_info.start_time = current_time; @@ -801,14 +801,14 @@ On new epoch this function will be triggered and update the automation registry - + -## Function `config_update_from_buffer` +## Function `update_config_from_buffer` The function updates the ActiveAutomationRegistryConfig structure with values extracted from the buffer, if the buffer exists. -
fun config_update_from_buffer()
+
fun update_config_from_buffer()
 
@@ -817,7 +817,7 @@ The function updates the ActiveAutomationRegistryConfig structure with values ex Implementation -
fun config_update_from_buffer() acquires ActiveAutomationRegistryConfig {
+
fun update_config_from_buffer() acquires ActiveAutomationRegistryConfig {
     if (config_buffer::does_exist<AutomationRegistryConfig>()) {
         let buffer = config_buffer::extract<AutomationRegistryConfig>();
         let automation_registry_config = &mut borrow_global_mut<ActiveAutomationRegistryConfig>(
@@ -1180,7 +1180,7 @@ Refunds the automation task fee to the user who has removed their task registrat
     automation_registry_config: &AutomationRegistryConfig,
 ) acquires AutomationRegistry {
     let current_time = timestamp::now_seconds();
-    assert!(automation_task_metadata.expiry_time < current_time, ETASK_IS_ALREADY_EXPIRED);
+    assert!(automation_task_metadata.expiry_time > current_time, ETASK_IS_ALREADY_EXPIRED);
     let residual_ttl = automation_task_metadata.expiry_time - current_time;
 
     let refund_amount = residual_ttl * automation_registry_config.automation_base_fee_in_quants_per_sec;
diff --git a/aptos-move/framework/supra-framework/sources/automation_registry.move b/aptos-move/framework/supra-framework/sources/automation_registry.move
index 26e895c74847d..04c62f31b03b4 100644
--- a/aptos-move/framework/supra-framework/sources/automation_registry.move
+++ b/aptos-move/framework/supra-framework/sources/automation_registry.move
@@ -254,7 +254,7 @@ module supra_framework::automation_registry {
         });
 
         // Apply the latest configuration if any parameter has been updated.
-        config_update_from_buffer();
+        update_config_from_buffer();
 
         automation_registry.gas_committed_for_next_epoch = gas_committed_for_next_epoch;
         automation_epoch_info.start_time = current_time;
@@ -262,7 +262,7 @@ module supra_framework::automation_registry {
     }
 
     /// The function updates the ActiveAutomationRegistryConfig structure with values extracted from the buffer, if the buffer exists.
-    fun config_update_from_buffer() acquires ActiveAutomationRegistryConfig {
+    fun update_config_from_buffer() acquires ActiveAutomationRegistryConfig {
         if (config_buffer::does_exist()) {
             let buffer = config_buffer::extract();
             let automation_registry_config = &mut borrow_global_mut(
@@ -465,7 +465,7 @@ module supra_framework::automation_registry {
         automation_registry_config: &AutomationRegistryConfig,
     ) acquires AutomationRegistry {
         let current_time = timestamp::now_seconds();
-        assert!(automation_task_metadata.expiry_time < current_time, ETASK_IS_ALREADY_EXPIRED);
+        assert!(automation_task_metadata.expiry_time > current_time, ETASK_IS_ALREADY_EXPIRED);
         let residual_ttl = automation_task_metadata.expiry_time - current_time;
 
         let refund_amount = residual_ttl * automation_registry_config.automation_base_fee_in_quants_per_sec;