You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Portions of the documentation site use the phrase "account creation fee" in an overloaded manner, which can be quite confusing to reconcile. This is particularly true now that the Segmented Transaction Fees documentation is live.
Examples:
"account creation fee" means "The account balance minimum of 0.001 flow"
"create account" used within the Segmented Transaction Fees refers to only the amount of execution effort for the AuthAccount(payer) function call, and doesn't mention the storage minimum at all.
I think to clear this up we should do two things:
Align on the terminology here. Is the initial 0.001 flow an account creation fee, or is it a "minimum storage balance"
Segmented Transction Fee documentation should:
Refer to the operation as "AuthAccount" instead of the descriptive "create account"
Point to the documentation on storage fees for new accounts and note that the "minimum storage balance" must still be satisfied by the payer.
The text was updated successfully, but these errors were encountered:
For more information on how the "AuthAccount" fee is used vs "Create Account" in the colloquial sense.
When a wallet or dapp creates an account for a user two things occur:
User submits a key to the dapp/wallet which should be associated with the account (or the dapp/wallet makes one)
The dapp/wallet then executes a cadence transaction [example below], this transaction is charged a transaction fee which is paid by the payer who signs the transaction.
When the account is made, the AuthAccount function is passed a payer account, which covers the cost of the storage minimums (0.001 flow)
The change that is introduced in Segmented Transaction Fees doesn't change any of the above workflow, it simply increases the amount of "execution effort" (gas) used by the AuthAccount function.
For example, here is a simple cadence script to create an account and add 1 key.
import Crypto
transaction(publicKey: String, signatureAlgorithm: UInt8, hashAlgorithm: UInt8, weight: UFix64) {
prepare(signer: AuthAccount) {
letkey = PublicKey(
publicKey: publicKey.decodeHex(),
signatureAlgorithm: SignatureAlgorithm(rawValue: signatureAlgorithm)!
)
// THIS LINE now uses a different amount of execution effort// than it would have previously.// BEFORE segmented fees: "1 gas"// AFTER segmented fees: "43 gas"// the *payer* here is the account from which the account minimum (0.001 flow) is transferred.letaccount = AuthAccount(payer: signer)
account.keys.add(
publicKey: key,
hashAlgorithm: HashAlgorithm(rawValue: hashAlgorithm)!,
weight: weight
)
}
}
Portions of the documentation site use the phrase "account creation fee" in an overloaded manner, which can be quite confusing to reconcile. This is particularly true now that the Segmented Transaction Fees documentation is live.
Examples:
*. https://docs.onflow.org/dapp-development/user-accounts-and-wallets/#flow-client-library-fcl
AuthAccount(payer)
function call, and doesn't mention the storage minimum at all.I think to clear this up we should do two things:
The text was updated successfully, but these errors were encountered: