Skip to content

Commit

Permalink
Merge pull request #188 from onflow/release/v18
Browse files Browse the repository at this point in the history
Release v18
  • Loading branch information
sideninja authored Apr 20, 2021
2 parents 1a52ea1 + a4d880c commit 980465a
Show file tree
Hide file tree
Showing 69 changed files with 2,624 additions and 649 deletions.
6 changes: 5 additions & 1 deletion docs/account-add-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ flow accounts add-contract <name> <filename>
Contract 'FungibleToken' deployed to the account 0xf8d6e0586b0a20c7
Address 0xf8d6e0586b0a20c7
Balance 9999999999970000000
Balance 99999999999.70000000
Keys 1
Key 0 Public Key 640a5a359bf3536d15192f18d872d57c98a96cb871b92b70cecb0739c2d5c37b4be12548d3526933c2cda9b0b9c69412f45ffb6b85b6840d8569d969fe84e5b7
Weight 1000
Signature Algorithm ECDSA_P256
Hash Algorithm SHA3_256
Revoked false
Sequence Number 6
Index 0
Contracts Deployed: 1
Contract: 'FungibleToken'
Expand Down Expand Up @@ -69,6 +72,7 @@ any host defined by the `--network` flag.
- Flag: `--network`
- Short Flag: `-n`
- Valid inputs: the name of a network defined in the configuration (`flow.json`).
- Default: `emulator`

Specify which network you want the command to use for execution.

Expand Down
12 changes: 8 additions & 4 deletions docs/account-remove-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ flow accounts remove-contract <name>
Contract 'FungibleToken' removed from account '0xf8d6e0586b0a20c7'

Address 0xf8d6e0586b0a20c7
Balance 0
Balance 99999999999.70000000
Keys 1

Key 0 Public Key 640a5a359bf3536d15192f18d872d57c98a96cb871b92b70cecb0739c2d5c37b4be12548d3526933c2cda9b0b9c69412f45ffb6b85b6840d8569d969fe84e5b7
Weight 1000
Signature Algorithm ECDSA_P256
Hash Algorithm SHA3_256
Weight 1000
Signature Algorithm ECDSA_P256
Hash Algorithm SHA3_256
Revoked false
Sequence Number 6
Index 0

Contracts Deployed: 0
```
Expand Down Expand Up @@ -61,6 +64,7 @@ any host defined by the `--network` flag.
- Flag: `--network`
- Short Flag: `-n`
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
- Default: `emulator`

Specify which network you want the command to use for execution.

Expand Down
3 changes: 2 additions & 1 deletion docs/account-staking-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Tokens Unstaking: 0.00000000
### Address

- Name: `address`
- Valid Input: Flow account address
- Valid Input: Flow account address.

Flow [account address](https://docs.onflow.org/concepts/accounts-and-keys/) (prefixed with `0x` or not).

Expand All @@ -68,6 +68,7 @@ any host defined by the `--network` flag.
- Flag: `--network`
- Short Flag: `-n`
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
- Default: `emulator`

Specify which network you want the command to use for execution.

Expand Down
6 changes: 5 additions & 1 deletion docs/account-update-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ flow accounts update-contract <name> <filename>
Contract 'FungibleToken' updated on account '0xf8d6e0586b0a20c7'

Address 0xf8d6e0586b0a20c7
Balance 9999999999970000000
Balance 99999999999.70000000
Keys 1

Key 0 Public Key 640a5a359bf3536d15192f18d872d57c98a96cb871b92b70cecb0739c2d5c37b4be12548d3526933c2cda9b0b9c69412f45ffb6b85b6840d8569d969fe84e5b7
Weight 1000
Signature Algorithm ECDSA_P256
Hash Algorithm SHA3_256
Revoked false
Sequence Number 6
Index 0

Contracts Deployed: 1
Contract: 'FungibleToken'
Expand Down Expand Up @@ -67,6 +70,7 @@ any host defined by the `--network` flag.
- Flag: `--network`
- Short Flag: `-n`
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
- Default: `emulator`

Specify which network you want the command to use for execution.

Expand Down
179 changes: 179 additions & 0 deletions docs/build-transactions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
---
title: Build a Transaction with the Flow CLI
sidebar_title: Build a Transaction
description: How to build a Flow transaction from the command line
---

The Flow CLI provides a command to build a transactions with options to specify
authorizer accounts, payer account and proposer account.

The `build` command doesn't produce any signatures and instead
is designed to be used with the `sign` and `send-signed` commands.

Use this functionality in the following order:
1. Use this command (`build`) to build the transaction.
2. Use the `sign` command to sign with all accounts specified in the build process.
3. Use `send-signed` command to submit the signed transaction to the Flow network.

```shell
flow transactions build <code filename>
```

## Example Usage

```shell
> flow transactions build ./transaction.cdc \
--signer alice \
--proposer bob \
--payer charlie \
--arg "String:Meow" \
--filter payload --save built.rlp

ID e8c0a69952fbe50a66703985e220307c8d44b8fa36c76cbca03f8c43d0167847
Payer e03daebed8ca0615
Authorizers [f3fcd2c1a78f5eee]

Proposal Key:
Address 179b6b1cb6755e31
Index 0
Sequence 1

No Payload Signatures

No Envelope Signatures


Arguments (1):
- Argument 0: {"type":"String","value":"Meow"}


Code

transaction(greeting: String) {
let guest: Address

prepare(authorizer: AuthAccount) {
self.guest = authorizer.address
}

execute {
log(greeting.concat(",").concat(self.guest.toString()))
}
}


Payload:
f9013df90138b8d17472616e...73616374696f6e286eeec0c0
```

## Arguments

### Code Filename

- Name: `filename`
- Valid inputs: Any filename and path valid on the system.

The first argument is a path to a Cadence file containing the
transaction to be executed.


## Flags


### Payer

- Flag: `--payer`
- Valid Inputs: Flow address or account name from configuration.
- Default: service account

Specify account address that will be paying for the transaction.
Read more about payers [here](https://docs.onflow.org/concepts/accounts-and-keys/).

### Proposer

- Flag: `--proposer`
- Valid inputs: Flow address or account name from configuration.
- Default: service account

Specify a name of the account that is proposing the transaction.
Account must be defined in flow configuration.

### Proposer Key Index

- Flag: `--proposer-key-index`
- Valid inputs: number of existing key index
- Default: 0

Specify key index for the proposer account.

### Authorizer

- Flag: `--authorizer`
- Valid Inputs: Flow address or account name from configuration.
- Default: service account

Additional authorizer addresses to add to the transaction.
Read more about authorizers [here](https://docs.onflow.org/concepts/accounts-and-keys/).

### Host

- Flag: `--host`
- Valid inputs: an IP address or hostname.
- Default: `127.0.0.1:3569` (Flow Emulator)

Specify the hostname of the Access API that will be
used to execute the commands.

### Network

- Flag: `--network`
- Short Flag: `-n`
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
- Default: `emulator`

Specify which network you want the command to use for execution.

### Filter

- Flag: `--filter`
- Short Flag: `-x`
- Valid inputs: case-sensitive name of the result property.

Specify any property name from the result you want to return as the only value.

### Output

- Flag: `--output`
- Short Flag: `-o`
- Valid inputs: `json`, `inline`

Specify in which format you want to display the result.

### Save

- Flag: `--save`
- Short Flag: `-s`
- Valid inputs: valid filename

Specify the filename where you want the result to be saved.

### Log

- Flag: `--log`
- Short Flag: `-l`
- Valid inputs: `none`, `error`, `debug`
- Default: `info`

Specify the log level. Control how much output you want to see while command execution.

### Configuration

- Flag: `--config-path`
- Short Flag: `-f`
- Valid inputs: valid filename

Specify a filename for the configuration files, you can provide multiple configuration
files by using `-f` flag multiple times.



13 changes: 12 additions & 1 deletion docs/create-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ In the above example, the `flow.json` file would look something like this:
}
```

## Options
## Flags

### Public Key

Expand All @@ -57,6 +57,16 @@ In the above example, the `flow.json` file would look something like this:
Specify the public key that will be added to the new account
upon creation.

### Key Weight

- Flag: `--key-weight`
- Valid inputs: number between 0 and 1000
- Default: 1000

Specify the weight of the public key being added to the new account.

When opting to use this flag, you must specify a `--key-weight` flag for each public `--key` flag provided.

### Public Key Signature Algorithm

- Flag: `--sig-algo`
Expand Down Expand Up @@ -109,6 +119,7 @@ any host defined by the `--network` flag.
- Flag: `--network`
- Short Flag: `-n`
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
- Default: `emulator`

Specify which network you want the command to use for execution.

Expand Down
1 change: 1 addition & 0 deletions docs/deploy-project-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ any host defined by the `--network` flag.
- Flag: `--network`
- Short Flag: `-n`
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
- Default: `emulator`

Specify which network you want the command to use for execution.

Expand Down
Loading

0 comments on commit 980465a

Please sign in to comment.