diff --git a/go.mod b/go.mod index aff49da88..7694a05cc 100644 --- a/go.mod +++ b/go.mod @@ -8,15 +8,15 @@ require ( github.com/go-git/go-git/v5 v5.11.0 github.com/gosuri/uilive v0.0.4 github.com/manifoldco/promptui v0.9.0 - github.com/onflow/cadence v1.0.0-M4 - github.com/onflow/cadence-tools/languageserver v1.0.0-M1 - github.com/onflow/cadence-tools/test v1.0.0-M1 + github.com/onflow/cadence v1.0.0-M7 + github.com/onflow/cadence-tools/languageserver v1.0.0-M2 + github.com/onflow/cadence-tools/test v1.0.0-M3 github.com/onflow/fcl-dev-wallet v0.8.0-stable-cadence.1 - github.com/onflow/flixkit-go v1.1.1-0.20240131170156-cd4c454e4b0d - github.com/onflow/flow-cli/flowkit v1.11.1-0.20240130210637-a22f7c578d37 - github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d - github.com/onflow/flow-emulator v1.0.0-M1 - github.com/onflow/flow-go-sdk v1.0.0-M1 + github.com/onflow/flixkit-go v1.1.1-0.20240214222351-03b90f7d32ef + github.com/onflow/flow-core-contracts/lib/go/templates v0.15.2-0.20240206003101-928bf99024d7 + github.com/onflow/flow-emulator v1.0.0-M5 + github.com/onflow/flow-go-sdk v1.0.0-M4 + github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.2.0.20240214213743-ee40994a815f github.com/onflowser/flowser/v3 v3.2.1-0.20240131200229-7d4d22715f48 github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c github.com/pkg/errors v0.9.1 @@ -156,7 +156,7 @@ require ( github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mattn/go-tty v0.0.4 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/sha256-simd v1.0.1 // indirect @@ -173,13 +173,13 @@ require ( github.com/multiformats/go-varint v0.0.7 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f // indirect - github.com/onflow/cadence-tools/lint v1.0.0-M1 // indirect + github.com/onflow/cadence-tools/lint v1.0.0-M4 // indirect github.com/onflow/crypto v0.25.0 // indirect - github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d // indirect - github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01 // indirect - github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f // indirect - github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad // indirect - github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 // indirect + github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7 // indirect + github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240205224107-320aa3cf09e0 // indirect + github.com/onflow/flow-go v0.33.2-0.20240214203221-b11eeaa896bd // indirect + github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240205233530-86ee8c352fa6 // indirect + github.com/onflow/flow/protobuf/go/flow v0.3.7 // indirect github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba // indirect github.com/onflow/wal v0.0.0-20230529184820-bc9f8244608d // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect @@ -203,6 +203,7 @@ require ( github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/slok/go-http-metrics v0.10.0 // indirect + github.com/sony/gobreaker v0.5.0 // indirect github.com/sourcegraph/jsonrpc2 v0.1.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/cast v1.5.1 // indirect diff --git a/go.sum b/go.sum index 94db512d1..d11b0fd57 100644 --- a/go.sum +++ b/go.sum @@ -1932,8 +1932,9 @@ github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= @@ -2044,37 +2045,40 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6 github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f h1:Z8/PgTqOgOg02MTRpTBYO2k16FE6z4wEOtaC2WBR9Xo= github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0-M4 h1:/nt3j7vpYDxuI0ghIgAJrb2R01ijvJYZLAkKt+zbpTY= -github.com/onflow/cadence v1.0.0-M4/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence-tools/languageserver v1.0.0-M1 h1:IgKQNK+beYpnvez8K17jLj6w57Gr9Ca6YpXYZP6idsY= -github.com/onflow/cadence-tools/languageserver v1.0.0-M1/go.mod h1:yYeSTQNlS7KIIBB5Z9Sb53wGFhIYiAIxNqIoIQnF1Ao= -github.com/onflow/cadence-tools/lint v1.0.0-M1 h1:M92+hX+pr28fR4f117WP69qRG80oL3RCVoYC6o68Bzk= -github.com/onflow/cadence-tools/lint v1.0.0-M1/go.mod h1:M2cmhrWu4sG2J8WjLL69njk2ITo1Wne5tBzG2m+en0g= -github.com/onflow/cadence-tools/test v1.0.0-M1 h1:l+hCgUR/13rHkF1j8TumhhpWn4tmNA8ra50iCCdS5Ao= -github.com/onflow/cadence-tools/test v1.0.0-M1/go.mod h1:xRfnM0BUo3YvGwFme2G7z1Q58UOsb0V/FvJW7VhERao= +github.com/onflow/cadence v1.0.0-M7 h1:hb4LK9lUbFdnDdfU8oqJGSVJtmkOzxwKomhmDcP/Faw= +github.com/onflow/cadence v1.0.0-M7/go.mod h1:a4mccDU90hmuxCLUFzs9J/ANG/rYbFa36h4Z0bBAqNU= +github.com/onflow/cadence-tools/languageserver v1.0.0-M2 h1:LOZQ6y+RzAwTF6DIrMWoaRhbECHZFqbsKrUp1TjORGE= +github.com/onflow/cadence-tools/languageserver v1.0.0-M2/go.mod h1:m3ZnSxAUqY3CSCP1Okp7zAwIUToUtlskihEkac4Ecc4= +github.com/onflow/cadence-tools/lint v1.0.0-M4 h1:XeBX+/2TKbe04nyMjUbSD9aHcF5+H6UOAgsuLTmo1DA= +github.com/onflow/cadence-tools/lint v1.0.0-M4/go.mod h1:vgKOF14/NwWktjsRKHlWEz8z/3uQu5nuqDzQOm+u2qY= +github.com/onflow/cadence-tools/test v1.0.0-M3 h1:ZbKoMhXsvafJIOO/MVE7lV5INXfq2IL0Z+W2MsJnKwY= +github.com/onflow/cadence-tools/test v1.0.0-M3/go.mod h1:Yk6OyiRMNseM6C13FpNUxTJ7GekYZMzdX5D2B10y4N8= github.com/onflow/crypto v0.24.9 h1:jYP1qdwid0qCineFzBFlxBchg710A7RuSWpTqxaOdog= github.com/onflow/crypto v0.24.9/go.mod h1:J/V7IEVaqjDajvF8K0B/SJPJDgAOP2G+LVLeb0hgmbg= github.com/onflow/fcl-dev-wallet v0.8.0-stable-cadence.1 h1:IqdUzdqFCSW0klWmA3J9c17ZyQTab9SWcWSLouX6o0Q= github.com/onflow/fcl-dev-wallet v0.8.0-stable-cadence.1/go.mod h1:kc42jkiuoPJmxMRFjfbRO9XvnR/3XLheaOerxVMDTiw= -github.com/onflow/flixkit-go v1.1.1-0.20240131170156-cd4c454e4b0d h1:gVjuB2yWSzswdUm+/bMcoyQt5773PCcf+Fi+hOc/m9Y= -github.com/onflow/flixkit-go v1.1.1-0.20240131170156-cd4c454e4b0d/go.mod h1:tAoH8I1IbSb/vimvtsCb41QOe4I50znJin4H8Xw0iNI= -github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d h1:Afcfk/9jAQZ1v5PLGdP68FG/0yPPM60fn9Eq8ChBGS0= -github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d/go.mod h1:Ts/HN+N0RaYJ6oPCqR1JPaMVFiVaMdKTSUH4OdSjjs0= -github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d h1:IQJpP3VLLjT4R8ItBpr+Mmp0IOnC/8iBcM0/67JNB9c= -github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d/go.mod h1:MZ2j5YVTQiSE0B99zuaYhxvGG5GcvimWpQK1Fw/1QBg= -github.com/onflow/flow-emulator v1.0.0-M1 h1:0hBEmvm73F+5HhN5ugkOP3UyN+Ea9yGWflEmoeGzgdw= -github.com/onflow/flow-emulator v1.0.0-M1/go.mod h1:JFJCeQVyhCQVD2Tq4QhctIXK6j5U6aU15yoEwMJt5AQ= -github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01 h1:8iKk5RuFvhe7NQyAO3c+xiVvv38RB/yopHdWxp4AbL8= -github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= -github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f h1:F1y95CpteZn0i4v0FDGjKiqI13Xlir3hX4x0C1xMRoc= -github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f/go.mod h1:9q+c+fuTpc/emueM/2bI/Ih2jw3V+9WS3Eu+pWBuLW0= -github.com/onflow/flow-go-sdk v1.0.0-M1 h1:mke/ebYwNRRWPZqcwCV56Alx0A8psew43ZbSEUQ4TL8= +github.com/onflow/flixkit-go v1.1.1-0.20240214222351-03b90f7d32ef h1:nPtuUuIMBcsl9T15qWzat8hYo6lU6ip2WKoYT2p9H4w= +github.com/onflow/flixkit-go v1.1.1-0.20240214222351-03b90f7d32ef/go.mod h1:mKbeBFAmwjQfLZZrwNqJAfTI9zi7VDXzc5swaX49wKQ= +github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7 h1:OI/4F2NK/X/4x3dTUFFDGtuOsSa9pX+jjBeSEcBrY/M= +github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7/go.mod h1:GK+Ik1K3L3v8xmHmRQv5yxJz81lYhdYSNm0PQ63Xrws= +github.com/onflow/flow-core-contracts/lib/go/templates v0.15.2-0.20240206003101-928bf99024d7 h1:WAx8ftVz1BeXiKvQ9gLKEf1J3NBWK26Pbczd0iH4C6I= +github.com/onflow/flow-core-contracts/lib/go/templates v0.15.2-0.20240206003101-928bf99024d7/go.mod h1:MZ2j5YVTQiSE0B99zuaYhxvGG5GcvimWpQK1Fw/1QBg= +github.com/onflow/flow-emulator v1.0.0-M5 h1:yPx6je/ahdYvd4b80bMXJ0AT4k2eogEGsQCOI+83V2I= +github.com/onflow/flow-emulator v1.0.0-M5/go.mod h1:CBp/YrgR2PeOdqhQMbfAiznGayNoJuFQTfLV9EJFtEc= +github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240205224107-320aa3cf09e0 h1:u6/YcUvO8jU0f3Evb/6agzXqeOo+VbL2a3mmj/5ifRs= +github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240205224107-320aa3cf09e0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= +github.com/onflow/flow-go v0.33.2-0.20240214203221-b11eeaa896bd h1:x9eOt5rdDSr00aKwoyUWyJ4m8WlUwgYoV94oSEWPhiM= +github.com/onflow/flow-go v0.33.2-0.20240214203221-b11eeaa896bd/go.mod h1:45DIkRx5a+qiV83fpJ+fra9WtRiF4bTqd7XMxahRdnc= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad h1:I6LD9BOsilGbiqhGjP86FIIXJe0YdUz75d/oWdHFzDI= -github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE= +github.com/onflow/flow-go-sdk v1.0.0-M4 h1:dGtgZvaIfBR5/9I9nm5nLm69V5pLcSz9vXmzCb1lyzM= +github.com/onflow/flow-go-sdk v1.0.0-M4/go.mod h1:HIGOKJVR47QNs81sPHmZDVcLr+syNkmbgEMLQGDmmEo= +github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240205233530-86ee8c352fa6 h1:/2vvjKkWG/3cKP3IpgiGNqXi0yskn4GmNTjmeCwMoz8= +github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240205233530-86ee8c352fa6/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE= github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= -github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 h1:+rT+UsfTR39JZO8ht2+4fkaWfHw74SCj1fyz1lWuX8A= -github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= +github.com/onflow/flow/protobuf/go/flow v0.3.7 h1:+6sBdlE/u4ZMTVB9U1lA6Xn2Bd48lOOX96Bv9dNubsk= +github.com/onflow/flow/protobuf/go/flow v0.3.7/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= +github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.2.0.20240214213743-ee40994a815f h1:GjStQGlfhxbZiOZy8vFRSNUrNoD1u3Q8f5mhfyZ1vhc= +github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.2.0.20240214213743-ee40994a815f/go.mod h1:Ck+iZGJYerviTQ3SyqoUNLNXdRUJiI5iMxfM9YugtK0= github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba h1:rIehuhO6bj4FkwE4VzwEjX7MoAlOhUJENBJLqDqVxAo= github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= github.com/onflow/wal v0.0.0-20230529184820-bc9f8244608d h1:gAEqYPn3DS83rHIKEpsajnppVD1+zwuYPFyeDVFaQvg= @@ -2270,6 +2274,8 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= +github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/jsonrpc2 v0.1.0 h1:ohJHjZ+PcaLxDUjqk2NC3tIGsVa5bXThe1ZheSXOjuk= github.com/sourcegraph/jsonrpc2 v0.1.0/go.mod h1:ZafdZgk/axhT1cvZAPOhw+95nz2I/Ra5qMlU4gTRwIo= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= diff --git a/internal/accounts/accounts_test.go b/internal/accounts/accounts_test.go index c6db069dd..2805faa21 100644 --- a/internal/accounts/accounts_test.go +++ b/internal/accounts/accounts_test.go @@ -23,7 +23,7 @@ import ( "strings" "testing" - "github.com/onflow/flow-cli/flowkit/accounts" + "github.com/onflow/flowkit/v2/accounts" "github.com/onflow/flow-go-sdk" "github.com/onflow/flow-go-sdk/crypto" @@ -31,8 +31,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/tests" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/tests" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/accounts/contract-add.go b/internal/accounts/contract-add.go index 084b91716..b82e999bd 100644 --- a/internal/accounts/contract-add.go +++ b/internal/accounts/contract-add.go @@ -28,9 +28,10 @@ import ( flowsdk "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/arguments" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/arguments" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/accounts/contract-remove.go b/internal/accounts/contract-remove.go index a6839febd..5061289f2 100644 --- a/internal/accounts/contract-remove.go +++ b/internal/accounts/contract-remove.go @@ -26,8 +26,9 @@ import ( "github.com/onflow/flow-cli/internal/util" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/accounts/create-interactive.go b/internal/accounts/create-interactive.go index 95f300da3..534954331 100644 --- a/internal/accounts/create-interactive.go +++ b/internal/accounts/create-interactive.go @@ -35,11 +35,12 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/gateway" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/accounts" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/gateway" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/util" ) @@ -159,7 +160,7 @@ func createNetworkAccount( return &accounts.Account{ Name: name, Address: *address[0], - Key: accounts.NewFileKey(privateFile, 0, defaultSignAlgo, defaultHashAlgo), + Key: accounts.NewFileKey(privateFile, 0, defaultSignAlgo, defaultHashAlgo, state.ReaderWriter()), }, nil } diff --git a/internal/accounts/create.go b/internal/accounts/create.go index 436321fad..db8015462 100644 --- a/internal/accounts/create.go +++ b/internal/accounts/create.go @@ -23,13 +23,14 @@ import ( "fmt" "strings" - "github.com/onflow/flow-cli/flowkit/accounts" + "github.com/onflow/flowkit/v2/accounts" "github.com/onflow/flow-go-sdk/crypto" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/accounts/fund.go b/internal/accounts/fund.go index 4f161a20c..10750b0cb 100644 --- a/internal/accounts/fund.go +++ b/internal/accounts/fund.go @@ -27,8 +27,9 @@ import ( "github.com/pkg/browser" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/accounts/get.go b/internal/accounts/get.go index 9c9c5b8cd..d52b97028 100644 --- a/internal/accounts/get.go +++ b/internal/accounts/get.go @@ -25,8 +25,9 @@ import ( flowsdk "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/accounts/staking-info.go b/internal/accounts/staking-info.go index 4ef3013ba..33e95eb78 100644 --- a/internal/accounts/staking-info.go +++ b/internal/accounts/staking-info.go @@ -28,8 +28,9 @@ import ( flowsdk "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/blocks/blocks_test.go b/internal/blocks/blocks_test.go index 04f6dd12d..a41a07ebc 100644 --- a/internal/blocks/blocks_test.go +++ b/internal/blocks/blocks_test.go @@ -26,8 +26,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/tests" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/tests" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/blocks/get.go b/internal/blocks/get.go index de384fd27..a5ed6a444 100644 --- a/internal/blocks/get.go +++ b/internal/blocks/get.go @@ -24,8 +24,9 @@ import ( flowsdk "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/collections/get.go b/internal/collections/get.go index 72370444a..9826394ac 100644 --- a/internal/collections/get.go +++ b/internal/collections/get.go @@ -25,8 +25,9 @@ import ( flowsdk "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/command/command.go b/internal/command/command.go index f1dcd81ca..891d133dc 100644 --- a/internal/command/command.go +++ b/internal/command/command.go @@ -38,11 +38,12 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/gateway" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/build" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/gateway" - "github.com/onflow/flow-cli/flowkit/output" "github.com/onflow/flow-cli/internal/settings" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/command/global_flags.go b/internal/command/global_flags.go index 33ecc0a9f..9b8d552e4 100644 --- a/internal/command/global_flags.go +++ b/internal/command/global_flags.go @@ -25,7 +25,8 @@ import ( "github.com/psiemens/sconfig" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit/config" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/command/result.go b/internal/command/result.go index ed9be9266..ed4483592 100644 --- a/internal/command/result.go +++ b/internal/command/result.go @@ -30,8 +30,8 @@ import ( "github.com/spf13/afero" "golang.org/x/exp/maps" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" ) // Result interface describes all the formats for the result output. diff --git a/internal/config/add-account.go b/internal/config/add-account.go index c3255292c..e5317c20d 100644 --- a/internal/config/add-account.go +++ b/internal/config/add-account.go @@ -22,15 +22,16 @@ import ( "fmt" "strconv" - "github.com/onflow/flow-cli/flowkit/accounts" + "github.com/onflow/flowkit/v2/accounts" "github.com/onflow/flow-go-sdk" "github.com/onflow/flow-go-sdk/crypto" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/config/add-contract.go b/internal/config/add-contract.go index 2191a7ac2..c9a64f692 100644 --- a/internal/config/add-contract.go +++ b/internal/config/add-contract.go @@ -24,9 +24,10 @@ import ( "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/config/add-deployment.go b/internal/config/add-deployment.go index b642dc7a5..efdec39c6 100644 --- a/internal/config/add-deployment.go +++ b/internal/config/add-deployment.go @@ -23,9 +23,10 @@ import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/config/add-network.go b/internal/config/add-network.go index 832ee1d7e..d2a68f615 100644 --- a/internal/config/add-network.go +++ b/internal/config/add-network.go @@ -24,9 +24,10 @@ import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/config/init.go b/internal/config/init.go index c726004fe..ba968ead6 100644 --- a/internal/config/init.go +++ b/internal/config/init.go @@ -25,9 +25,10 @@ import ( "github.com/onflow/flow-go-sdk/crypto" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/config/remove-account.go b/internal/config/remove-account.go index a2b42f36b..2e26d63ba 100644 --- a/internal/config/remove-account.go +++ b/internal/config/remove-account.go @@ -21,8 +21,9 @@ package config import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/config/remove-contract.go b/internal/config/remove-contract.go index fd7236566..dcccd634b 100644 --- a/internal/config/remove-contract.go +++ b/internal/config/remove-contract.go @@ -21,8 +21,9 @@ package config import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/config/remove-deployment.go b/internal/config/remove-deployment.go index 6a8c0daf1..1c4051ee3 100644 --- a/internal/config/remove-deployment.go +++ b/internal/config/remove-deployment.go @@ -21,8 +21,9 @@ package config import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/config/remove-network.go b/internal/config/remove-network.go index 48f2d956f..26e09a3f5 100644 --- a/internal/config/remove-network.go +++ b/internal/config/remove-network.go @@ -21,8 +21,9 @@ package config import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/dependencymanager/add.go b/internal/dependencymanager/add.go index b972e99a1..b7ee54943 100644 --- a/internal/dependencymanager/add.go +++ b/internal/dependencymanager/add.go @@ -23,8 +23,9 @@ import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/dependencymanager/dependencyinstaller.go b/internal/dependencymanager/dependencyinstaller.go index 0be79d74b..c142bf51b 100644 --- a/internal/dependencymanager/dependencyinstaller.go +++ b/internal/dependencymanager/dependencyinstaller.go @@ -28,16 +28,16 @@ import ( "github.com/onflow/flow-cli/internal/util" - "github.com/onflow/flow-cli/flowkit/gateway" + "github.com/onflow/flowkit/v2/gateway" - "github.com/onflow/flow-cli/flowkit/project" + "github.com/onflow/flowkit/v2/project" flowsdk "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-cli/flowkit/config" + "github.com/onflow/flowkit/v2/config" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" ) type DependencyInstaller struct { diff --git a/internal/dependencymanager/dependencyinstaller_test.go b/internal/dependencymanager/dependencyinstaller_test.go index 9a7e1ac59..23f6e6626 100644 --- a/internal/dependencymanager/dependencyinstaller_test.go +++ b/internal/dependencymanager/dependencyinstaller_test.go @@ -26,11 +26,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/gateway" - "github.com/onflow/flow-cli/flowkit/gateway/mocks" - "github.com/onflow/flow-cli/flowkit/output" - "github.com/onflow/flow-cli/flowkit/tests" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/gateway" + "github.com/onflow/flowkit/v2/gateway/mocks" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flowkit/v2/tests" + "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/dependencymanager/install.go b/internal/dependencymanager/install.go index cd16effb9..4014b4c66 100644 --- a/internal/dependencymanager/install.go +++ b/internal/dependencymanager/install.go @@ -23,8 +23,9 @@ import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/emulator/snapshot.go b/internal/emulator/snapshot.go index 5855e403d..3d4c45d3b 100644 --- a/internal/emulator/snapshot.go +++ b/internal/emulator/snapshot.go @@ -29,8 +29,9 @@ import ( "github.com/spf13/cobra" "golang.org/x/exp/slices" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/emulator/start.go b/internal/emulator/start.go index d0661b088..bdc673fac 100644 --- a/internal/emulator/start.go +++ b/internal/emulator/start.go @@ -30,8 +30,9 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/events/events_test.go b/internal/events/events_test.go index 7bc2883e0..e40678929 100644 --- a/internal/events/events_test.go +++ b/internal/events/events_test.go @@ -28,8 +28,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/tests" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/tests" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/events/get.go b/internal/events/get.go index f6f0a6bcc..dc9ce6af6 100644 --- a/internal/events/get.go +++ b/internal/events/get.go @@ -24,8 +24,9 @@ import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/keys/decode.go b/internal/keys/decode.go index 98057289a..d4f81cc41 100644 --- a/internal/keys/decode.go +++ b/internal/keys/decode.go @@ -27,8 +27,9 @@ import ( "github.com/onflow/flow-go-sdk/crypto" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/keys/derive.go b/internal/keys/derive.go index 453be91cd..5584eb8e9 100644 --- a/internal/keys/derive.go +++ b/internal/keys/derive.go @@ -24,8 +24,9 @@ import ( "github.com/onflow/flow-go-sdk/crypto" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/keys/generate.go b/internal/keys/generate.go index fd5078a61..1153684d7 100644 --- a/internal/keys/generate.go +++ b/internal/keys/generate.go @@ -25,8 +25,9 @@ import ( "github.com/onflow/flow-go-sdk/crypto" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/keys/keys.go b/internal/keys/keys.go index 9ef0114ff..2f812d0bf 100644 --- a/internal/keys/keys.go +++ b/internal/keys/keys.go @@ -26,7 +26,8 @@ import ( "github.com/onflow/flow-go-sdk/crypto" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/project/deploy.go b/internal/project/deploy.go index e545a6210..5ad30678a 100644 --- a/internal/project/deploy.go +++ b/internal/project/deploy.go @@ -27,10 +27,11 @@ import ( "github.com/spf13/cobra" "golang.org/x/exp/slices" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" - "github.com/onflow/flow-cli/flowkit/project" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flowkit/v2/project" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/project/project_test.go b/internal/project/project_test.go index e61a76ee0..a136fca65 100644 --- a/internal/project/project_test.go +++ b/internal/project/project_test.go @@ -25,9 +25,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/config" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/accounts" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/quick/run.go b/internal/quick/run.go index 3954ebd8a..337eba148 100644 --- a/internal/quick/run.go +++ b/internal/quick/run.go @@ -23,8 +23,9 @@ import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/scripts/execute.go b/internal/scripts/execute.go index 050518951..2c5ce7e44 100644 --- a/internal/scripts/execute.go +++ b/internal/scripts/execute.go @@ -26,9 +26,10 @@ import ( flowsdk "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/arguments" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/arguments" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/scripts/scripts_test.go b/internal/scripts/scripts_test.go index baa191f3d..a1d344ff4 100644 --- a/internal/scripts/scripts_test.go +++ b/internal/scripts/scripts_test.go @@ -26,8 +26,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/tests" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/tests" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/signatures/generate.go b/internal/signatures/generate.go index 4d4fefb0c..c55032818 100644 --- a/internal/signatures/generate.go +++ b/internal/signatures/generate.go @@ -23,12 +23,13 @@ import ( "context" "fmt" - "github.com/onflow/flow-cli/flowkit/accounts" + "github.com/onflow/flowkit/v2/accounts" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/signatures/verify.go b/internal/signatures/verify.go index 841346ccf..c045b0a65 100644 --- a/internal/signatures/verify.go +++ b/internal/signatures/verify.go @@ -27,8 +27,9 @@ import ( "github.com/onflow/flow-go-sdk/crypto" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/snapshot/save.go b/internal/snapshot/save.go index 3007b80ca..ee19b01a3 100644 --- a/internal/snapshot/save.go +++ b/internal/snapshot/save.go @@ -24,8 +24,9 @@ import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/status/status.go b/internal/status/status.go index 60f6c6608..1acc6f3e1 100644 --- a/internal/status/status.go +++ b/internal/status/status.go @@ -24,8 +24,9 @@ import ( "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/super/dev.go b/internal/super/dev.go index 29ab1f068..7ab0f32cd 100644 --- a/internal/super/dev.go +++ b/internal/super/dev.go @@ -27,8 +27,9 @@ import ( "github.com/onflow/cadence/runtime/parser" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/super/files.go b/internal/super/files.go index d1388bfa2..e09803812 100644 --- a/internal/super/files.go +++ b/internal/super/files.go @@ -28,7 +28,7 @@ import ( "github.com/pkg/errors" "github.com/radovskyb/watcher" - "github.com/onflow/flow-cli/flowkit/config" + "github.com/onflow/flowkit/v2/config" ) const ( diff --git a/internal/super/flix.go b/internal/super/flix.go index 418b2d126..c1445044b 100644 --- a/internal/super/flix.go +++ b/internal/super/flix.go @@ -28,9 +28,10 @@ import ( "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/scripts" "github.com/onflow/flow-cli/internal/transactions" diff --git a/internal/super/flix_test.go b/internal/super/flix_test.go index f1cc7d4bf..d283ee8ce 100644 --- a/internal/super/flix_test.go +++ b/internal/super/flix_test.go @@ -29,11 +29,12 @@ import ( "github.com/onflow/flixkit-go/flixkit" "github.com/onflow/flow-go-sdk/crypto" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/mocks" - "github.com/onflow/flow-cli/flowkit/output" - "github.com/onflow/flow-cli/flowkit/tests" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/mocks" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flowkit/v2/tests" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/super/generate.go b/internal/super/generate.go index fbafddbe2..721dc9372 100644 --- a/internal/super/generate.go +++ b/internal/super/generate.go @@ -23,11 +23,12 @@ import ( "path/filepath" "strings" - "github.com/onflow/flow-cli/flowkit/config" + "github.com/onflow/flowkit/v2/config" - "github.com/onflow/flow-cli/flowkit" + "github.com/onflow/flowkit/v2" + + "github.com/onflow/flowkit/v2/output" - "github.com/onflow/flow-cli/flowkit/output" "github.com/onflow/flow-cli/internal/command" "github.com/spf13/cobra" diff --git a/internal/super/generate_test.go b/internal/super/generate_test.go index 9114f89bd..69449846a 100644 --- a/internal/super/generate_test.go +++ b/internal/super/generate_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2/output" ) func TestGenerateNewContract(t *testing.T) { diff --git a/internal/super/output.go b/internal/super/output.go index 064a84d34..b2547e16a 100644 --- a/internal/super/output.go +++ b/internal/super/output.go @@ -31,9 +31,9 @@ import ( "golang.org/x/exp/maps" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" - flowkitProject "github.com/onflow/flow-cli/flowkit/project" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + flowkitProject "github.com/onflow/flowkit/v2/project" ) func printDeployment(deployed []*flowkitProject.Contract, err error, contractPathNames map[string]string) { diff --git a/internal/super/project.go b/internal/super/project.go index d8729fd51..14f71f7b5 100644 --- a/internal/super/project.go +++ b/internal/super/project.go @@ -25,10 +25,11 @@ import ( "github.com/onflow/flow-go-sdk/crypto" "github.com/pkg/errors" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/config" - flowkitProject "github.com/onflow/flow-cli/flowkit/project" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/accounts" + "github.com/onflow/flowkit/v2/config" + flowkitProject "github.com/onflow/flowkit/v2/project" + "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/super/setup.go b/internal/super/setup.go index fd25a1841..f41a630bf 100644 --- a/internal/super/setup.go +++ b/internal/super/setup.go @@ -32,8 +32,9 @@ import ( "github.com/go-git/go-git/v5/plumbing" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/test/test.go b/internal/test/test.go index 84d96cb6c..3d594e8f8 100644 --- a/internal/test/test.go +++ b/internal/test/test.go @@ -32,9 +32,10 @@ import ( "github.com/onflow/cadence/runtime/common" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/test/test_test.go b/internal/test/test_test.go index 0352e6deb..023cea7d5 100644 --- a/internal/test/test_test.go +++ b/internal/test/test_test.go @@ -30,8 +30,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/tests" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/tests" + "github.com/onflow/flow-cli/internal/util" ) @@ -339,19 +340,24 @@ func TestExecutingTests(t *testing.T) { "A.0000000000000001.NonFungibleToken", "A.0000000000000001.ViewResolver", "A.0000000000000001.RandomBeaconHistory", + "A.0000000000000001.EVM", + "A.0000000000000002.FungibleTokenSwitchboard", "I.BlockchainHelpers", }, coverageReport.ExcludedLocationIDs(), ) + + expected := "Coverage: 91.9% of statements" + assert.Equal( t, - "Coverage: 91.6% of statements", + expected, coverageReport.String(), ) assert.Contains( t, result.String(), - "Coverage: 91.6% of statements", + expected, ) lcovReport, _ := coverageReport.MarshalLCOV() @@ -435,6 +441,8 @@ func TestExecutingTests(t *testing.T) { "A.0000000000000001.NonFungibleToken", "A.0000000000000001.ViewResolver", "A.0000000000000001.RandomBeaconHistory", + "A.0000000000000001.EVM", + "A.0000000000000002.FungibleTokenSwitchboard", "I.BlockchainHelpers", }, coverageReport.ExcludedLocationIDs(), diff --git a/internal/tools/flowser.go b/internal/tools/flowser.go index 5257bb8d6..8fde13910 100644 --- a/internal/tools/flowser.go +++ b/internal/tools/flowser.go @@ -26,9 +26,10 @@ import ( "github.com/onflowser/flowser/v3/pkg/flowser" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/settings" "github.com/onflow/flow-cli/internal/util" diff --git a/internal/tools/wallet.go b/internal/tools/wallet.go index 97a0762c7..cc33e69ae 100644 --- a/internal/tools/wallet.go +++ b/internal/tools/wallet.go @@ -25,8 +25,9 @@ import ( devWallet "github.com/onflow/fcl-dev-wallet/go/wallet" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/transactions/build.go b/internal/transactions/build.go index 8ca2cf5a0..cec2ad998 100644 --- a/internal/transactions/build.go +++ b/internal/transactions/build.go @@ -26,10 +26,11 @@ import ( flowsdk "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/arguments" - "github.com/onflow/flow-cli/flowkit/output" - "github.com/onflow/flow-cli/flowkit/transactions" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/arguments" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flowkit/v2/transactions" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/transactions/decode.go b/internal/transactions/decode.go index fa809bf16..81487bcaa 100644 --- a/internal/transactions/decode.go +++ b/internal/transactions/decode.go @@ -21,12 +21,13 @@ package transactions import ( "fmt" - "github.com/onflow/flow-cli/flowkit/transactions" + "github.com/onflow/flowkit/v2/transactions" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/transactions/get.go b/internal/transactions/get.go index d2379fc00..5c187774f 100644 --- a/internal/transactions/get.go +++ b/internal/transactions/get.go @@ -25,8 +25,9 @@ import ( flowsdk "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/transactions/send-signed.go b/internal/transactions/send-signed.go index d39d84612..95f4c0376 100644 --- a/internal/transactions/send-signed.go +++ b/internal/transactions/send-signed.go @@ -22,12 +22,13 @@ import ( "context" "fmt" - "github.com/onflow/flow-cli/flowkit/transactions" + "github.com/onflow/flowkit/v2/transactions" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/transactions/send.go b/internal/transactions/send.go index 4072bdc4c..07ed13ff7 100644 --- a/internal/transactions/send.go +++ b/internal/transactions/send.go @@ -25,11 +25,12 @@ import ( "github.com/onflow/cadence" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/arguments" - "github.com/onflow/flow-cli/flowkit/output" - "github.com/onflow/flow-cli/flowkit/transactions" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/accounts" + "github.com/onflow/flowkit/v2/arguments" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flowkit/v2/transactions" + "github.com/onflow/flow-cli/internal/command" ) diff --git a/internal/transactions/sign.go b/internal/transactions/sign.go index bf3c25e99..fea67ea76 100644 --- a/internal/transactions/sign.go +++ b/internal/transactions/sign.go @@ -27,15 +27,16 @@ import ( "net/http" "sort" - "github.com/onflow/flow-cli/flowkit/transactions" + "github.com/onflow/flowkit/v2/transactions" - "github.com/onflow/flow-cli/flowkit/accounts" + "github.com/onflow/flowkit/v2/accounts" flowsdk "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/transactions/transactions.go b/internal/transactions/transactions.go index ed9f0e3cc..556cab205 100644 --- a/internal/transactions/transactions.go +++ b/internal/transactions/transactions.go @@ -27,7 +27,8 @@ import ( "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/events" "github.com/onflow/flow-cli/internal/util" diff --git a/internal/transactions/transactions_test.go b/internal/transactions/transactions_test.go index d753fbbd4..6604f657f 100644 --- a/internal/transactions/transactions_test.go +++ b/internal/transactions/transactions_test.go @@ -29,12 +29,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" - "github.com/onflow/flow-cli/flowkit/tests" - "github.com/onflow/flow-cli/flowkit/transactions" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/accounts" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flowkit/v2/tests" + "github.com/onflow/flowkit/v2/transactions" + "github.com/onflow/flow-cli/internal/command" "github.com/onflow/flow-cli/internal/util" ) diff --git a/internal/util/prompt.go b/internal/util/prompt.go index 392aa8d34..8df24f74b 100644 --- a/internal/util/prompt.go +++ b/internal/util/prompt.go @@ -33,8 +33,8 @@ import ( "golang.org/x/exp/maps" "golang.org/x/exp/slices" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/output" + "github.com/onflow/flowkit/v2/config" + "github.com/onflow/flowkit/v2/output" ) func ApproveTransactionForSigningPrompt(transaction *flow.Transaction) bool { diff --git a/internal/util/test.go b/internal/util/test.go index 17e408c6b..c688515c3 100644 --- a/internal/util/test.go +++ b/internal/util/test.go @@ -25,10 +25,10 @@ import ( "github.com/onflow/flow-go-sdk/crypto" "github.com/stretchr/testify/require" - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/mocks" - "github.com/onflow/flow-cli/flowkit/output" - "github.com/onflow/flow-cli/flowkit/tests" + "github.com/onflow/flowkit/v2" + "github.com/onflow/flowkit/v2/mocks" + "github.com/onflow/flowkit/v2/output" + "github.com/onflow/flowkit/v2/tests" ) var NoLogger = output.NewStdoutLogger(output.NoneLog) diff --git a/internal/util/util.go b/internal/util/util.go index f928ded19..0e2fce51c 100644 --- a/internal/util/util.go +++ b/internal/util/util.go @@ -30,7 +30,7 @@ import ( flowsdk "github.com/onflow/flow-go-sdk" "github.com/onflow/flow-go-sdk/crypto" - "github.com/onflow/flow-cli/flowkit" + "github.com/onflow/flowkit/v2" ) const EnvPrefix = "FLOW"