Skip to content

Commit

Permalink
add getExecutionEffortWeights to the FlowServiceAccount (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
janezpodhostnik authored Apr 6, 2022
1 parent 6a08d8c commit 6332df0
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 3 deletions.
6 changes: 6 additions & 0 deletions contracts/FlowServiceAccount.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ pub contract FlowServiceAccount {
return self.accountCreators.keys
}

// Gets Execution Effort Weights from the service account's storage
pub fun getExecutionEffortWeights(): {UInt64: UInt64} {
return self.account.copy<{UInt64: UInt64}>(from: /storage/executionEffortWeights)
?? panic("execution effort weights not set yet")
}

/// Authorization resource to change the fields of the contract
pub resource Administrator {

Expand Down
6 changes: 3 additions & 3 deletions lib/go/contracts/internal/assets/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6332df0

Please sign in to comment.