Skip to content

Commit 6332df0

Browse files
add getExecutionEffortWeights to the FlowServiceAccount (#284)
1 parent 6a08d8c commit 6332df0

File tree

7 files changed

+163
-3
lines changed

7 files changed

+163
-3
lines changed

contracts/FlowServiceAccount.cdc

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ pub contract FlowServiceAccount {
123123
return self.accountCreators.keys
124124
}
125125

126+
// Gets Execution Effort Weights from the service account's storage
127+
pub fun getExecutionEffortWeights(): {UInt64: UInt64} {
128+
return self.account.copy<{UInt64: UInt64}>(from: /storage/executionEffortWeights)
129+
?? panic("execution effort weights not set yet")
130+
}
131+
126132
/// Authorization resource to change the fields of the contract
127133
pub resource Administrator {
128134

lib/go/contracts/internal/assets/assets.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)