cya icon indicating copy to clipboard operation
cya copied to clipboard

Use service account Admin resource to set weights

Open joshuahannan opened this issue 1 year ago • 0 comments

Issue To Be Solved

Currently, the transactions to update weights for fees just save values directly to storage. These should be resource functions with proper input validation.

Suggest A Solution

Add functions with input validaton to FlowServiceAccount.Administrator to:

  • Set execution effort weights
    • https://github.com/onflow/flow-core-contracts/blob/master/transactions/FlowServiceAccount/set_execution_effort_weights.cdc
  • Set execution memory limits
    • https://github.com/onflow/flow-core-contracts/blob/master/transactions/FlowServiceAccount/set_execution_memory_limit.cdc
  • Set execution memory weights
    • https://github.com/onflow/flow-core-contracts/blob/master/transactions/FlowServiceAccount/set_execution_memory_weights.cdc

Write tests to ensure the functions work and the input validation works

joshuahannan avatar May 16 '24 13:05 joshuahannan