Skip to content

Commit

Permalink
Permissionless docs updates (#971)
Browse files Browse the repository at this point in the history
* feat: add accessing mainnet page
* feat: update FAQs and add callouts
* feat: add more callouts
* feat: update urls, adding notes, and other fixes
* feat: chapter shuffling, more callouts
* feat: update testing testnet pages
* feat: update language
* chore: remove duplicated files
* feat: add mainnet account setup page
* feat: update mainnet deployment instructions
* feat: add mainnet deploy instructions
* chore: remove DL, us, we, and Flow team usage
* feat: add funding step
* fix: typos and spelling
* fix: updates based on feedback
* fix: link to cli command
* fix: add KMS note
  • Loading branch information
alxflw committed Jun 10, 2022
1 parent 42e8204 commit 55844a8
Show file tree
Hide file tree
Showing 48 changed files with 617 additions and 718 deletions.
54 changes: 54 additions & 0 deletions docs/.spelling
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,57 @@ kindtostring
pre-configured
KittyItems
DAOs
Ethereum
crypto
ECDSA_secp256k1
ECDSA_P256
secp256k1
P-256
SHA2_256
SHA3_256
multisig
nonce
Authorizer
Lifecycle
SDK
Spork
Mainnet
Testnet
FLIP
Blocto
FLOW
dapp
JSON
permissionless
mainnet
SDKs
flow-go-sdk
flow-nft
flow-js-testing
dapps
e.g.
gameplay
i.e.
Graffle
frontend
node.js
toolchain
rollout
re-reployment
timelines
discoverabilty
sporking
sporks
onboard
dev
blockchains
Cloudflare
NonFungibleToken
cryptocurrency
FungibleToken
programmatically
FCL-powered
FCL-enabled
iOS
MotoGP
FCL-compatible
74 changes: 74 additions & 0 deletions docs/content/concepts/accessing-mainnet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: Flow Mainnet
description: Guide to mainnet access
---

## Accessing Flow mainnet

The Flow Mainnet is available for access at this URL:

```
access.mainnet.nodes.onflow.org:9000
```

For example, to access the network using the [Flow Go SDK](https://github.com/onflow/flow-go-sdk):

```go
import "github.com/onflow/flow-go-sdk/client"

func main() {
flowAccessAddress := "access.mainnet.nodes.onflow.org:9000"
flowClient, _ := client.New(flowAccessAddress, grpc.WithInsecure())
// ...
}
```

## Account creation

You can follow the [Flow Port account creation steps](https://docs.onflow.org/flow-port/#blocto) to create a new mainnet account.

If you prefer watching a video, check out this tutorial:

<iframe
width="560"
height="315"
src="https://www.youtube-nocookie.com/embed/vXui7uO4cIQ"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>

## Generating a non-custodial account

A non-custodial account will make sure you are the only one holding the keys to your account.

You can follow the following steps to add a non-custodial account:

First, generate a new key pair with the [Flow CLI](https://github.com/onflow/flow-cli):

```sh
> flow keys generate --network=mainnet

🔴️ Store private key safely and don't share with anyone!
Private Key 5b438...
Public Key 1bdc5...
```
> **Note**: By default, this command generates an ECDSA key pair on the P-256 curve. Keep in mind the CLI is intended for development purposes only and is not recommended for production use. Handling keys using a Key Management Service is the best practice.
Take a note of the public key and go back to Flow Port. Open the ["Create a new account" page](https://port.onflow.org/transaction?hash=a0a78aa7821144efd5ebb974bb52ba04609ce76c3863af9d45348db93937cf98&showcode=false&weight=1000&halg=3).
On the page, enter your public key from the CLI, ensure the hash algorithm is set to `SHA3_256` and the weight is set to `1000`. Finally, check the box confirming correctness and hit 'Submit'.
> **Important**: Your account needs to have at least 0.002 FLOW for the account creation. More details can be found [in this guide](https://docs.onflow.org/flow-token/concepts/#storageaccount-fees).
Once the transaction is sealed, you should scroll down to the events section and locate the `flow.AccountCreated` event with the newly generated address.
![flow-port-sealed](port-sealed-tx.png)
Make sure to take a note of the address. If you want to verify the public key for this address, you can visit [flow-view-source](https://flow-view-source.com/).
## Important Mainnet Smart Contract Addresses
You can review [all available core contracts](/core-contracts/) deployed to the Mainnet to identify which ones you want to import.
52 changes: 21 additions & 31 deletions docs/content/concepts/accessing-testnet.mdx
Original file line number Diff line number Diff line change
@@ -1,60 +1,50 @@
---
title: Flow Testnet
description: Guide to testnet access
---

## Accessing Flow Testnet
## Accessing Flow testnet

Currently, there is an internal Testnet, available for access:
The Flow testnet is available for access at this URL:

- [access.testnet.nodes.onflow.org:9000](http://access.devnet.nodes.onflow.org:9000/)
```
access.devnet.nodes.onflow.org:9000
```

For example, to access the network using the [Flow Go SDK](https://github.com/onflow/flow-go-sdk):

```go
import "github.com/onflow/flow-go-sdk/client"

func main() {
flowAccessAddress := "access.testnet.nodes.onflow.org:9000"
flowAccessAddress := "access.devnet.nodes.onflow.org:9000"
flowClient, _ := client.New(flowAccessAddress, grpc.WithInsecure())
// ...
}
```

## Account Creation and Token Funding Requests

Accounts and Tokens for testing are available by request through the [Flow Faucet](https://testnet-faucet-v2.onflow.org/)
### Generating testnet key pair

### Generate a Key Pair for the Faucet

For Testnet, it's easy to generate a new key pair with the [Flow CLI](https://github.com/onflow/flow-cli):
You can generate a new key pair with the [Flow CLI](https://github.com/onflow/flow-cli) as follows:

```sh
flow keys generate
```
> flow keys generate

By default, this command generates an ECDSA key pair on the P-256 curve.
🙏 If you want to create an account on testnet with the generated keys use this link:
https://testnet-faucet.onflow.org/?key= cc1c3d72...

**Note: this tool is intended for development purposes only and is not recommended for production use.**

## Testnet Account Usage

Once you receive your account, you'll be able make use of that account using our SDK. Some examples are available here in the SDK repo:

- [https://github.com/onflow/flow-go-sdk/tree/master/examples](https://github.com/onflow/flow-go-sdk/tree/master/examples)

Some of these examples
🔴️ Store private key safely and don't share with anyone!
Private Key 246256f3...
Public Key cc1c3d72...
```
- `create_account`
- `deploy_contract`
**Note: By default, this command generates an ECDSA key pair on the P-256 curve. Keep in mind, the CLI is intended for development purposes only and is not recommended for production use. Handling keys using a Key Management Service is the best practice.**
Transactions will now require fees in order to complete.
## Account creation and token funding requests
## Important Testnet Smart Contract Addresses
Accounts and tokens for testing can be obtained through the [testnet faucet](https://testnet-faucet.onflow.org/). If you generated the keypair through the CLI, you can click on the URL provided to create an account and request testnet FLOW tokens.
In order to access some of the contracts deployed to Flow Testnet, you can import them by using the following import addresses:
## Important smart contract addresses
```cadence
import FungibleToken from 0x9a0766d93b6608b7
import FlowToken from 0x7e60df042a9c0868
import NonFungibleToken from 0x631e88ae7f1d7c20
```
You can review [all available core contracts](/core-contracts/) deployed to the Mainnet to identify which ones you want to import.
2 changes: 1 addition & 1 deletion docs/content/concepts/accounts-and-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Here's an example of how to submit an account creation transaction with the Go S
Ethereum draws a distinction between accounts and contracts, both of which are addressable. Ethereum contracts are immutable and cannot be upgraded after deployment.

To achieve the same in Flow, simply create an account with deployed code and an empty list of authorized keys. This renders the account immutable by making it impossible to authorize a transaction that would mutate the account code.
To achieve the same in Flow, create an account with deployed code and an empty list of authorized keys. This renders the account immutable by making it impossible to authorize a transaction that would mutate the account code.

### Account Addresses

Expand Down
4 changes: 2 additions & 2 deletions docs/content/concepts/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Flow's moving parts.

## Technical Background

- The Flow [Technical Primer](https://www.onflow.org/primer) is a great place to start to understand how Flow works.
- The Flow team has published 3 [technical whitepapers](https://www.onflow.org/technical-paper) covering in-depth the unique innovation behind the Flow blockchain network.
- The Flow [Technical Primer](https://www.onflow.org/primer) is a great place to start to understand how Flow works.
- The [3 technical whitepapers](https://www.onflow.org/technical-paper) are covering the unique innovation behind the Flow blockchain network in-depth.

## Tokenomics

Expand Down
22 changes: 0 additions & 22 deletions docs/content/concepts/mainnet.mdx

This file was deleted.

Binary file added docs/content/concepts/port-sealed-tx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 0 additions & 48 deletions docs/content/dapp-deployment/contract-testing.md

This file was deleted.

46 changes: 0 additions & 46 deletions docs/content/dapp-deployment/index.md

This file was deleted.

Loading

1 comment on commit 55844a8

@vercel
Copy link

@vercel vercel bot commented on 55844a8 Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

flow-docs – ./

flow-docs-git-master-onflow.vercel.app
flow-docs.vercel.app
docs.onflow.org
flow-docs-onflow.vercel.app

Please sign in to comment.