-
Notifications
You must be signed in to change notification settings - Fork 74
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
aux: redeploy contracts #998
Conversation
65a11da
to
ef0e3a8
Compare
12, // benchmarks quantity | ||
3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a magic number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it's netflag quantity, but comment would be helpfull here
cmd/cli/commands/deals.go
Outdated
crNewDurationFlag string | ||
crNewPriceFlag string | ||
) | ||
|
||
func init() { | ||
dealListCmd.PersistentFlags().Uint64Var(&dealsSearchCount, "limit", 10, "Deals count to show") | ||
dealCloseCmd.PersistentFlags().BoolVar(&addToBlacklist, "blacklist", false, "Add counterparty to blacklist") | ||
dealCloseCmd.PersistentFlags().StringVar(&blacklistTypeStr, "blacklist", "none", "Whom to add to blacklist (worker, master or neither)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Properly describe valid flag values here: neither
should be replaced with none
as they parsed below.
@@ -143,8 +143,8 @@ var dealOpenCmd = &cobra.Command{ | |||
} | |||
|
|||
var dealQuickBuyCmd = &cobra.Command{ | |||
Use: "quick-buy <ask_id>", | |||
Short: "Copy given ASK order with BID type and open a deal with this orders", | |||
Use: "quick-buy <ask_id> [duration]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to implement this as the cobra flag with Duration type: less parsing, less checking for an args count, less description into a command (will be moved to the flag's help message).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to our clear api we need to distinguish between 0 duration and it's absence. It would be quite dirty using the flag. Besides I find sonmcli quickbuy 42 1h
more friendly than sonmcli quickbuy --duration=1h 42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But if the user agrees with proposed ASK duration it not necessary to explicitly set deal duration, we can handle it on the Node, like the change request API do.
proto/node.proto
Outdated
} | ||
|
||
message QuickBuyRequest { | ||
BigInt askId = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
askId -> askID
if (network === 'private') { | ||
SNMD.at('0x26524b1234e361eb4e3ddf7600d41271620fcb0a') | ||
.then(function (token) { | ||
token.AddMarket(Market.address, { gasPrice: 0 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks weird, a file is called set_allowance_to_market
but this call doesn't look like a setting of allowance.
@@ -1,7 +1,11 @@ | |||
var ProfileRegistry = artifacts.require('./ProfileRegistry.sol'); | |||
|
|||
module.exports = function (deployer, network) { | |||
if (network !== 'rinkeby') { // no reason to deploy to rinkeby | |||
if (network === 'private') { // no reason to deploy to rinkeby |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is misleading
395ff52
to
f409b84
Compare
8ca0328
to
ae563da
Compare
Redeploy
Market
andProfileRegistry
contracts