Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
f8390fa
Bump github.com/spf13/afero from 1.9.5 to 1.10.0
dependabot[bot] Sep 25, 2023
66e4700
Bump google.golang.org/grpc from 1.58.1 to 1.58.2
dependabot[bot] Sep 25, 2023
d54fe50
Bump mislav/bump-homebrew-formula-action from 1 to 3
dependabot[bot] Sep 25, 2023
14d4a85
Replace contract body encoding from hex to utf8
nozim Sep 26, 2023
dbee186
Merge pull request #1216 from onflow/dependabot/go_modules/google.gol…
chasefleming Sep 26, 2023
f3a57c7
Remove formula fix hack
jribbink Sep 26, 2023
11d7120
Merge pull request #1218 from onflow/dependabot/github_actions/mislav…
chasefleming Sep 26, 2023
166d65a
Merge pull request #1215 from onflow/dependabot/go_modules/github.com…
chasefleming Sep 26, 2023
f2f9fb9
Fix failing tests
nozim Sep 27, 2023
24caae4
Merge pull request #1220 from nozim/contract-hex2utf8
chasefleming Sep 28, 2023
f5e900f
add support for js code generation for flix
bthaile Sep 29, 2023
b4138ae
Bump dev wallet to v0.7.4 (#1221)
jribbink Sep 29, 2023
b14853f
Bump version.txt to v1.4.5 (#1224)
jribbink2 Sep 29, 2023
23e2c33
verify binding value is correct, change flags name to binding
bthaile Oct 4, 2023
66b4ef2
Bump github.com/getsentry/sentry-go from 0.24.1 to 0.25.0
dependabot[bot] Oct 9, 2023
16b0c27
Merge pull request #1229 from onflow/dependabot/go_modules/github.com…
chasefleming Oct 12, 2023
2f45305
Bump google.golang.org/grpc from 1.58.2 to 1.58.3
dependabot[bot] Oct 16, 2023
70f24e5
update hybrid-custody-scaffold commit hash
sisyphusSmiling Oct 18, 2023
9b23ccf
Merge pull request #1235 from onflow/update-hybrid-custody-scaffold
chasefleming Oct 18, 2023
c2d0040
Merge pull request #1231 from onflow/dependabot/go_modules/google.gol…
chasefleming Oct 18, 2023
f4510f8
use new helper function to import fcl js code generator
bthaile Oct 18, 2023
520e342
Incorporate latest features from cadence-tools/test module
m-Peter Oct 5, 2023
06186be
TMP: Replace dependency for cadence-tools/test and cadence-tools/lang…
m-Peter Oct 5, 2023
d933364
Include testing network to default config
m-Peter Oct 5, 2023
e081b86
Better error handling for missing testing network in config file
m-Peter Oct 6, 2023
7a5877b
Fix error handling for missing contracts in config file
m-Peter Oct 8, 2023
1706dfa
Bump version dependencies
m-Peter Oct 19, 2023
a3fcc31
Use latest master commit for cadence-tools/languageserver dependency
m-Peter Oct 20, 2023
3c32c76
Fix tests
m-Peter Oct 20, 2023
a2c01f7
Replace commit versions with tag versions for flow-emulator and caden…
m-Peter Oct 21, 2023
8bf521e
Add generate setup for templates
chasefleming Oct 23, 2023
d6a51ba
Add script and tx templates
chasefleming Oct 24, 2023
921e25a
Give higher priority to seed flag over random and add warning when th…
m-Peter Oct 24, 2023
bb974b8
Extract literals for meta information in JSON test reports to package…
m-Peter Oct 24, 2023
8020ee0
Simplify check for importing contracts by StringLocation
m-Peter Oct 24, 2023
5e48742
Simplify location traversal in importResolver
m-Peter Oct 24, 2023
7aef0fe
Remove error for missing testing aliases
m-Peter Oct 24, 2023
2ffb69c
updated flixkit-go reference to new v0.2.0
bthaile Oct 24, 2023
30a4e91
Merge branch 'master' into add-flix-gen
bthaile Oct 24, 2023
86d6ea7
Generate at file path and add tests
chasefleming Oct 24, 2023
9e8d8e7
Update readme
chasefleming Oct 24, 2023
b1df4f2
Update codeowners
chasefleming Oct 24, 2023
ec08eb4
remove line
chasefleming Oct 24, 2023
bc9cfa4
Bump default scaffold version
chasefleming Oct 24, 2023
2f5b852
Merge pull request #1243 from onflow/chasefleming/update-codeowners
chasefleming Oct 24, 2023
5d217a1
Update wording for seed and random flags
m-Peter Oct 24, 2023
efcba45
Move contracts map creation out of the importResolver closure
m-Peter Oct 24, 2023
60cbcd6
add verification for missing flags
bluesign Oct 24, 2023
4edd362
Merge pull request #1244 from onflow/chasefleming/empty-scaffold-bump
chasefleming Oct 24, 2023
b0e215d
tests
bluesign Oct 24, 2023
9969b90
organize flix commands, there are going to be a few so organizing now
bthaile Oct 25, 2023
e153a9a
add transfer-tokens template example that is named on server
bthaile Oct 25, 2023
a8e3a5a
removed generate, that is a future verb
bthaile Oct 25, 2023
aad19cb
update to simplify base help message for flix
bthaile Oct 25, 2023
9c2ad0a
dry up code
bthaile Oct 25, 2023
74daf20
try to update to setup@v4 of go to fix the testing issues, can be a c…
bjartek Oct 25, 2023
f6065d5
Merge branch 'master' into bluesign/crash_fix_payer_proposer
bjartek Oct 25, 2023
b1331ce
rename sendFlags -> flags
bjartek Oct 25, 2023
0ac836f
test: failing test
bjartek Oct 25, 2023
da89922
fix: add the deployment even if the network does not exist
bjartek Oct 25, 2023
a211267
Merge pull request #1246 from onflow/bluesign/crash_fix_payer_proposer
chasefleming Oct 25, 2023
c615d33
Merge pull request #1227 from m-Peter/update-tests-with-latest-features
chasefleming Oct 25, 2023
411cc71
reove local save flag and have more descriptive json output
bthaile Oct 25, 2023
40f3c60
Merge branch 'master' into add-flix-gen
bthaile Oct 25, 2023
91863a4
update go sum
bthaile Oct 25, 2023
54e52d6
Update README.md
chasefleming Oct 25, 2023
8efa0c7
Update internal/super/generate.go
chasefleming Oct 25, 2023
06433cf
Update internal/super/generate.go
chasefleming Oct 25, 2023
d4aa5e5
Update internal/super/generate.go
chasefleming Oct 25, 2023
f231c5e
Update internal/super/generate.go
chasefleming Oct 25, 2023
be0ae7d
Update internal/super/generate_test.go
chasefleming Oct 25, 2023
d8df7a6
Update internal/super/generate.go
chasefleming Oct 25, 2023
a8cf73f
Add filepath import
chasefleming Oct 25, 2023
44ceeb8
Fix test for tx gen
chasefleming Oct 25, 2023
0d4e0ec
Add init to contract template
chasefleming Oct 25, 2023
106ef48
Allow user to define directory for template gen
chasefleming Oct 25, 2023
6c6f8fd
update to add generate flix command
bthaile Oct 25, 2023
4983141
Move to subcommands
chasefleming Oct 25, 2023
3ce0087
Update internal/super/generate.go
chasefleming Oct 25, 2023
cff1357
Update internal/super/generate_test.go
chasefleming Oct 25, 2023
deb8540
Update internal/super/generate_test.go
chasefleming Oct 25, 2023
d5f20ea
fix tests
chasefleming Oct 25, 2023
3a2eec6
Run goimports
chasefleming Oct 25, 2023
4dd7808
Fix golint error for Chdir
chasefleming Oct 25, 2023
719f301
add generate flix cmd
bthaile Oct 26, 2023
762cfa1
testing locally generate template
bthaile Oct 26, 2023
bf00858
fix: adjust code so that if deployment exist we prepend if not we create
bjartek Oct 26, 2023
c18fb7c
fix: ensure that stopProgress is deferred on all code paths where Sta…
bjartek Oct 26, 2023
fef7105
Merge pull request #1247 from onflow/bjartek/add-deployment-block-whe…
chasefleming Oct 26, 2023
0009702
change command name from bindings to package
bthaile Oct 27, 2023
7b48f13
Add alias
chasefleming Oct 27, 2023
020da9f
Save contract to flow.json
chasefleming Oct 27, 2023
d8ecd49
Fix tests
chasefleming Oct 27, 2023
fd092ef
Merge pull request #1249 from onflow/bjartek/1022-fix-progress-logger
chasefleming Oct 30, 2023
670fac7
Merge pull request #1222 from onflow/add-flix-gen
bthaile Oct 30, 2023
3e99dda
Bump github.com/go-git/go-git/v5 from 5.6.1 to 5.10.0
dependabot[bot] Oct 30, 2023
4b83edb
Merge pull request #1250 from onflow/dependabot/go_modules/github.com…
chasefleming Oct 30, 2023
5b076c4
Use readerwriter
chasefleming Oct 30, 2023
19608ba
Merge branch 'master' into chasefleming/generate-templates
chasefleming Oct 30, 2023
2adf137
Add MkDirAll
chasefleming Oct 30, 2023
5bb9cf8
Bump version txt to 1.5.0
chasefleming Oct 30, 2023
e32928e
Merge pull request #1252 from onflow/chasefleming/version-1.5.0
chasefleming Oct 30, 2023
800fb88
Merge pull request #1242 from onflow/chasefleming/generate-templates
chasefleming Oct 30, 2023
7c56526
Remove Code QL Scanner
Latkes Oct 31, 2023
0b9010d
integrate new 1.0.0 generate tempalte into existing flix command
bthaile Oct 31, 2023
465f9fc
Merge pull request #1255 from onflow/Latkes-patch-1
Latkes Oct 31, 2023
b914ef7
Bump github.com/spf13/cobra from 1.7.0 to 1.8.0
dependabot[bot] Nov 6, 2023
57e95d2
Merge pull request #1257 from onflow/dependabot/go_modules/github.com…
chasefleming Nov 6, 2023
ec07e7c
add generate flix 1.0.0 to flix command
bthaile Nov 7, 2023
ab2b28e
add generate to high level flix command help
bthaile Nov 7, 2023
d93ec2c
add ability to get flix via url
bthaile Nov 7, 2023
1233bc5
Bump languageserver to v0.33.0 (#1259)
jribbink Nov 8, 2023
6830c78
update latest version
bjartek Nov 8, 2023
c698757
Merge pull request #1260 from onflow/update-latest-version
chasefleming Nov 8, 2023
08c9c90
allow user to pass in a pre-fill flix template json file instead of r…
bthaile Nov 8, 2023
fc6b3ba
use 1_0_0 generator version and Generator interface
bthaile Nov 8, 2023
2a8ae0d
fix issue where relative path is interpreted as url
bthaile Nov 8, 2023
4a516c4
create paths if they do not exist
bjartek Nov 10, 2023
8c34acd
auto update to onflow/cadence v0.42.5
turbolent Nov 10, 2023
b41f57a
fix btcd/chainhash issue
turbolent Nov 10, 2023
887aab2
update to Cadence v0.42.5
turbolent Nov 10, 2023
11bfd48
adjust tests
turbolent Nov 10, 2023
0bf7d97
Merge pull request #1263 from onflow/bjartek/creates-empty-dir-when-s…
turbolent Nov 11, 2023
1e30508
Merge pull request #1264 from onflow/auto-update-onflow-cadence-v0.42.5
chasefleming Nov 13, 2023
cc83376
Bump version to 1.7.0
chasefleming Nov 13, 2023
f384aba
Merge pull request #1265 from onflow/chasefleming/1.7.0-bump
chasefleming Nov 13, 2023
4770598
Bump emulator to 0.57.3
chasefleming Nov 13, 2023
957cfde
Merge pull request #1268 from onflow/chasefleming/emulator-0.57.3
chasefleming Nov 13, 2023
37c0f25
Update default scaffold to include RandomBeaconHistory contract
chasefleming Nov 14, 2023
a701a8d
Merge pull request #1269 from onflow/chasefleming/scaffold-bump-rbh
chasefleming Nov 14, 2023
ad58dcf
Bump version to 1.7.1
chasefleming Nov 14, 2023
a9c67ee
Merge pull request #1270 from onflow/chasefleming/1.7.1
chasefleming Nov 14, 2023
54ad5a2
update to use new module name for generate flix
bthaile Nov 14, 2023
12853a8
bump flowser version
bartolomej Nov 15, 2023
d5d0b4f
remove linux support check
bartolomej Nov 15, 2023
ab66d71
add default linux intall path
bartolomej Nov 15, 2023
8af720e
customize path on linux
bartolomej Nov 15, 2023
b9b56fd
update default path
bartolomej Nov 15, 2023
6ebc0e5
bump flowser version
bartolomej Nov 15, 2023
0fedaa5
expand home path
bartolomej Nov 15, 2023
abd7873
Merge pull request #1272 from onflowser/update-flowser-linux-support
chasefleming Nov 15, 2023
71c3484
Bump github.com/onflow/cadence-tools/languageserver
dependabot[bot] Nov 20, 2023
0388799
Merge branch 'master' into add-flix-temp-gen
bthaile Nov 20, 2023
2763bab
update to use newest version of flixkit-go
bthaile Nov 20, 2023
5b80416
Merge pull request #1274 from onflow/dependabot/go_modules/github.com…
chasefleming Nov 20, 2023
742416d
use newest fixed version of flixkit-go
bthaile Nov 20, 2023
231038a
reduce dup code and user flixkit's get flix file given a url
bthaile Nov 20, 2023
28034bf
clarify relative path helper method args
bthaile Nov 21, 2023
82452a8
updated to create only the directories passed in to save flag, had is…
bthaile Nov 21, 2023
360ac65
made sure relative path is in unix format
bthaile Nov 22, 2023
666f705
fix doc syntax
bthaile Nov 22, 2023
aeeb2f0
Merge pull request #1258 from onflow/add-flix-temp-gen
bthaile Nov 23, 2023
bc1b57c
Update flow emulator to v0.58.0 (#1278)
jribbink Nov 27, 2023
a92c8c1
Bump to 1.8.0
chasefleming Nov 27, 2023
f1acb7f
Merge pull request #1281 from onflow/chasefleming/version-1.8.0
chasefleming Nov 27, 2023
ba9ebd0
upgrade emulator in flowkit
bjartek Nov 28, 2023
e796025
Allow running individual test by name
jribbink Nov 29, 2023
ca1a4e2
Improve generate descriptions
chasefleming Nov 29, 2023
d7b48ea
Change main description
chasefleming Nov 29, 2023
6392012
Merge pull request #1287 from onflow/chasefleming/gen-descriptions
chasefleming Nov 29, 2023
13bc2c0
Add pwa scaffold
bshahid331 Nov 29, 2023
573e2f2
Merge pull request #1288 from onflow/flow-pwa-scaffold
bshahid331 Nov 29, 2023
04f88ee
Check if test exists before running
jribbink Dec 4, 2023
6b12468
go mod tidy
jribbink Dec 4, 2023
b8307b4
fix tests
jribbink Dec 4, 2023
851377f
Merge pull request #1284 from onflow/fix-emulator-in-flowkit
chasefleming Dec 4, 2023
4f2390e
add one liner test
jribbink Dec 5, 2023
e0bed7d
refactor loop logic
jribbink Dec 5, 2023
c2ed09e
Add no tests found message
jribbink Dec 5, 2023
25d8c1e
fix test
jribbink Dec 5, 2023
93cc89e
fix test
jribbink Dec 6, 2023
2182ec0
do not force the use of a noop logger, it can be changed in the builder
bjartek Dec 6, 2023
9505bbb
Merge pull request #1294 from onflow/do-not-force-noop-logger
chasefleming Dec 8, 2023
6c49c43
Update Empty Cadence Project Scaffold (#1295)
jribbink Dec 8, 2023
c0910e2
Bump github.com/go-git/go-git/v5 from 5.10.0 to 5.11.0
dependabot[bot] Dec 11, 2023
beb6e96
Merge pull request #1298 from onflow/dependabot/go_modules/github.com…
chasefleming Dec 11, 2023
9cb8e40
Merge pull request #1285 from onflow/jribbink/individual-test
devbugging Dec 12, 2023
894617f
add scaffold id in as a flag
ianthpun Dec 12, 2023
92bb471
update CONTRIBUTING
ianthpun Dec 12, 2023
3f447ca
update
ianthpun Dec 12, 2023
d107a54
update
ianthpun Dec 12, 2023
d17ff6d
update
ianthpun Dec 12, 2023
115852a
remove identifier in scaffolds
ianthpun Dec 12, 2023
95ce070
Update cadence to 0.42.6
chasefleming Dec 12, 2023
ee77beb
Update go sdk
chasefleming Dec 12, 2023
5c23e21
Merge pull request #1301 from onflow/chasefleming/update-deps
chasefleming Dec 12, 2023
9a9b456
add new flowkit-release workflow
ianthpun Dec 12, 2023
58cc939
remove update to contributing
ianthpun Dec 12, 2023
cfc51e9
Merge pull request #1300 from onflow/ianthpun/1271-scaffold-id
ianthpun Dec 13, 2023
cce9976
use assert.Contains for result.OneLiner() check
ianthpun Dec 13, 2023
dd48a75
integrate flix v1.1 execute, generate and package, add support for pa…
bthaile Dec 13, 2023
d910d27
Merge pull request #1304 from onflow/ianthpun/flaky-test-fix
ianthpun Dec 13, 2023
963714a
Upgrade flow dependencies
chasefleming Dec 13, 2023
7084526
Upgrade go version
chasefleming Dec 13, 2023
d2deeb1
Up go to 20
chasefleming Dec 13, 2023
ea38f75
Merge pull request #1306 from onflow/chasefleming/upgrade-flow-deps
chasefleming Dec 13, 2023
e886e23
Merge branch 'master' into update-flix-v1.1
bthaile Dec 14, 2023
38ca83a
update to use new structure of flixkit-go
bthaile Dec 15, 2023
f04a55f
Bump google.golang.org/grpc from 1.59.0 to 1.60.0
dependabot[bot] Dec 18, 2023
be84b67
Merge pull request #1302 from onflow/ianthpun/flowkit-tag
ianthpun Dec 18, 2023
3bc86a1
Update scaffolds (#1312)
jribbink Dec 18, 2023
c2acfde
remove need to know flix version when generating a flix template
bthaile Dec 18, 2023
f90259f
use newest version of flixkit-go
bthaile Dec 18, 2023
375962a
fix linting issues
bthaile Dec 18, 2023
05a91c6
flix linting issues
bthaile Dec 18, 2023
54f26e3
Merge branch 'master' into bastian/cadence-1.0-rc1
turbolent Dec 19, 2023
719e6b5
update to Cadence 1.0 RC1
turbolent Dec 19, 2023
273c83c
Merge pull request #1311 from onflow/dependabot/go_modules/google.gol…
chasefleming Dec 19, 2023
8c9c6a8
Merge pull request #1309 from onflow/update-flix-v1.1
bthaile Dec 19, 2023
1681ffd
fix merge
turbolent Dec 19, 2023
d3b3aee
update dependencies
turbolent Dec 19, 2023
ab1800f
Merge branch 'master' into bastian/cadence-1.0-rc1
turbolent Dec 19, 2023
a005b50
update flixkit-go
turbolent Dec 19, 2023
7c84e00
fix dependencies
turbolent Dec 19, 2023
17af6aa
fix tests
turbolent Dec 19, 2023
30899f2
fix installation of gocov-html and mockery
turbolent Dec 19, 2023
b54603e
Merge branch 'bastian/fix-tools' into bastian/cadence-1.0-rc1
turbolent Dec 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
continue-on-error: true
uses: snyk/actions/golang@master
with:
go-version: '1.19'
go-version: '1.20'
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- uses: wangyoucao577/go-release-action@v1.40
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v1
- uses: actions/setup-go@v4
with:
go-version: "1.19"
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version: '1.20'
- name: Run tests
run: |
make ci
Expand All @@ -47,9 +41,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.20"
- name: generate
run: make generate
- uses: golangci/golangci-lint-action@v3.7.0
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/codeql.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/flowkit-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Flowkit Release

on:
release:
types: [published]

jobs:
flowkit-release:
if: "!github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: tag flowkit release
env:
FLOWKIT_RELEASE_TAG: flowkit/${{ github.event.release.tag_name }}
run: |
git tag "$FLOWKIT_RELEASE_TAG"
git push origin "$FLOWKIT_RELEASE_TAG"
4 changes: 1 addition & 3 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ jobs:
name: Bump Homebrew formula
runs-on: ubuntu-latest
steps:
- uses: mislav/bump-homebrew-formula-action@v1
- uses: mislav/bump-homebrew-formula-action@v3
with:
formula-name: flow-cli
# https://github.com/mislav/bump-homebrew-formula-action/issues/58
formula-path: Formula/f/flow-cli.rb
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Kay-Zee @janezpodhostnik @sideninja @DylanTinianov @chasefleming @nvdtf @bluesign @bjartek @jribbink
* @Kay-Zee @janezpodhostnik @sideninja @chasefleming @nvdtf @bluesign @bjartek @jribbink
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ install-tools:
cd ${GOPATH}; \
mkdir -p ${GOPATH}; \
GO111MODULE=on go install github.com/axw/gocov/gocov@latest; \
GO111MODULE=on go install github.com/matm/gocov-html@latest; \
GO111MODULE=on go install github.com/matm/gocov-html/cmd/gocov-html@latest; \
GO111MODULE=on go install github.com/sanderhahn/gozip/cmd/gozip@latest; \
GO111MODULE=on go install github.com/vektra/mockery/v2@latest;
GO111MODULE=on go install github.com/vektra/mockery/v2@v2.38.0;

.PHONY: test
test:
Expand Down Expand Up @@ -113,4 +113,4 @@ generate-schema:
.PHONY: generate
generate: install-tools
cd flowkit; \
go generate ./...
go generate ./...
45 changes: 32 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,42 @@ Read about supported commands in the [CLI documentation website](https://develop
Usage:
flow [command]

Available Commands:
accounts Utilities to manage accounts
blocks Utilities to read blocks
👋 Welcome Flow developer!
If you are starting a new flow project try running 'flow setup <project_name>'.

🔥 Super Commands
dev Build your Flow project
flix Execute FLIX template with a given id, name, or local filename
generate Generate new boilerplate files
setup Start a new Flow project

📦 Flow Entities
accounts Create and retrieve accounts and deploy contracts
blocks Retrieve blocks
collections Retrieve collections
events Retrieve events

💬 Flow Interactions
scripts Execute Cadence scripts
transactions Build, sign, send and retrieve transactions

🔨 Flow Tools
cadence Execute Cadence code
collections Utilities to read collections
config Utilities to manage configuration
emulator Starts the Flow emulator server
dev-wallet Run a development wallet
emulator Run Flow network for development
flowser Run Flowser project explorer
test Run Cadence tests
events Utilities to read events
help Help about any command

🏄 Flow Project
deploy Deploy all project contracts
init Initialize a new configuration
keys Utilities to manage keys
project Manage your Cadence project
scripts Utilities to execute scripts
status Display the status of the Flow network
transactions Utilities to send transactions
version View version and commit information
run Start emulator and deploy all project contracts

🔒 Flow Security
keys Generate and decode Flow keys
signatures Signature verification and creation

```

The Flow CLI includes several commands to interact with Flow networks, such as querying account information, or sending transactions. It also includes the [Flow Emulator](https://developers.flow.com/tools/emulator).
Expand Down
3 changes: 2 additions & 1 deletion cmd/flow/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func main() {
// super commands
super.SetupCommand.AddToParent(cmd)
super.DevCommand.AddToParent(cmd)
super.FlixCommand.AddToParent(cmd)

// structured commands
cmd.AddCommand(settings.Cmd)
Expand All @@ -86,6 +85,8 @@ func main() {
cmd.AddCommand(config.Cmd)
cmd.AddCommand(signatures.Cmd)
cmd.AddCommand(snapshot.Cmd)
cmd.AddCommand(super.FlixCmd)
cmd.AddCommand(super.GenerateCommand)

command.InitFlags(cmd)
cmd.AddGroup(&cobra.Group{
Expand Down
5 changes: 5 additions & 0 deletions flowkit/arguments/arguments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ func Test_ParseWithoutType(t *testing.T) {
Name: "variable-sized array",
Value: cadence.NewArray([]cadence.Value{
cadence.String("42"),
}).WithType(&cadence.VariableSizedArrayType{
ElementType: cadence.StringType,
}),
Type: &cadence.VariableSizedArrayType{
ElementType: cadence.StringType,
Expand All @@ -158,6 +160,9 @@ func Test_ParseWithoutType(t *testing.T) {
Name: "constant-sized array",
Value: cadence.NewArray([]cadence.Value{
cadence.String("42"),
}).WithType(&cadence.ConstantSizedArrayType{
ElementType: cadence.StringType,
Size: 1,
}),
Type: &cadence.ConstantSizedArrayType{
ElementType: cadence.StringType,
Expand Down
7 changes: 4 additions & 3 deletions flowkit/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,11 @@ func Test_DefaultConfig(t *testing.T) {
assert.Len(t, cfg.Emulators, 1)
assert.Equal(t, cfg.Emulators[0].Name, "default")
assert.Equal(t, cfg.Emulators[0].ServiceAccount, "emulator-account")
assert.Len(t, cfg.Networks, 3)
assert.Len(t, cfg.Networks, 4)
assert.Equal(t, "emulator", cfg.Networks[0].Name)
assert.Equal(t, "testnet", cfg.Networks[1].Name)
assert.Equal(t, "mainnet", cfg.Networks[2].Name)
assert.Equal(t, "testing", cfg.Networks[1].Name)
assert.Equal(t, "testnet", cfg.Networks[2].Name)
assert.Equal(t, "mainnet", cfg.Networks[3].Name)
}

func Test_DefaultPath(t *testing.T) {
Expand Down
5 changes: 5 additions & 0 deletions flowkit/config/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ var (
Name: "emulator",
Host: "127.0.0.1:3569",
}
TestingNetwork = Network{
Name: "testing",
Host: "127.0.0.1:3569",
}
TestnetNetwork = Network{
Name: "testnet",
Host: "access.devnet.nodes.onflow.org:9000",
Expand All @@ -38,6 +42,7 @@ var (
}
DefaultNetworks = Networks{
EmulatorNetwork,
TestingNetwork,
TestnetNetwork,
MainnetNetwork,
}
Expand Down
28 changes: 22 additions & 6 deletions flowkit/flowkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"strings"
"sync"

"github.com/btcsuite/btcd/chaincfg/chainhash"
goeth "github.com/ethereum/go-ethereum/accounts"
"github.com/lmars/go-slip10"
"github.com/onflow/cadence"
Expand Down Expand Up @@ -220,7 +221,6 @@ func (f *Flowkit) prepareTransaction(
tx *transactions.Transaction,
account *accounts.Account,
) (*transactions.Transaction, error) {

block, err := f.gateway.GetLatestBlock()
if err != nil {
return nil, err
Expand Down Expand Up @@ -308,6 +308,7 @@ func (f *Flowkit) AddContract(
}

f.logger.StartProgress(fmt.Sprintf("Checking contract '%s' on account '%s'...", name, account.Address))
defer f.logger.StopProgress()

// check if contract exists on account
flowAccount, err := f.gateway.GetAccount(account.Address)
Expand Down Expand Up @@ -360,10 +361,19 @@ func (f *Flowkit) AddContract(
}

d := state.Deployments().ByAccountAndNetwork(account.Name, f.network.Name)
cd := config.ContractDeployment{
Name: name,
Args: contract.Args,
}
if d != nil {
d.AddContract(config.ContractDeployment{
Name: name,
})
d.AddContract(cd)
} else {
deployment := config.Deployment{
Network: f.network.Name,
Account: account.Name,
Contracts: []config.ContractDeployment{cd},
}
state.Deployments().AddOrUpdate(deployment)
}

// don't add contract if it already exists because it might overwrite existing data
Expand Down Expand Up @@ -549,7 +559,7 @@ func makeEventQueries(
) []grpc.EventRangeQuery {
var queries []grpc.EventRangeQuery
for startHeight <= endHeight {
suggestedEndHeight := startHeight + blockCount - 1 //since we are inclusive
suggestedEndHeight := startHeight + blockCount - 1 // since we are inclusive
end := endHeight
if suggestedEndHeight < endHeight {
end = suggestedEndHeight
Expand All @@ -564,7 +574,6 @@ func makeEventQueries(
startHeight = suggestedEndHeight + 1
}
return queries

}

// GenerateKey using the signature algorithm and optional seed. If seed is not provided a random safe seed will be generated.
Expand Down Expand Up @@ -854,6 +863,7 @@ func (f *Flowkit) GetTransactionByID(

if waitSeal {
f.logger.StartProgress("Waiting for transaction to be sealed...")
defer f.logger.StopProgress()
}

result, err := f.gateway.GetTransactionResult(ID, waitSeal)
Expand Down Expand Up @@ -1025,6 +1035,7 @@ func (f *Flowkit) SendTransaction(

f.logger.Info(fmt.Sprintf("Transaction ID: %s", tx.FlowTransaction().ID()))
f.logger.StartProgress("Sending transaction...")
defer f.logger.StopProgress()

sentTx, err := f.gateway.SendSignedTransaction(tx.FlowTransaction())
if err != nil {
Expand All @@ -1039,3 +1050,8 @@ func (f *Flowkit) SendTransaction(

return sentTx, res, err
}

// this is added to resolve the issue with chainhash ambiguous import,
// the code is not used, but it's needed to force go.mod specify and retain chainhash version
// workaround for issue: https://github.com/golang/go/issues/27899
var _ = chainhash.Hash{}
Loading