Skip to content

Commit

Permalink
create view function get_gas_committed_for_next_epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
nizam-supraoracles committed Dec 17, 2024
1 parent 8e5f874 commit afbbb92
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,18 @@ module supra_framework::automation_registry {
}

#[view]
/// Get registry fee resource account address
public fun get_registry_fee_address(): address {
account::create_resource_address(&@supra_framework, REGISTRY_RESOURCE_SEED)
}

#[view]
/// Ge gas committed for next epoch
public fun get_gas_committed_for_next_epoch(): u64 acquires AutomationRegistry {
let automation_task_metadata = borrow_global<AutomationRegistry>(@supra_framework);
automation_task_metadata.gas_committed_for_next_epoch
}

#[test_only]
fun initialize_registry_test(supra_framework: &signer, user: &signer) {
let user_addr = signer::address_of(user);
Expand Down

0 comments on commit afbbb92

Please sign in to comment.