Add back contract deployment#10
Conversation
turbolent
left a comment
There was a problem hiding this comment.
Nice! Thanks for bringing this back
| var contracts []templates.Contract | ||
|
|
||
| if len(conf.Contract) > 0 { | ||
| contractFlagContent := strings.Split(conf.Contract, ":") |
There was a problem hiding this comment.
| contractFlagContent := strings.Split(conf.Contract, ":") | |
| contractFlagContent := strings.SplitN(conf.Contract, ":", 2) |
There was a problem hiding this comment.
I didn't SplitN so that i could use the length as an extra check, but : in filename/path would probably just make it error on read later, which is probably okay.
| HashAlgo string `default:"SHA3_256" flag:"hash-algo" info:"Hash used for the digest"` | ||
| Host string `flag:"host" info:"Flow Access API host address"` | ||
| Results bool `default:"false" flag:"results" info:"Display the results of the transaction"` | ||
| Contract string `flag:"contract,c" info:"Contract to be deployed during account creation. <name:path>"` |
There was a problem hiding this comment.
Good idea to use name:path. Maybe make it a slice like Keys above?
There was a problem hiding this comment.
that's a pretty easy way to make it support multiple contracts, so sure! added.
|
i was also wondering if it makes sense to go with using the command args, similar to |
psiemens
left a comment
There was a problem hiding this comment.
Looks good!
I think it's good to make --contracts a flag rather than a positional argument given that it's not required for account creation
Closes #2
Description
Adds a
--contractflag to allow deploying a contract along with account creation.How do we feel about the requirement for the flag contents to be
name:filepath?For contributor use:
masterbranchFiles changedin the Github PR explorer