Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deploy-contracts command #45

Closed
wants to merge 68 commits into from
Closed
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
5eb0f41
Add flow beta deploy-contracts command
psiemens Feb 2, 2021
394bb22
Add comment to sortByDeploymentOrder
psiemens Feb 2, 2021
9e015e7
Add color to init command
psiemens Feb 2, 2021
b97ff3a
Change defaultEmulatorServiceAccountName to "emulator-service-account"
psiemens Feb 2, 2021
b221e10
Parse service address special identifier
psiemens Feb 2, 2021
0cfc1e9
Update deploy.go
psiemens Feb 2, 2021
15018c3
implemented update flag in deploy contract
Feb 2, 2021
4492465
fix deploy contract bundle names output
Feb 3, 2021
199e96d
feat: config account keys advanced and simple
Feb 5, 2021
925f5b6
test: config account keys test
Feb 5, 2021
3ec917d
tests: add testify lib
Feb 5, 2021
5fe41cd
ignore built cli
Feb 5, 2021
df779b4
added comments
Feb 5, 2021
f51eddb
remove bundle name and alias
Feb 5, 2021
734cd50
commented the project file
Feb 8, 2021
0c3c100
test: add test for deploy
Feb 8, 2021
f5980aa
added account collection
Feb 8, 2021
ed597dc
create collections for contracts and accounts
Feb 8, 2021
3055c05
feat: implemented contracts with advanced format
Feb 9, 2021
34330bf
test: new config structure
Feb 9, 2021
3048ce7
fix: default value for contract where no network is defined
Feb 9, 2021
6eeb895
test: default value no network for contract
Feb 9, 2021
659c52c
refactor: project remove code duplication from config
Feb 9, 2021
dcbfb68
fix: default chain id for accounts
Feb 9, 2021
90f1ab3
test: add project tests
Feb 9, 2021
e4b36a6
implement simple and advanced deploy format
Feb 9, 2021
c663a0c
get contracts for deployment
Feb 9, 2021
5a05cce
test contracts for deployment
Feb 9, 2021
b4c1d46
deploy collection config and getters
Feb 9, 2021
e21f4e3
test: deploy collection
Feb 9, 2021
3b37636
bugfix and test fix
Feb 10, 2021
8e559b2
network collection
Feb 10, 2021
6cb64f2
remove aliases and emulator config
Feb 10, 2021
715b738
test: config test fix
Feb 10, 2021
3587497
feat: added network collection and getters
Feb 10, 2021
0234132
test: project fix
Feb 10, 2021
7d09801
fix: went back to previous structure with minor refactor
Feb 10, 2021
ebb5f66
new implementation in deploy
Feb 10, 2021
f9588e9
test fix
Feb 11, 2021
48ed02e
refactor: remove emulator from config and project
Feb 11, 2021
bcccb9f
fixed comments
Feb 11, 2021
562dbd3
config refactor
Feb 11, 2021
6e97636
comment fix
Feb 11, 2021
1102ada
major refactor config
Feb 11, 2021
3a37070
ref: changed parsing to unmarshal error
Feb 12, 2021
172d471
test: new structure test fixed
Feb 12, 2021
1000881
fix: project to new structure
Feb 12, 2021
3690d7f
wire json config to project
Feb 12, 2021
458eb87
housekeeping
Feb 12, 2021
0536a39
contract to json
Feb 12, 2021
e45ec92
network to json
Feb 12, 2021
889dc33
account to json
Feb 12, 2021
916593e
deploy to json
Feb 12, 2021
1f144c0
comments
Feb 12, 2021
4af0ca4
add a bit of output to deploy
Feb 12, 2021
1061b7f
go files
Feb 12, 2021
b7fefa9
check there are no duplicates in contracts
Feb 12, 2021
1d6071b
Update flow/beta/cli/config/json/account.go
sideninja Feb 15, 2021
5901322
Update flow/beta/cli/config/json/config.go
sideninja Feb 15, 2021
cd9c447
Update flow/beta/cli/config/json/contract.go
sideninja Feb 15, 2021
2b8c00c
Update flow/beta/cli/config/json/deploy.go
sideninja Feb 15, 2021
d7efe4b
Update flow/beta/cli/config/json/network.go
sideninja Feb 15, 2021
c371604
Update flow/beta/cli/config/json/config.go
sideninja Feb 15, 2021
10483b7
Update flow/beta/cli/config/json/deploy.go
sideninja Feb 15, 2021
142d04f
implemented feedback changes
Feb 15, 2021
4d82c65
fixed tests for new improvements
Feb 15, 2021
bf66d59
renamed beta to project
Feb 15, 2021
a410636
project test improved
Feb 15, 2021
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ flow.json
.idea
.vscode
git

# Ignore built CLI
main
2 changes: 2 additions & 0 deletions flow/beta/beta.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package beta
import (
"github.com/spf13/cobra"

"github.com/onflow/flow-cli/flow/beta/commands/deploy_contracts"
"github.com/onflow/flow-cli/flow/beta/commands/initialize"
"github.com/onflow/flow-cli/flow/beta/commands/start_emulator"
)
Expand All @@ -33,4 +34,5 @@ var Cmd = &cobra.Command{
func init() {
Cmd.AddCommand(initialize.Cmd)
Cmd.AddCommand(start_emulator.Cmd)
Cmd.AddCommand(deploy_contracts.Cmd)
}
10 changes: 10 additions & 0 deletions flow/beta/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ import (
"crypto/rand"
"fmt"
"os"

"github.com/fatih/color"
)

const EnvPrefix = "FLOW"

func Exit(code int, msg string) {
fmt.Println(msg)
os.Exit(code)
Expand All @@ -44,3 +48,9 @@ func RandomSeed(n int) []byte {

return seed
}

// Colors
var Yellow = color.New(color.FgYellow, color.Bold).SprintfFunc()
var Green = color.New(color.FgGreen, color.Bold).SprintfFunc()
var Red = color.New(color.FgRed, color.Bold).SprintfFunc()
var Bold = color.New(color.Bold).SprintfFunc()
Loading