Skip to content

Commit

Permalink
Revert "make the account creator set non-public and add a function to…
Browse files Browse the repository at this point in the history
… query the set"

This reverts commit 3dff49f.
  • Loading branch information
turbolent committed May 21, 2021
1 parent a30eaae commit e5f6198
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 3 additions & 8 deletions contracts/FlowServiceAccount.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ pub contract FlowServiceAccount {
// A fixed-rate fee charged to create a new account
pub var accountCreationFee: UFix64

/// The list of account addresses that have permission to create accounts
access(contract) var accountCreators: {Address: Bool}
// The list of account addresses that have permission to create accounts
pub var accountCreators: {Address: Bool}

// Initialize an account with a FlowToken Vault and publish capabilities.
pub fun initDefaultToken(_ acct: AuthAccount) {
Expand Down Expand Up @@ -95,12 +95,7 @@ pub contract FlowServiceAccount {
return self.accountCreators[address] ?? false
}

/// Returns all addresses permitted to create accounts
pub fun getAccountCreators(): [Address] {
return self.accountCreators.keys
}

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

// sets the transaction fee
Expand Down
4 changes: 2 additions & 2 deletions transactions/FlowServiceAccount/get_account_creators.cdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import FlowServiceAccount from 0xSERVICEADDRESS

pub fun main(): [Address] {
return FlowServiceAccount.getAccountCreators()
pub fun main(): UFix64 {
return FlowServiceAccount.accountCreators.keys
}

0 comments on commit e5f6198

Please sign in to comment.