aptos-core
aptos-core copied to clipboard
[Bug] Document funding by network, explain tutorials are for devnet only
🐛 Bug
While testing and editing: https://aptos.dev/tutorials/your-first-dapp/
I found the CLI didn't immediately recognize the private key of the account I just created.
To reproduce
- Open the Wallet and click Create a new wallet. Then click Create account to create an Aptos Account.
- Copy the private key. You will need it to set up the Aptos CLI in the next section.
- Run
aptos initand select the default Devnet network. - When it asks for your private key, paste the private key from the Aptos Wallet that you copied earlier.
Stack trace/error message
Receive the output:
No network given, using devnet...
Enter your private key as a hex literal (0x...) [Current: None | No input: Generate new key (or keep one if present)]
0x1bcd66761530b81745a3bf69986b25af4142b8fcd382ae3e74a2ea480ec16a9f
Account 37f1a905dc531a0734d620858fce4bce8ed0681c242250955bd9e7d89987be76 doesn't exist, creating it and funding it with 100000000 Octas
Account 37f1a905dc531a0734d620858fce4bce8ed0681c242250955bd9e7d89987be76 funded successfully
See the attached screenshot showing the output and the private key used.
I do note two potential issues. The docs contain this tip, rather than a step: "Ensure that your account has sufficient funds to perform transactions by clicking the Faucet button." So I haven't been doing that.
Further, the doc suggests to install the Aptos CLI after creating the account, which will surely introduce a delay. But since I have it installed already, I am running aptos init directly after creating the account. Perhaps related?
actually I think the bigger issue here is we need to divide the docs into a section on funding accounts, since mainnet, testnet, and devnet are all different. The CLI also is pegged on devnet, which isn't great.
actually I think the bigger issue here is we need to divide the docs into a section on funding accounts, since mainnet, testnet, and devnet are all different. The CLI also is pegged on devnet, which isn't great.
Thanks, @davidiw. FWIW, we have a section on funding accounts (along with account creation) in the previous tutorial in navigation: https://aptos.dev/tutorials/first-move-module#step-2-create-an-account-and-fund-it
Also, I wrote these Petra user docs that lightly touch upon the faucet since it wasn't working when I ran through it. May I ask who to work with on making these docs better? How is funding different in mainnet, testnet, and devnet?
Does all of this depend upon the tap now? Thanks!
Adding @banool for guidance on funding.
A brief overview:
- Mainnet: There is no faucet in-wallet, you have to get funds from an exchange.
- Testnet: Use the faucet button in-wallet or use the testnet faucet here: https://aptoslabs.com/testnet-faucet.
- Devnet: Use the faucet button in-wallet.
A brief overview:
- Mainnet: There is no faucet in-wallet, you have to get funds from an exchange.
- Testnet: Use the faucet button in-wallet or use the testnet faucet here: https://aptoslabs.com/testnet-faucet.
- Devnet: Use the faucet button in-wallet.
Thank you! I am working to document this in: https://github.com/aptos-labs/aptos-core/pull/5305
Please note, the tutorials refer to the devnet faucet at https://faucet.devnet.aptoslabs.com, so I've included it in the list you supplied. Please let me know if I am misunderstanding this. Thanks!
Per: https://github.com/aptos-labs/aptos-core/pull/5305/
I need more guidance on the desires here.
I'm noting we have made no progress on the funding aspect, instead focusing upon moving the tutorial prerequisites around various pages. @davidiw , see where we left off here in: https://github.com/aptos-labs/aptos-core/pull/5305#discussion_r1021808429
This output is confusing and could use explanation. Did I get funded or not? Also see the typo in "create and fun":
➜ developer-docs-site git:(move-workshop-1) ✗ aptos init --profile nft-receiver
Configuring for profile nft-receiver
Choose network from [devnet, testnet, mainnet, local, custom | defaults to devnet]
testnet
Enter your private key as a hex literal (0x...) [Current: None | No input: Generate new key (or keep one if present)]
No key given, generating key...
Account 0e17608363164035e45d883007ac723bce62a8a1058462594610829097626803 does not exist, you will need to create and fun the account through a community faucet e.g. https://aptoslabs.com/testnet-faucet, or by transferring funds from another account
---
Aptos CLI is now set up for account 0e17608363164035e45d883007ac723bce62a8a1058462594610829097626803 as profile nft-receiver! Run `aptos --help` for more information about commands
{
"Result": "Success"
}
Let's definitely better promote: https://aptoslabs.com/testnet-faucet
More progress in: https://github.com/aptos-labs/aptos-core/pull/6176
Fixed with: https://github.com/aptos-labs/aptos-core/pull/6176