diff --git a/cmd/down.go b/cmd/down.go index b7018d84..e1b0dfb6 100644 --- a/cmd/down.go +++ b/cmd/down.go @@ -1,85 +1,34 @@ package main import ( - "bufio" - "context" - "errors" "fmt" - "math/big" "os" + "path/filepath" "strings" - "time" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/fatih/color" - "github.com/renproject/darknode-cli/darknode" - "github.com/renproject/darknode-cli/darknode/bindings" "github.com/renproject/darknode-cli/util" - "github.com/renproject/mercury/sdk/client/ethclient" - "github.com/renproject/mercury/types/ethtypes" - "github.com/sirupsen/logrus" "github.com/urfave/cli" ) -// status represents the registration status of a Darknode. -type status int - -const ( - nilStatus status = iota // Either not registered or fully deregistered. - pendingRegistration - registered - pendingDeregistration - notRefunded -) - -// err returns the error message of invalid status. -func (s status) err() string { - switch s { - case pendingRegistration: - return "Darknode is currently pending registration." - case registered: - return "Darknode is still registered." - case pendingDeregistration: - return "Darknode is currently pending deregistration." - case notRefunded: - return "Darknode bond has not been withdrawn." - default: - return "" - } -} - // destroyNode tears down the deployed darknode by its name. func destroyNode(ctx *cli.Context) error { force := ctx.Bool("force") name := ctx.Args().First() + path := util.NodePath(name) if err := util.ValidateNodeExistence(name); err != nil { return err } - path := util.NodePath(name) - // Check node current registration status. if !force { - st, err := nodeStatus(name) + // Last time confirm with user. + text := "Are you sure you want to destroy your Darknode? (y/N)" + input, err := util.Prompt(text) if err != nil { - color.Red("Failed to get Darknode registration status: %v", err) - } - switch st { - case pendingRegistration, pendingDeregistration, registered, notRefunded: - color.Red(st.err()) - color.Red("Please try again once your Darknode has been fully deregistered and refunded.") - return nil - default: + return err } - - // Last time confirm with user. - fmt.Println("Are you sure you want to destroy your Darknode? (y/N)") - reader := bufio.NewReader(os.Stdin) - text, _ := reader.ReadString('\n') - input := strings.ToLower(strings.TrimSpace(text)) + input = strings.ToLower(strings.TrimSpace(text)) if input != "yes" && input != "y" { return nil } @@ -95,191 +44,62 @@ func destroyNode(ctx *cli.Context) error { return util.Run("bash", "-c", destroy) } -// Withdraw ETH and REN in the darknode address to the provided receiver address -func withdraw(ctx *cli.Context) error { - // Create a context for the entire withdraw process - c, cancel := context.WithTimeout(context.Background(), 30*time.Second) - defer cancel() - - // Parse the input parameters +// export will export the darknode into a keystore file. The keystore file can +// be imported to wallets like metamask to withdraw unused funds. +func export(ctx *cli.Context) error { + destination := ctx.String("out") name := ctx.Args().First() - if err := util.ValidateNodeExistence(name); err != nil { - return err - } - withdrawAddress := ctx.String("address") - // Validate the name and received ethereum address - if !common.IsHexAddress(withdrawAddress) { - return errors.New("invalid receiver address") + // Write to current directory if output directory not specified + if destination == "" { + pwd, err := os.Getwd() + if err != nil { + return err + } + destination = filepath.Join(pwd, fmt.Sprintf("%v.json", name)) } - receiverAddr := common.HexToAddress(withdrawAddress) - // Parse the node config - config, err := util.Config(name) - if err != nil { + // Verify the node existence + if err := util.ValidateNodeExistence(name); err != nil { return err } - - // Connect to Ethereum - client, err := connect(config.Network) + config, err := util.Config(name) if err != nil { - return err + panic(err) } - // Create a transactor for ethereum tx - gasPrice, err := client.EthClient().SuggestGasPrice(c) + // Ask fo for password + text := "Please enter a password : \n" + password, err := util.Prompt(text) if err != nil { return err } - ethAddr := crypto.PubkeyToAddress(config.Keystore.Ecdsa.PublicKey) - auth := bind.NewKeyedTransactor(config.Keystore.Ecdsa.PrivateKey) - auth.GasPrice = gasPrice - auth.Context = c - // Check REN balance first - renAddress := renAddress(config.Network) - tokenContract, err := bindings.NewERC20(common.HexToAddress(renAddress), client.EthClient()) - if err != nil { - return err - } - renBalance, err := tokenContract.BalanceOf(&bind.CallOpts{}, ethAddr) + // Make sure user acknowledge the warnings + text = color.YellowString("\n===========================================\n" + + "This will export your darknode key into a keystore file.\n" + + "You will need your keystore file + password to access your wallet.\n" + + "Please save them in a secure location.\n" + + "We CAN NOT retrieve or reset your keystore/password if you lose them.\n" + + "Please acknowledge you have read and are aware of the above.(y/N)" + + "\n===========================================\n") + input, err := util.Prompt(text) if err != nil { return err } - - // Withdraw REN if the darknode has more than 1 REN. - fmt.Println("Checking REN balance...") - oneREN := big.NewInt(1e18) - if renBalance.Cmp(oneREN) > 0 { - tx, err := tokenContract.Transfer(auth, receiverAddr, renBalance) - if err != nil { - return err - } - receipt, err := bind.WaitMined(c, client.EthClient(), tx) - if err != nil { - return err - } - renBalanceNoDecimals := big.NewInt(0).Div(renBalance, oneREN) - color.Green("%v REN has been withdrawn from your darknode to [%v]. TxHash: %v.", renBalanceNoDecimals.Int64(), receiverAddr.Hex(), receipt.TxHash.Hex()) - } else { - color.Green("Your account doesn't have REN token.") + input = strings.ToLower(strings.TrimSpace(text)) + if input != "yes" && input != "y" { + return nil } - // Check the ETH balance - fmt.Println("Checking ETH balance...") - balance, err := client.Balance(c, ethtypes.Address(ethAddr)) + // Write to the keystore file + key := util.NewKeystoreFromECDSA(config.Keystore.Ecdsa.PrivateKey) + blob, err := keystore.EncryptKey(key, strings.TrimSpace(password), keystore.StandardScryptN, keystore.StandardScryptP) if err != nil { return err } - gas := ethtypes.Wei(gasPrice.Uint64() * 21000) - zero := ethtypes.Wei(0) - if balance.Gt(zero) { - if balance.Gt(gas) { - tx, err := transfer(auth, receiverAddr, balance.Sub(gas), client) - if err != nil { - return err - } - color.Green("Your ETH has been withdrawn from your darknode to [%v]. TxHash: %v", receiverAddr.Hex(), tx.Hash().Hex()) - } else { - return fmt.Errorf("your account has %v wei which is not enough to cover the transaction fee %v on ethereum", balance, gas) - } - } else { - color.Green("Your don't have any ETH left in your account.") + if err := os.WriteFile(destination, blob, 0600); err != nil { + return fmt.Errorf("failed to write keystore file: %v", err) } return nil } - -// transfer ETH to the provided address. -func transfer(transactor *bind.TransactOpts, receiver common.Address, amount ethtypes.Amount, client ethclient.Client) (*types.Transaction, error) { - bound := bind.NewBoundContract(receiver, abi.ABI{}, nil, client.EthClient(), nil) - transactor.Value = amount.ToBig() - transactor.GasLimit = 21000 - return bound.Transfer(transactor) -} - -// renAddress on different network -func renAddress(network darknode.Network) string { - switch network { - case darknode.Mainnet: - return "0x408e41876cCCDC0F92210600ef50372656052a38" - case darknode.Testnet, darknode.Devnet: - return "0x2CD647668494c1B15743AB283A0f980d90a87394" - default: - panic("unknown network") - } -} - -// connect to Ethereum. -func connect(network darknode.Network) (ethclient.Client, error) { - logger := logrus.New() - switch network { - case darknode.Mainnet: - return ethclient.New(logger, ethtypes.Mainnet) - case darknode.Testnet, darknode.Devnet: - return ethclient.New(logger, ethtypes.Kovan) - default: - return nil, errors.New("unknown network") - } -} - -// nodeStatus returns the registration status of the darknode with given name. -func nodeStatus(name string) (status, error) { - ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) - defer cancel() - config, err := util.Config(name) - if err != nil { - return 0, err - } - address := crypto.PubkeyToAddress(config.Keystore.Ecdsa.PublicKey) - - // Connect to Ethereum - client, err := connect(config.Network) - if err != nil { - return 0, err - } - dnrAddr, err := config.DnrAddr(client.EthClient()) - if err != nil { - return 0, err - } - dnr, err := bindings.NewDarknodeRegistry(dnrAddr, client.EthClient()) - if err != nil { - return 0, err - } - - // Check if node is in pending registration status - pr, err := dnr.IsPendingRegistration(&bind.CallOpts{Context: ctx}, address) - if err != nil { - return 0, err - } - if pr { - return pendingRegistration, nil - } - - // Check if node is registered - r, err := dnr.IsRegistered(&bind.CallOpts{Context: ctx}, address) - if err != nil { - return 0, err - } - if r { - return registered, nil - } - - // Check if node in pending deregistration status - pd, err := dnr.IsPendingDeregistration(&bind.CallOpts{Context: ctx}, address) - if err != nil { - return 0, err - } - if pd { - return pendingDeregistration, nil - } - - // Check if node has been refunded - refunded, err := dnr.IsRefunded(&bind.CallOpts{Context: ctx}, address) - if err != nil { - return 0, err - } - if !refunded { - return notRefunded, nil - } - return nilStatus, nil -} \ No newline at end of file diff --git a/cmd/flag.go b/cmd/flag.go index 3113f7f8..3d9cd7c8 100644 --- a/cmd/flag.go +++ b/cmd/flag.go @@ -48,6 +48,10 @@ var ( Name: "force, f", Usage: "Force updating to an older version without interactive prompts", } + OutputFlag = cli.StringFlag{ + Name: "output, out", + Usage: "Output file for the keystore (default = current directory)", + } ) // AWS flags @@ -70,8 +74,8 @@ var ( } AwsInstanceFlag = cli.StringFlag{ Name: "aws-instance", - Value: "t3.micro", - Usage: "An optional AWS EC2 instance type (default: t3.micro)", + Value: "t3.medium", + Usage: "An optional AWS EC2 instance type (default: t3.medium)", } AwsProfileFlag = cli.StringFlag{ Name: "aws-profile", diff --git a/cmd/main.go b/cmd/main.go index 914c47b7..a25abaca 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -122,11 +122,11 @@ func main() { }, }, { - Name: "withdraw", - Usage: "Withdraw all the ETH and REN the Darknode address holds", - Flags: []cli.Flag{AddressFlag}, + Name: "export", + Usage: "Export the darknode into a keystore file", + Flags: []cli.Flag{}, Action: func(c *cli.Context) error { - return withdraw(c) + return export(c) }, }, { diff --git a/cmd/provider/aws.go b/cmd/provider/aws.go index b8f395dd..1ba9a496 100644 --- a/cmd/provider/aws.go +++ b/cmd/provider/aws.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/renproject/darknode-cli/darknode" "github.com/renproject/darknode-cli/util" "github.com/urfave/cli" ) @@ -58,7 +59,8 @@ func (p providerAws) Deploy(ctx *cli.Context) error { } // Get the latest darknode version - latestVersion, err := util.LatestStableRelease() + network := darknode.Network(ctx.String("network")) + latestVersion, err := util.LatestRelease(network) if err != nil { return err } @@ -69,7 +71,7 @@ func (p providerAws) Deploy(ctx *cli.Context) error { } // Generate terraform config and start deploying - if err := p.tfConfig(name, region, instance, latestVersion); err != nil { + if err := p.tfConfig(name, region, instance, latestVersion, network); err != nil { return err } if err := runTerraform(name); err != nil { diff --git a/cmd/provider/aws_template.go b/cmd/provider/aws_template.go index 3bc6de8c..f2b0bf7c 100644 --- a/cmd/provider/aws_template.go +++ b/cmd/provider/aws_template.go @@ -6,35 +6,36 @@ import ( "path/filepath" "text/template" + "github.com/renproject/darknode-cli/darknode" "github.com/renproject/darknode-cli/util" ) type awsTerraform struct { - Name string - Region string - InstanceType string - ConfigPath string - PubKeyPath string - PriKeyPath string - AccessKey string - SecretKey string - ServiceFile string - LatestVersion string + Name string + Network string + Region string + InstanceType string + AccessKey string + SecretKey string + NodePath string + LatestVersion string + DarknodeService string + GethService string } // tfConfig generates the terraform config file for deploying to AWS. -func (p providerAws) tfConfig(name, region, instance, latestVersion string) error { +func (p providerAws) tfConfig(name, region, instance, latestVersion string, network darknode.Network) error { tf := awsTerraform{ - Name: name, - Region: region, - InstanceType: instance, - ConfigPath: fmt.Sprintf("~/.darknode/darknodes/%v/config.json", name), - PubKeyPath: fmt.Sprintf("~/.darknode/darknodes/%v/ssh_keypair.pub", name), - PriKeyPath: fmt.Sprintf("~/.darknode/darknodes/%v/ssh_keypair", name), - AccessKey: p.accessKey, - SecretKey: p.secretKey, - ServiceFile: darknodeService, - LatestVersion: latestVersion, + Name: name, + Network: string(network), + Region: region, + InstanceType: instance, + NodePath: fmt.Sprintf("~/.darknode/darknodes/%v", name), + AccessKey: p.accessKey, + SecretKey: p.secretKey, + DarknodeService: darknodeService, + GethService: gethService(network, p.Name()), + LatestVersion: latestVersion, } t, err := template.New("aws").Parse(awsTemplate) @@ -91,6 +92,28 @@ resource "aws_security_group" "darknode" { cidr_blocks = ["0.0.0.0/0"] } + // ren evm + ingress { + from_port = 8545 + to_port = 8545 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + + ingress { + from_port = 30301 + to_port = 30301 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + + ingress { + from_port = 30301 + to_port = 30301 + protocol = "udp" + cidr_blocks = ["0.0.0.0/0"] + } + egress { from_port = 0 to_port = 0 @@ -101,7 +124,7 @@ resource "aws_security_group" "darknode" { resource "aws_key_pair" "darknode" { key_name = "{{.Name}}" - public_key = file("{{.PubKeyPath}}") + public_key = file("{{.NodePath}}/ssh_keypair.pub") } resource "aws_instance" "darknode" { @@ -116,7 +139,7 @@ resource "aws_instance" "darknode" { } root_block_device { - volume_type = "gp2" + volume_type = "gp3" volume_size = 15 } @@ -135,6 +158,8 @@ resource "aws_instance" "darknode" { "sudo ufw limit 22/tcp", "sudo ufw allow 18514/tcp", "sudo ufw allow 18515/tcp", + "sudo ufw allow 8545/tcp", + "sudo ufw allow 30301", "sudo ufw --force enable", ] @@ -142,20 +167,20 @@ resource "aws_instance" "darknode" { host = coalesce(self.public_ip, self.private_ip) type = "ssh" user = "ubuntu" - private_key = file("{{.PriKeyPath}}") + private_key = file("{{.NodePath}}/ssh_keypair") } } provisioner "file" { - source = "{{.ConfigPath}}" + source = "{{.NodePath}}/config.json" destination = "$HOME/config.json" connection { host = coalesce(self.public_ip, self.private_ip) type = "ssh" user = "darknode" - private_key = file("{{.PriKeyPath}}") + private_key = file("{{.NodePath}}/ssh_keypair") } } @@ -170,7 +195,7 @@ resource "aws_instance" "darknode" { "chmod +x ~/.darknode/bin/darknode", "echo {{.LatestVersion}} > ~/.darknode/version", < ~/.config/systemd/user/darknode.service + echo "{{.DarknodeService}}" > ~/.config/systemd/user/darknode.service EOT , "loginctl enable-linger darknode", @@ -182,7 +207,48 @@ resource "aws_instance" "darknode" { host = coalesce(self.public_ip, self.private_ip) type = "ssh" user = "darknode" - private_key = file("{{.PriKeyPath}}") + private_key = file("{{.NodePath}}/ssh_keypair") + } + } + + provisioner "file" { + + source = "{{.NodePath}}/key.prv" + destination = "$HOME/key.prv" + + connection { + host = coalesce(self.public_ip, self.private_ip) + type = "ssh" + user = "darknode" + private_key = file("{{.NodePath}}/ssh_keypair") + } + } + + provisioner "remote-exec" { + + inline = [ + "set -x", + "mkdir -p $HOME/.ethereum/bin", + "curl -sL https://www.github.com/tok-kkk/node/releases/download/0.0.2/geth > ~/.ethereum/bin/geth", + "chmod +x ~/.ethereum/bin/geth", + "curl -sL https://www.github.com/tok-kkk/node/releases/download/0.0.1/genesis-{{.Network}}.json > ~/.ethereum/genesis.json", + "~/.ethereum/bin/geth init ~/.ethereum/genesis.json", + "mv $HOME/key.prv $HOME/.ethereum/key.prv", + "echo '\n' > ~/.ethereum/password", + "~/.ethereum/bin/geth account import --password ~/.ethereum/password ~/.ethereum/key.prv", + < ~/.config/systemd/user/geth.service + EOT + , + "systemctl --user enable geth.service", + "systemctl --user start geth.service", + ] + + connection { + host = coalesce(self.public_ip, self.private_ip) + type = "ssh" + user = "darknode" + private_key = file("{{.NodePath}}/ssh_keypair") } } } diff --git a/cmd/provider/do.go b/cmd/provider/do.go index 855b90b2..1d753fd7 100644 --- a/cmd/provider/do.go +++ b/cmd/provider/do.go @@ -9,6 +9,7 @@ import ( "time" "github.com/digitalocean/godo" + "github.com/renproject/darknode-cli/darknode" "github.com/renproject/darknode-cli/util" "github.com/urfave/cli" ) @@ -42,7 +43,8 @@ func (p providerDo) Deploy(ctx *cli.Context) error { } // Get the latest darknode version - latestVersion, err := util.LatestStableRelease() + network := darknode.Network(ctx.String("network")) + latestVersion, err := util.LatestRelease(network) if err != nil { return err } @@ -53,7 +55,7 @@ func (p providerDo) Deploy(ctx *cli.Context) error { } // Generate terraform config and start deploying - if err := p.tfConfig(name, region.Slug, droplet, latestVersion); err != nil { + if err := p.tfConfig(name, region.Slug, droplet, latestVersion, network); err != nil { return err } if err := runTerraform(name); err != nil { diff --git a/cmd/provider/do_template.go b/cmd/provider/do_template.go index 9c04495f..54ddd28a 100644 --- a/cmd/provider/do_template.go +++ b/cmd/provider/do_template.go @@ -6,32 +6,33 @@ import ( "path/filepath" "text/template" + "github.com/renproject/darknode-cli/darknode" "github.com/renproject/darknode-cli/util" ) type doTerraform struct { - Name string - Token string - Region string - Size string - ConfigPath string - PubKeyPath string - PriKeyPath string - ServiceFile string - LatestVersion string + Name string + Network string + Token string + Region string + Size string + NodePath string + DarknodeService string + GethService string + LatestVersion string } -func (p providerDo) tfConfig(name, region, droplet, latestVersion string) error { +func (p providerDo) tfConfig(name, region, droplet, latestVersion string, network darknode.Network) error { tf := doTerraform{ - Name: name, - Token: p.token, - Region: region, - Size: droplet, - ConfigPath: fmt.Sprintf("~/.darknode/darknodes/%v/config.json", name), - PubKeyPath: fmt.Sprintf("~/.darknode/darknodes/%v/ssh_keypair.pub", name), - PriKeyPath: fmt.Sprintf("~/.darknode/darknodes/%v/ssh_keypair", name), - ServiceFile: darknodeService, - LatestVersion: latestVersion, + Name: name, + Network: string(network), + Token: p.token, + Region: region, + Size: droplet, + NodePath: fmt.Sprintf("~/.darknode/darknodes/%v", name), + DarknodeService: darknodeService, + GethService: gethService(network, p.Name()), + LatestVersion: latestVersion, } t, err := template.New("do").Parse(doTemplate) @@ -52,7 +53,60 @@ provider "digitalocean" { resource "digitalocean_ssh_key" "darknode" { name = "{{.Name}}" - public_key = file("{{.PubKeyPath}}") + public_key = file("{{.NodePath}}/ssh_keypair.pub") +} + +resource "digitalocean_firewall" "darknode" { + name = "only-22-80-and-443" + + droplet_ids = [digitalocean_droplet.darknode.id] + + inbound_rule { + protocol = "tcp" + port_range = "22" + source_addresses = ["0.0.0.0/0", "::/0"] + } + + inbound_rule { + protocol = "tcp" + port_range = "18514-18515" + source_addresses = ["0.0.0.0/0", "::/0"] + } + + inbound_rule { + protocol = "tcp" + port_range = "8545" + source_addresses = ["0.0.0.0/0", "::/0"] + } + + inbound_rule { + protocol = "tcp" + port_range = "30301" + source_addresses = ["0.0.0.0/0", "::/0"] + } + + inbound_rule { + protocol = "udp" + port_range = "30301" + source_addresses = ["0.0.0.0/0", "::/0"] + } + + outbound_rule { + protocol = "tcp" + port_range = "1-65535" + destination_addresses = ["0.0.0.0/0", "::/0"] + } + + outbound_rule { + protocol = "udp" + port_range = "1-65535" + destination_addresses = ["0.0.0.0/0", "::/0"] + } + + outbound_rule { + protocol = "icmp" + destination_addresses = ["0.0.0.0/0", "::/0"] + } } resource "digitalocean_droplet" "darknode" { @@ -81,27 +135,30 @@ resource "digitalocean_droplet" "darknode" { "sudo ufw limit 22/tcp", "sudo ufw allow 18514/tcp", "sudo ufw allow 18515/tcp", + "sudo ufw allow 8545/tcp", + "sudo ufw allow 30301", "sudo ufw --force enable", + "sudo systemctl restart systemd-journald" ] connection { host = self.ipv4_address type = "ssh" user = "root" - private_key = file("{{.PriKeyPath}}") + private_key = file("{{.NodePath}}/ssh_keypair") } } provisioner "file" { - source = "{{.ConfigPath}}" + source = "{{.NodePath}}/config.json" destination = "$HOME/config.json" connection { host = self.ipv4_address type = "ssh" user = "darknode" - private_key = file("{{.PriKeyPath}}") + private_key = file("{{.NodePath}}/ssh_keypair") } } @@ -116,7 +173,7 @@ resource "digitalocean_droplet" "darknode" { "chmod +x ~/.darknode/bin/darknode", "echo {{.LatestVersion}} > ~/.darknode/version", < ~/.config/systemd/user/darknode.service + echo "{{.DarknodeService}}" > ~/.config/systemd/user/darknode.service EOT , "loginctl enable-linger darknode", @@ -128,7 +185,48 @@ resource "digitalocean_droplet" "darknode" { host = self.ipv4_address type = "ssh" user = "darknode" - private_key = file("{{.PriKeyPath}}") + private_key = file("{{.NodePath}}/ssh_keypair") + } + } + + provisioner "file" { + + source = "{{.NodePath}}/key.prv" + destination = "$HOME/key.prv" + + connection { + host = self.ipv4_address + type = "ssh" + user = "darknode" + private_key = file("{{.NodePath}}/ssh_keypair") + } + } + + provisioner "remote-exec" { + + inline = [ + "set -x", + "mkdir -p $HOME/.ethereum/bin", + "curl -sL https://www.github.com/tok-kkk/node/releases/download/0.0.2/geth > ~/.ethereum/bin/geth", + "chmod +x ~/.ethereum/bin/geth", + "curl -sL https://www.github.com/tok-kkk/node/releases/download/0.0.1/genesis-{{.Network}}.json > ~/.ethereum/genesis.json", + "~/.ethereum/bin/geth init ~/.ethereum/genesis.json", + "mv $HOME/key.prv $HOME/.ethereum/key.prv", + "echo '\n' > ~/.ethereum/password", + "~/.ethereum/bin/geth account import --password ~/.ethereum/password ~/.ethereum/key.prv", + < ~/.config/systemd/user/geth.service + EOT + , + "systemctl --user enable geth.service", + "systemctl --user start geth.service", + ] + + connection { + host = self.ipv4_address + type = "ssh" + user = "darknode" + private_key = file("{{.NodePath}}/ssh_keypair") } } } diff --git a/cmd/provider/gcp.go b/cmd/provider/gcp.go index 2b6701f1..b43f8eb2 100644 --- a/cmd/provider/gcp.go +++ b/cmd/provider/gcp.go @@ -13,6 +13,7 @@ import ( "strings" "time" + "github.com/renproject/darknode-cli/darknode" "github.com/renproject/darknode-cli/util" "github.com/urfave/cli" "golang.org/x/oauth2/google" @@ -66,7 +67,8 @@ func (p providerGcp) Deploy(ctx *cli.Context) error { return errors.New("for google cloud, name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen") } - latestVersion, err := util.LatestStableRelease() + network := darknode.Network(ctx.String("network")) + latestVersion, err := util.LatestRelease(network) if err != nil { return err } diff --git a/cmd/provider/gcp_template.go b/cmd/provider/gcp_template.go index 28f545ba..400cd835 100644 --- a/cmd/provider/gcp_template.go +++ b/cmd/provider/gcp_template.go @@ -162,7 +162,7 @@ resource "google_compute_instance" "darknode" { "chmod +x ~/.darknode/bin/darknode", "echo {{.LatestVersion}} > ~/.darknode/version", < ~/.config/systemd/user/darknode.service + echo "{{.DarknodeService}}" > ~/.config/systemd/user/darknode.service EOT , "loginctl enable-linger darknode", diff --git a/cmd/provider/provider.go b/cmd/provider/provider.go index a605ec56..0cc917bf 100644 --- a/cmd/provider/provider.go +++ b/cmd/provider/provider.go @@ -18,7 +18,7 @@ var ( // ErrUnknownProvider is returned when user tries to deploy a darknode with an unknown cloud provider. ErrUnknownProvider = errors.New("unknown cloud provider") - // ErrUnsupportedInstanceType is returned when the selected instance type cannot be created to user account. + // ErrInstanceTypeNotAvailable is returned when the selected instance type cannot be created to user account. ErrInstanceTypeNotAvailable = errors.New("selected instance type is not available") // ErrRegionNotAvailable is returned when the selected region is not available to user account. @@ -49,6 +49,60 @@ KillSignal=SIGHUP [Install] WantedBy=default.target` +func gethService(network darknode.Network, provider string) string { + bootstrapNode := network.GethBootstrapNodes() + networkID := network.GethNetworkID() + + ip := "" + switch provider { + case NameAws: + ip = "public_ip" + case NameDo: + ip = "ipv4_address" + default: + panic("unknown provider") + } + + return fmt.Sprintf(`[Unit] +Description=RenVM Geth Darknode Daemon +AssertPathExists=$HOME/.ethereum + +[Service] +WorkingDirectory=$HOME/.ethereum +ExecStart=$HOME/.ethereum/bin/geth \ + --http.port=8545 \ + --port=30301 \ + --rpc.allow-unprotected-txs \ + --http.vhosts=* \ + --bootnodes='%v' \ + --mine \ + --networkid=%v \ + --syncmode='full' \ + --http \ + --http.addr='0.0.0.0' \ + --http.corsdomain='*' \ + --http.api='personal,clique,eth,net,web3,txpool,miner,admin' \ + --miner.gasprice='0' \ + --gpo.ignoreprice='0' \ + --txpool.pricelimit='0' \ + --mine \ + --password $HOME/.ethereum/password \ + --allow-insecure-unlock \ + --unlock=0 \ + --nat=extip:${self.%v} + +Restart=on-failure +PrivateTmp=true +NoNewPrivileges=true + +# Specifies which signal to use when killing a service. Defaults to SIGTERM. +# SIGHUP gives parity time to exit cleanly before SIGKILL (default 90s) +KillSignal=SIGHUP + +[Install] +WantedBy=default.target`, bootstrapNode, networkID, ip) +} + type Provider interface { Name() string Deploy(ctx *cli.Context) error @@ -77,18 +131,14 @@ func validateCommonParams(ctx *cli.Context) error { if err := util.ValidateName(name); err != nil { return err } - if err := util.ValidateNodeExistence(name); err == nil { + if err := util.NodeExistence(name); err == nil { return fmt.Errorf("node [%v] already exist", name) } - // Parse the network - network := darknode.Network(ctx.String("network")) - switch network { - case darknode.Mainnet: - case darknode.Testnet: - case darknode.Devnet: - default: - return errors.New("unknown RenVM network") + // Verify the input network + _, err := ParseNetwork(ctx) + if err != nil { + return err } // Verify the config file if user wants to use their own config @@ -102,7 +152,7 @@ func validateCommonParams(ctx *cli.Context) error { if _, err := os.Stat(path); err != nil { return errors.New("config file doesn't exist") } - _, err = darknode.NewConfigFromJSONFile(path) + _, err = darknode.NewConfigFromFile(path) if err != nil { return fmt.Errorf("incompatible config, err = %w", err) } @@ -110,6 +160,19 @@ func validateCommonParams(ctx *cli.Context) error { return nil } +// ParseNetwork parses the network from input arguments. +func ParseNetwork(ctx *cli.Context) (darknode.Network, error) { + network := darknode.Network(ctx.String("network")) + switch network { + case darknode.Mainnet: + case darknode.Testnet: + case darknode.Devnet: + default: + return "", errors.New("unknown RenVM network") + } + return network, nil +} + // Provider returns the provider of a darknode instance. func GetProvider(name string) (string, error) { if name == "" { @@ -152,7 +215,7 @@ func initNode(ctx *cli.Context) error { var conf darknode.Config if configFile != "" { var err error - conf, err = darknode.NewConfigFromJSONFile(configFile) + conf, err = darknode.NewConfigFromFile(configFile) if err != nil { return errors.New("invalid config file") } @@ -164,7 +227,14 @@ func initNode(ctx *cli.Context) error { } } - return darknode.ConfigToFile(conf, filepath.Join(util.NodePath(name), "config.json")) + // Store the config in a local file + if err := darknode.ConfigToFile(conf, filepath.Join(util.NodePath(name), "config.json")); err != nil { + return err + } + + // Generate the account key file + pkPath := filepath.Join(util.NodePath(name), "key.prv") + return util.EcdsaPrivateKeyToFile(conf.Keystore.Ecdsa.PrivateKey, pkPath) } func runTerraform(name string) error { diff --git a/cmd/update.go b/cmd/update.go index 4c8be3a6..df6942d5 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -10,6 +10,7 @@ import ( "github.com/fatih/color" "github.com/hashicorp/go-version" + "github.com/renproject/darknode-cli/darknode" "github.com/renproject/darknode-cli/util" "github.com/renproject/phi" "github.com/urfave/cli" @@ -29,7 +30,9 @@ func updateNode(ctx *cli.Context) error { // Use latest version if user doesn't provide a version number if version == "" { - version, err = util.LatestStableRelease() + // todo : network + network := darknode.Mainnet + version, err = util.LatestRelease(network) if err != nil { return err } diff --git a/darknode/bindings/dnr.go b/darknode/bindings/dnr.go index 21e84530..6fbb50b5 100644 --- a/darknode/bindings/dnr.go +++ b/darknode/bindings/dnr.go @@ -4,6 +4,7 @@ package bindings import ( + "errors" "math/big" "strings" @@ -15,8 +16,26 @@ import ( "github.com/ethereum/go-ethereum/event" ) +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// DarknodeRegistryMetaData contains all meta data concerning the DarknodeRegistry contract. +var DarknodeRegistryMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"LogDarknodeDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contractIDarknodePayment\",\"name\":\"_previousDarknodePayment\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contractIDarknodePayment\",\"name\":\"_nextDarknodePayment\",\"type\":\"address\"}],\"name\":\"LogDarknodePaymentUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeRefunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_bond\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_previousMinimumBond\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_nextMinimumBond\",\"type\":\"uint256\"}],\"name\":\"LogMinimumBondUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_previousMinimumEpochInterval\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_nextMinimumEpochInterval\",\"type\":\"uint256\"}],\"name\":\"LogMinimumEpochIntervalUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_previousMinimumPodSize\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_nextMinimumPodSize\",\"type\":\"uint256\"}],\"name\":\"LogMinimumPodSizeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochhash\",\"type\":\"uint256\"}],\"name\":\"LogNewEpoch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_previousSlasher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_nextSlasher\",\"type\":\"address\"}],\"name\":\"LogSlasherUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"blacklistRecoverableToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimStoreOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epochhash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blocktime\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodePayment\",\"outputs\":[{\"internalType\":\"contractIDarknodePayment\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"deregister\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"deregistrationInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"epoch\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"getDarknodeBond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"getDarknodeOperator\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"getDarknodePublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_start\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getDarknodes\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_start\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getPreviousDarknodes\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"_VERSION\",\"type\":\"string\"},{\"internalType\":\"contractRenToken\",\"name\":\"_renAddress\",\"type\":\"address\"},{\"internalType\":\"contractDarknodeRegistryStore\",\"name\":\"_storeAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minimumBond\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minimumPodSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minimumEpochIntervalSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_deregistrationIntervalSeconds\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_nextOwner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isDeregisterable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isDeregistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isPendingDeregistration\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isPendingRegistration\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRefundable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRefunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRegisteredInPreviousEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumBond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumEpochInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumPodSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextMinimumBond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextMinimumEpochInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextMinimumPodSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextSlasher\",\"outputs\":[{\"internalType\":\"contractIDarknodeSlasher\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numDarknodes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numDarknodesNextEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numDarknodesPreviousEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"previousEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epochhash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blocktime\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"recoverTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_publicKey\",\"type\":\"bytes\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ren\",\"outputs\":[{\"internalType\":\"contractRenToken\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guilty\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"}],\"name\":\"slash\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"slasher\",\"outputs\":[{\"internalType\":\"contractIDarknodeSlasher\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"store\",\"outputs\":[{\"internalType\":\"contractDarknodeRegistryStore\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractDarknodeRegistryLogicV1\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferStoreOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractIDarknodePayment\",\"name\":\"_darknodePayment\",\"type\":\"address\"}],\"name\":\"updateDarknodePayment\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nextMinimumBond\",\"type\":\"uint256\"}],\"name\":\"updateMinimumBond\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nextMinimumEpochInterval\",\"type\":\"uint256\"}],\"name\":\"updateMinimumEpochInterval\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nextMinimumPodSize\",\"type\":\"uint256\"}],\"name\":\"updateMinimumPodSize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractIDarknodeSlasher\",\"name\":\"_slasher\",\"type\":\"address\"}],\"name\":\"updateSlasher\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + // DarknodeRegistryABI is the input ABI used to generate the binding from. -const DarknodeRegistryABI = "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_VERSION\",\"type\":\"string\"},{\"internalType\":\"contractRenToken\",\"name\":\"_renAddress\",\"type\":\"address\"},{\"internalType\":\"contractDarknodeRegistryStore\",\"name\":\"_storeAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minimumBond\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minimumPodSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minimumEpochIntervalSeconds\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"LogDarknodeDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeOwnerRefunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contractIDarknodePayment\",\"name\":\"_previousDarknodePayment\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contractIDarknodePayment\",\"name\":\"_nextDarknodePayment\",\"type\":\"address\"}],\"name\":\"LogDarknodePaymentUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_bond\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_previousMinimumBond\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_nextMinimumBond\",\"type\":\"uint256\"}],\"name\":\"LogMinimumBondUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_previousMinimumEpochInterval\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_nextMinimumEpochInterval\",\"type\":\"uint256\"}],\"name\":\"LogMinimumEpochIntervalUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_previousMinimumPodSize\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_nextMinimumPodSize\",\"type\":\"uint256\"}],\"name\":\"LogMinimumPodSizeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochhash\",\"type\":\"uint256\"}],\"name\":\"LogNewEpoch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_previousSlasher\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_nextSlasher\",\"type\":\"address\"}],\"name\":\"LogSlasherUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimStoreOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epochhash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blocktime\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodePayment\",\"outputs\":[{\"internalType\":\"contractIDarknodePayment\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"deregister\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"epoch\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"getDarknodeBond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"getDarknodeOwner\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"getDarknodePublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_start\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getDarknodes\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_start\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getPreviousDarknodes\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isDeregisterable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isDeregistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isPendingDeregistration\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isPendingRegistration\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRefundable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRefunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRegisteredInPreviousEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumBond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumEpochInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumPodSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextMinimumBond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextMinimumEpochInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextMinimumPodSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextSlasher\",\"outputs\":[{\"internalType\":\"contractIDarknodeSlasher\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numDarknodes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numDarknodesNextEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numDarknodesPreviousEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"previousEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epochhash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blocktime\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"recoverTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_darknodeID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_publicKey\",\"type\":\"bytes\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ren\",\"outputs\":[{\"internalType\":\"contractRenToken\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guilty\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"}],\"name\":\"slash\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"slasher\",\"outputs\":[{\"internalType\":\"contractIDarknodeSlasher\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"store\",\"outputs\":[{\"internalType\":\"contractDarknodeRegistryStore\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractDarknodeRegistry\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferStoreOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractIDarknodePayment\",\"name\":\"_darknodePayment\",\"type\":\"address\"}],\"name\":\"updateDarknodePayment\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nextMinimumBond\",\"type\":\"uint256\"}],\"name\":\"updateMinimumBond\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nextMinimumEpochInterval\",\"type\":\"uint256\"}],\"name\":\"updateMinimumEpochInterval\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nextMinimumPodSize\",\"type\":\"uint256\"}],\"name\":\"updateMinimumPodSize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractIDarknodeSlasher\",\"name\":\"_slasher\",\"type\":\"address\"}],\"name\":\"updateSlasher\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +// Deprecated: Use DarknodeRegistryMetaData.ABI instead. +var DarknodeRegistryABI = DarknodeRegistryMetaData.ABI // DarknodeRegistry is an auto generated Go binding around an Ethereum contract. type DarknodeRegistry struct { @@ -126,7 +145,7 @@ func bindDarknodeRegistry(address common.Address, caller bind.ContractCaller, tr // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_DarknodeRegistry *DarknodeRegistryRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_DarknodeRegistry *DarknodeRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _DarknodeRegistry.Contract.DarknodeRegistryCaller.contract.Call(opts, result, method, params...) } @@ -145,7 +164,7 @@ func (_DarknodeRegistry *DarknodeRegistryRaw) Transact(opts *bind.TransactOpts, // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_DarknodeRegistry *DarknodeRegistryCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_DarknodeRegistry *DarknodeRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _DarknodeRegistry.Contract.contract.Call(opts, result, method, params...) } @@ -162,49 +181,63 @@ func (_DarknodeRegistry *DarknodeRegistryTransactorRaw) Transact(opts *bind.Tran // VERSION is a free data retrieval call binding the contract method 0xffa1ad74. // -// Solidity: function VERSION() constant returns(string) +// Solidity: function VERSION() view returns(string) func (_DarknodeRegistry *DarknodeRegistryCaller) VERSION(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "VERSION") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "VERSION") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + } // VERSION is a free data retrieval call binding the contract method 0xffa1ad74. // -// Solidity: function VERSION() constant returns(string) +// Solidity: function VERSION() view returns(string) func (_DarknodeRegistry *DarknodeRegistrySession) VERSION() (string, error) { return _DarknodeRegistry.Contract.VERSION(&_DarknodeRegistry.CallOpts) } // VERSION is a free data retrieval call binding the contract method 0xffa1ad74. // -// Solidity: function VERSION() constant returns(string) +// Solidity: function VERSION() view returns(string) func (_DarknodeRegistry *DarknodeRegistryCallerSession) VERSION() (string, error) { return _DarknodeRegistry.Contract.VERSION(&_DarknodeRegistry.CallOpts) } // CurrentEpoch is a free data retrieval call binding the contract method 0x76671808. // -// Solidity: function currentEpoch() constant returns(epochhash uint256, blocktime uint256) +// Solidity: function currentEpoch() view returns(uint256 epochhash, uint256 blocktime) func (_DarknodeRegistry *DarknodeRegistryCaller) CurrentEpoch(opts *bind.CallOpts) (struct { Epochhash *big.Int Blocktime *big.Int }, error) { - ret := new(struct { + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "currentEpoch") + + outstruct := new(struct { Epochhash *big.Int Blocktime *big.Int }) - out := ret - err := _DarknodeRegistry.contract.Call(opts, out, "currentEpoch") - return *ret, err + if err != nil { + return *outstruct, err + } + + outstruct.Epochhash = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Blocktime = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + } // CurrentEpoch is a free data retrieval call binding the contract method 0x76671808. // -// Solidity: function currentEpoch() constant returns(epochhash uint256, blocktime uint256) +// Solidity: function currentEpoch() view returns(uint256 epochhash, uint256 blocktime) func (_DarknodeRegistry *DarknodeRegistrySession) CurrentEpoch() (struct { Epochhash *big.Int Blocktime *big.Int @@ -214,7 +247,7 @@ func (_DarknodeRegistry *DarknodeRegistrySession) CurrentEpoch() (struct { // CurrentEpoch is a free data retrieval call binding the contract method 0x76671808. // -// Solidity: function currentEpoch() constant returns(epochhash uint256, blocktime uint256) +// Solidity: function currentEpoch() view returns(uint256 epochhash, uint256 blocktime) func (_DarknodeRegistry *DarknodeRegistryCallerSession) CurrentEpoch() (struct { Epochhash *big.Int Blocktime *big.Int @@ -224,699 +257,900 @@ func (_DarknodeRegistry *DarknodeRegistryCallerSession) CurrentEpoch() (struct { // DarknodePayment is a free data retrieval call binding the contract method 0xb6b34c67. // -// Solidity: function darknodePayment() constant returns(address) +// Solidity: function darknodePayment() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCaller) DarknodePayment(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "darknodePayment") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "darknodePayment") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // DarknodePayment is a free data retrieval call binding the contract method 0xb6b34c67. // -// Solidity: function darknodePayment() constant returns(address) +// Solidity: function darknodePayment() view returns(address) func (_DarknodeRegistry *DarknodeRegistrySession) DarknodePayment() (common.Address, error) { return _DarknodeRegistry.Contract.DarknodePayment(&_DarknodeRegistry.CallOpts) } // DarknodePayment is a free data retrieval call binding the contract method 0xb6b34c67. // -// Solidity: function darknodePayment() constant returns(address) +// Solidity: function darknodePayment() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCallerSession) DarknodePayment() (common.Address, error) { return _DarknodeRegistry.Contract.DarknodePayment(&_DarknodeRegistry.CallOpts) } +// DeregistrationInterval is a free data retrieval call binding the contract method 0x99ddebfb. +// +// Solidity: function deregistrationInterval() view returns(uint256) +func (_DarknodeRegistry *DarknodeRegistryCaller) DeregistrationInterval(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "deregistrationInterval") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// DeregistrationInterval is a free data retrieval call binding the contract method 0x99ddebfb. +// +// Solidity: function deregistrationInterval() view returns(uint256) +func (_DarknodeRegistry *DarknodeRegistrySession) DeregistrationInterval() (*big.Int, error) { + return _DarknodeRegistry.Contract.DeregistrationInterval(&_DarknodeRegistry.CallOpts) +} + +// DeregistrationInterval is a free data retrieval call binding the contract method 0x99ddebfb. +// +// Solidity: function deregistrationInterval() view returns(uint256) +func (_DarknodeRegistry *DarknodeRegistryCallerSession) DeregistrationInterval() (*big.Int, error) { + return _DarknodeRegistry.Contract.DeregistrationInterval(&_DarknodeRegistry.CallOpts) +} + // GetDarknodeBond is a free data retrieval call binding the contract method 0xba0f5b20. // -// Solidity: function getDarknodeBond(_darknodeID address) constant returns(uint256) +// Solidity: function getDarknodeBond(address _darknodeID) view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCaller) GetDarknodeBond(opts *bind.CallOpts, _darknodeID common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "getDarknodeBond", _darknodeID) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "getDarknodeBond", _darknodeID) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // GetDarknodeBond is a free data retrieval call binding the contract method 0xba0f5b20. // -// Solidity: function getDarknodeBond(_darknodeID address) constant returns(uint256) +// Solidity: function getDarknodeBond(address _darknodeID) view returns(uint256) func (_DarknodeRegistry *DarknodeRegistrySession) GetDarknodeBond(_darknodeID common.Address) (*big.Int, error) { return _DarknodeRegistry.Contract.GetDarknodeBond(&_DarknodeRegistry.CallOpts, _darknodeID) } // GetDarknodeBond is a free data retrieval call binding the contract method 0xba0f5b20. // -// Solidity: function getDarknodeBond(_darknodeID address) constant returns(uint256) +// Solidity: function getDarknodeBond(address _darknodeID) view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCallerSession) GetDarknodeBond(_darknodeID common.Address) (*big.Int, error) { return _DarknodeRegistry.Contract.GetDarknodeBond(&_DarknodeRegistry.CallOpts, _darknodeID) } -// GetDarknodeOwner is a free data retrieval call binding the contract method 0x1cedf8a3. +// GetDarknodeOperator is a free data retrieval call binding the contract method 0x45f02dc2. // -// Solidity: function getDarknodeOwner(_darknodeID address) constant returns(address) -func (_DarknodeRegistry *DarknodeRegistryCaller) GetDarknodeOwner(opts *bind.CallOpts, _darknodeID common.Address) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "getDarknodeOwner", _darknodeID) - return *ret0, err +// Solidity: function getDarknodeOperator(address _darknodeID) view returns(address) +func (_DarknodeRegistry *DarknodeRegistryCaller) GetDarknodeOperator(opts *bind.CallOpts, _darknodeID common.Address) (common.Address, error) { + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "getDarknodeOperator", _darknodeID) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } -// GetDarknodeOwner is a free data retrieval call binding the contract method 0x1cedf8a3. +// GetDarknodeOperator is a free data retrieval call binding the contract method 0x45f02dc2. // -// Solidity: function getDarknodeOwner(_darknodeID address) constant returns(address) -func (_DarknodeRegistry *DarknodeRegistrySession) GetDarknodeOwner(_darknodeID common.Address) (common.Address, error) { - return _DarknodeRegistry.Contract.GetDarknodeOwner(&_DarknodeRegistry.CallOpts, _darknodeID) +// Solidity: function getDarknodeOperator(address _darknodeID) view returns(address) +func (_DarknodeRegistry *DarknodeRegistrySession) GetDarknodeOperator(_darknodeID common.Address) (common.Address, error) { + return _DarknodeRegistry.Contract.GetDarknodeOperator(&_DarknodeRegistry.CallOpts, _darknodeID) } -// GetDarknodeOwner is a free data retrieval call binding the contract method 0x1cedf8a3. +// GetDarknodeOperator is a free data retrieval call binding the contract method 0x45f02dc2. // -// Solidity: function getDarknodeOwner(_darknodeID address) constant returns(address) -func (_DarknodeRegistry *DarknodeRegistryCallerSession) GetDarknodeOwner(_darknodeID common.Address) (common.Address, error) { - return _DarknodeRegistry.Contract.GetDarknodeOwner(&_DarknodeRegistry.CallOpts, _darknodeID) +// Solidity: function getDarknodeOperator(address _darknodeID) view returns(address) +func (_DarknodeRegistry *DarknodeRegistryCallerSession) GetDarknodeOperator(_darknodeID common.Address) (common.Address, error) { + return _DarknodeRegistry.Contract.GetDarknodeOperator(&_DarknodeRegistry.CallOpts, _darknodeID) } // GetDarknodePublicKey is a free data retrieval call binding the contract method 0x84d2688c. // -// Solidity: function getDarknodePublicKey(_darknodeID address) constant returns(bytes) +// Solidity: function getDarknodePublicKey(address _darknodeID) view returns(bytes) func (_DarknodeRegistry *DarknodeRegistryCaller) GetDarknodePublicKey(opts *bind.CallOpts, _darknodeID common.Address) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "getDarknodePublicKey", _darknodeID) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "getDarknodePublicKey", _darknodeID) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + } // GetDarknodePublicKey is a free data retrieval call binding the contract method 0x84d2688c. // -// Solidity: function getDarknodePublicKey(_darknodeID address) constant returns(bytes) +// Solidity: function getDarknodePublicKey(address _darknodeID) view returns(bytes) func (_DarknodeRegistry *DarknodeRegistrySession) GetDarknodePublicKey(_darknodeID common.Address) ([]byte, error) { return _DarknodeRegistry.Contract.GetDarknodePublicKey(&_DarknodeRegistry.CallOpts, _darknodeID) } // GetDarknodePublicKey is a free data retrieval call binding the contract method 0x84d2688c. // -// Solidity: function getDarknodePublicKey(_darknodeID address) constant returns(bytes) +// Solidity: function getDarknodePublicKey(address _darknodeID) view returns(bytes) func (_DarknodeRegistry *DarknodeRegistryCallerSession) GetDarknodePublicKey(_darknodeID common.Address) ([]byte, error) { return _DarknodeRegistry.Contract.GetDarknodePublicKey(&_DarknodeRegistry.CallOpts, _darknodeID) } // GetDarknodes is a free data retrieval call binding the contract method 0xec5325c1. // -// Solidity: function getDarknodes(_start address, _count uint256) constant returns(address[]) +// Solidity: function getDarknodes(address _start, uint256 _count) view returns(address[]) func (_DarknodeRegistry *DarknodeRegistryCaller) GetDarknodes(opts *bind.CallOpts, _start common.Address, _count *big.Int) ([]common.Address, error) { - var ( - ret0 = new([]common.Address) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "getDarknodes", _start, _count) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "getDarknodes", _start, _count) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + } // GetDarknodes is a free data retrieval call binding the contract method 0xec5325c1. // -// Solidity: function getDarknodes(_start address, _count uint256) constant returns(address[]) +// Solidity: function getDarknodes(address _start, uint256 _count) view returns(address[]) func (_DarknodeRegistry *DarknodeRegistrySession) GetDarknodes(_start common.Address, _count *big.Int) ([]common.Address, error) { return _DarknodeRegistry.Contract.GetDarknodes(&_DarknodeRegistry.CallOpts, _start, _count) } // GetDarknodes is a free data retrieval call binding the contract method 0xec5325c1. // -// Solidity: function getDarknodes(_start address, _count uint256) constant returns(address[]) +// Solidity: function getDarknodes(address _start, uint256 _count) view returns(address[]) func (_DarknodeRegistry *DarknodeRegistryCallerSession) GetDarknodes(_start common.Address, _count *big.Int) ([]common.Address, error) { return _DarknodeRegistry.Contract.GetDarknodes(&_DarknodeRegistry.CallOpts, _start, _count) } // GetPreviousDarknodes is a free data retrieval call binding the contract method 0x43846074. // -// Solidity: function getPreviousDarknodes(_start address, _count uint256) constant returns(address[]) +// Solidity: function getPreviousDarknodes(address _start, uint256 _count) view returns(address[]) func (_DarknodeRegistry *DarknodeRegistryCaller) GetPreviousDarknodes(opts *bind.CallOpts, _start common.Address, _count *big.Int) ([]common.Address, error) { - var ( - ret0 = new([]common.Address) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "getPreviousDarknodes", _start, _count) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "getPreviousDarknodes", _start, _count) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + } // GetPreviousDarknodes is a free data retrieval call binding the contract method 0x43846074. // -// Solidity: function getPreviousDarknodes(_start address, _count uint256) constant returns(address[]) +// Solidity: function getPreviousDarknodes(address _start, uint256 _count) view returns(address[]) func (_DarknodeRegistry *DarknodeRegistrySession) GetPreviousDarknodes(_start common.Address, _count *big.Int) ([]common.Address, error) { return _DarknodeRegistry.Contract.GetPreviousDarknodes(&_DarknodeRegistry.CallOpts, _start, _count) } // GetPreviousDarknodes is a free data retrieval call binding the contract method 0x43846074. // -// Solidity: function getPreviousDarknodes(_start address, _count uint256) constant returns(address[]) +// Solidity: function getPreviousDarknodes(address _start, uint256 _count) view returns(address[]) func (_DarknodeRegistry *DarknodeRegistryCallerSession) GetPreviousDarknodes(_start common.Address, _count *big.Int) ([]common.Address, error) { return _DarknodeRegistry.Contract.GetPreviousDarknodes(&_DarknodeRegistry.CallOpts, _start, _count) } // IsDeregisterable is a free data retrieval call binding the contract method 0xe1878925. // -// Solidity: function isDeregisterable(_darknodeID address) constant returns(bool) +// Solidity: function isDeregisterable(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCaller) IsDeregisterable(opts *bind.CallOpts, _darknodeID common.Address) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "isDeregisterable", _darknodeID) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "isDeregisterable", _darknodeID) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsDeregisterable is a free data retrieval call binding the contract method 0xe1878925. // -// Solidity: function isDeregisterable(_darknodeID address) constant returns(bool) +// Solidity: function isDeregisterable(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistrySession) IsDeregisterable(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsDeregisterable(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsDeregisterable is a free data retrieval call binding the contract method 0xe1878925. // -// Solidity: function isDeregisterable(_darknodeID address) constant returns(bool) +// Solidity: function isDeregisterable(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCallerSession) IsDeregisterable(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsDeregisterable(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsDeregistered is a free data retrieval call binding the contract method 0x8020fc1f. // -// Solidity: function isDeregistered(_darknodeID address) constant returns(bool) +// Solidity: function isDeregistered(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCaller) IsDeregistered(opts *bind.CallOpts, _darknodeID common.Address) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "isDeregistered", _darknodeID) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "isDeregistered", _darknodeID) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsDeregistered is a free data retrieval call binding the contract method 0x8020fc1f. // -// Solidity: function isDeregistered(_darknodeID address) constant returns(bool) +// Solidity: function isDeregistered(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistrySession) IsDeregistered(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsDeregistered(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsDeregistered is a free data retrieval call binding the contract method 0x8020fc1f. // -// Solidity: function isDeregistered(_darknodeID address) constant returns(bool) +// Solidity: function isDeregistered(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCallerSession) IsDeregistered(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsDeregistered(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "isOwner") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "isOwner") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_DarknodeRegistry *DarknodeRegistrySession) IsOwner() (bool, error) { return _DarknodeRegistry.Contract.IsOwner(&_DarknodeRegistry.CallOpts) } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCallerSession) IsOwner() (bool, error) { return _DarknodeRegistry.Contract.IsOwner(&_DarknodeRegistry.CallOpts) } // IsPendingDeregistration is a free data retrieval call binding the contract method 0x303ee989. // -// Solidity: function isPendingDeregistration(_darknodeID address) constant returns(bool) +// Solidity: function isPendingDeregistration(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCaller) IsPendingDeregistration(opts *bind.CallOpts, _darknodeID common.Address) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "isPendingDeregistration", _darknodeID) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "isPendingDeregistration", _darknodeID) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsPendingDeregistration is a free data retrieval call binding the contract method 0x303ee989. // -// Solidity: function isPendingDeregistration(_darknodeID address) constant returns(bool) +// Solidity: function isPendingDeregistration(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistrySession) IsPendingDeregistration(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsPendingDeregistration(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsPendingDeregistration is a free data retrieval call binding the contract method 0x303ee989. // -// Solidity: function isPendingDeregistration(_darknodeID address) constant returns(bool) +// Solidity: function isPendingDeregistration(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCallerSession) IsPendingDeregistration(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsPendingDeregistration(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsPendingRegistration is a free data retrieval call binding the contract method 0x040fa051. // -// Solidity: function isPendingRegistration(_darknodeID address) constant returns(bool) +// Solidity: function isPendingRegistration(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCaller) IsPendingRegistration(opts *bind.CallOpts, _darknodeID common.Address) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "isPendingRegistration", _darknodeID) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "isPendingRegistration", _darknodeID) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsPendingRegistration is a free data retrieval call binding the contract method 0x040fa051. // -// Solidity: function isPendingRegistration(_darknodeID address) constant returns(bool) +// Solidity: function isPendingRegistration(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistrySession) IsPendingRegistration(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsPendingRegistration(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsPendingRegistration is a free data retrieval call binding the contract method 0x040fa051. // -// Solidity: function isPendingRegistration(_darknodeID address) constant returns(bool) +// Solidity: function isPendingRegistration(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCallerSession) IsPendingRegistration(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsPendingRegistration(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsRefundable is a free data retrieval call binding the contract method 0x5aebd1cb. // -// Solidity: function isRefundable(_darknodeID address) constant returns(bool) +// Solidity: function isRefundable(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCaller) IsRefundable(opts *bind.CallOpts, _darknodeID common.Address) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "isRefundable", _darknodeID) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "isRefundable", _darknodeID) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsRefundable is a free data retrieval call binding the contract method 0x5aebd1cb. // -// Solidity: function isRefundable(_darknodeID address) constant returns(bool) +// Solidity: function isRefundable(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistrySession) IsRefundable(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsRefundable(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsRefundable is a free data retrieval call binding the contract method 0x5aebd1cb. // -// Solidity: function isRefundable(_darknodeID address) constant returns(bool) +// Solidity: function isRefundable(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCallerSession) IsRefundable(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsRefundable(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsRefunded is a free data retrieval call binding the contract method 0xffc9152e. // -// Solidity: function isRefunded(_darknodeID address) constant returns(bool) +// Solidity: function isRefunded(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCaller) IsRefunded(opts *bind.CallOpts, _darknodeID common.Address) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "isRefunded", _darknodeID) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "isRefunded", _darknodeID) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsRefunded is a free data retrieval call binding the contract method 0xffc9152e. // -// Solidity: function isRefunded(_darknodeID address) constant returns(bool) +// Solidity: function isRefunded(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistrySession) IsRefunded(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsRefunded(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsRefunded is a free data retrieval call binding the contract method 0xffc9152e. // -// Solidity: function isRefunded(_darknodeID address) constant returns(bool) +// Solidity: function isRefunded(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCallerSession) IsRefunded(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsRefunded(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsRegistered is a free data retrieval call binding the contract method 0xc3c5a547. // -// Solidity: function isRegistered(_darknodeID address) constant returns(bool) +// Solidity: function isRegistered(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCaller) IsRegistered(opts *bind.CallOpts, _darknodeID common.Address) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "isRegistered", _darknodeID) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "isRegistered", _darknodeID) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsRegistered is a free data retrieval call binding the contract method 0xc3c5a547. // -// Solidity: function isRegistered(_darknodeID address) constant returns(bool) +// Solidity: function isRegistered(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistrySession) IsRegistered(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsRegistered(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsRegistered is a free data retrieval call binding the contract method 0xc3c5a547. // -// Solidity: function isRegistered(_darknodeID address) constant returns(bool) +// Solidity: function isRegistered(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCallerSession) IsRegistered(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsRegistered(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsRegisteredInPreviousEpoch is a free data retrieval call binding the contract method 0x7be266da. // -// Solidity: function isRegisteredInPreviousEpoch(_darknodeID address) constant returns(bool) +// Solidity: function isRegisteredInPreviousEpoch(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCaller) IsRegisteredInPreviousEpoch(opts *bind.CallOpts, _darknodeID common.Address) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "isRegisteredInPreviousEpoch", _darknodeID) - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "isRegisteredInPreviousEpoch", _darknodeID) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsRegisteredInPreviousEpoch is a free data retrieval call binding the contract method 0x7be266da. // -// Solidity: function isRegisteredInPreviousEpoch(_darknodeID address) constant returns(bool) +// Solidity: function isRegisteredInPreviousEpoch(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistrySession) IsRegisteredInPreviousEpoch(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsRegisteredInPreviousEpoch(&_DarknodeRegistry.CallOpts, _darknodeID) } // IsRegisteredInPreviousEpoch is a free data retrieval call binding the contract method 0x7be266da. // -// Solidity: function isRegisteredInPreviousEpoch(_darknodeID address) constant returns(bool) +// Solidity: function isRegisteredInPreviousEpoch(address _darknodeID) view returns(bool) func (_DarknodeRegistry *DarknodeRegistryCallerSession) IsRegisteredInPreviousEpoch(_darknodeID common.Address) (bool, error) { return _DarknodeRegistry.Contract.IsRegisteredInPreviousEpoch(&_DarknodeRegistry.CallOpts, _darknodeID) } // MinimumBond is a free data retrieval call binding the contract method 0xaa7517e1. // -// Solidity: function minimumBond() constant returns(uint256) +// Solidity: function minimumBond() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCaller) MinimumBond(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "minimumBond") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "minimumBond") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // MinimumBond is a free data retrieval call binding the contract method 0xaa7517e1. // -// Solidity: function minimumBond() constant returns(uint256) +// Solidity: function minimumBond() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistrySession) MinimumBond() (*big.Int, error) { return _DarknodeRegistry.Contract.MinimumBond(&_DarknodeRegistry.CallOpts) } // MinimumBond is a free data retrieval call binding the contract method 0xaa7517e1. // -// Solidity: function minimumBond() constant returns(uint256) +// Solidity: function minimumBond() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCallerSession) MinimumBond() (*big.Int, error) { return _DarknodeRegistry.Contract.MinimumBond(&_DarknodeRegistry.CallOpts) } // MinimumEpochInterval is a free data retrieval call binding the contract method 0x55cacda5. // -// Solidity: function minimumEpochInterval() constant returns(uint256) +// Solidity: function minimumEpochInterval() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCaller) MinimumEpochInterval(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "minimumEpochInterval") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "minimumEpochInterval") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // MinimumEpochInterval is a free data retrieval call binding the contract method 0x55cacda5. // -// Solidity: function minimumEpochInterval() constant returns(uint256) +// Solidity: function minimumEpochInterval() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistrySession) MinimumEpochInterval() (*big.Int, error) { return _DarknodeRegistry.Contract.MinimumEpochInterval(&_DarknodeRegistry.CallOpts) } // MinimumEpochInterval is a free data retrieval call binding the contract method 0x55cacda5. // -// Solidity: function minimumEpochInterval() constant returns(uint256) +// Solidity: function minimumEpochInterval() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCallerSession) MinimumEpochInterval() (*big.Int, error) { return _DarknodeRegistry.Contract.MinimumEpochInterval(&_DarknodeRegistry.CallOpts) } // MinimumPodSize is a free data retrieval call binding the contract method 0xc7dbc2be. // -// Solidity: function minimumPodSize() constant returns(uint256) +// Solidity: function minimumPodSize() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCaller) MinimumPodSize(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "minimumPodSize") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "minimumPodSize") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // MinimumPodSize is a free data retrieval call binding the contract method 0xc7dbc2be. // -// Solidity: function minimumPodSize() constant returns(uint256) +// Solidity: function minimumPodSize() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistrySession) MinimumPodSize() (*big.Int, error) { return _DarknodeRegistry.Contract.MinimumPodSize(&_DarknodeRegistry.CallOpts) } // MinimumPodSize is a free data retrieval call binding the contract method 0xc7dbc2be. // -// Solidity: function minimumPodSize() constant returns(uint256) +// Solidity: function minimumPodSize() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCallerSession) MinimumPodSize() (*big.Int, error) { return _DarknodeRegistry.Contract.MinimumPodSize(&_DarknodeRegistry.CallOpts) } // NextMinimumBond is a free data retrieval call binding the contract method 0x60a22fe4. // -// Solidity: function nextMinimumBond() constant returns(uint256) +// Solidity: function nextMinimumBond() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCaller) NextMinimumBond(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "nextMinimumBond") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "nextMinimumBond") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // NextMinimumBond is a free data retrieval call binding the contract method 0x60a22fe4. // -// Solidity: function nextMinimumBond() constant returns(uint256) +// Solidity: function nextMinimumBond() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistrySession) NextMinimumBond() (*big.Int, error) { return _DarknodeRegistry.Contract.NextMinimumBond(&_DarknodeRegistry.CallOpts) } // NextMinimumBond is a free data retrieval call binding the contract method 0x60a22fe4. // -// Solidity: function nextMinimumBond() constant returns(uint256) +// Solidity: function nextMinimumBond() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCallerSession) NextMinimumBond() (*big.Int, error) { return _DarknodeRegistry.Contract.NextMinimumBond(&_DarknodeRegistry.CallOpts) } // NextMinimumEpochInterval is a free data retrieval call binding the contract method 0x455dc46d. // -// Solidity: function nextMinimumEpochInterval() constant returns(uint256) +// Solidity: function nextMinimumEpochInterval() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCaller) NextMinimumEpochInterval(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "nextMinimumEpochInterval") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "nextMinimumEpochInterval") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // NextMinimumEpochInterval is a free data retrieval call binding the contract method 0x455dc46d. // -// Solidity: function nextMinimumEpochInterval() constant returns(uint256) +// Solidity: function nextMinimumEpochInterval() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistrySession) NextMinimumEpochInterval() (*big.Int, error) { return _DarknodeRegistry.Contract.NextMinimumEpochInterval(&_DarknodeRegistry.CallOpts) } // NextMinimumEpochInterval is a free data retrieval call binding the contract method 0x455dc46d. // -// Solidity: function nextMinimumEpochInterval() constant returns(uint256) +// Solidity: function nextMinimumEpochInterval() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCallerSession) NextMinimumEpochInterval() (*big.Int, error) { return _DarknodeRegistry.Contract.NextMinimumEpochInterval(&_DarknodeRegistry.CallOpts) } // NextMinimumPodSize is a free data retrieval call binding the contract method 0x702c25ee. // -// Solidity: function nextMinimumPodSize() constant returns(uint256) +// Solidity: function nextMinimumPodSize() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCaller) NextMinimumPodSize(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "nextMinimumPodSize") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "nextMinimumPodSize") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // NextMinimumPodSize is a free data retrieval call binding the contract method 0x702c25ee. // -// Solidity: function nextMinimumPodSize() constant returns(uint256) +// Solidity: function nextMinimumPodSize() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistrySession) NextMinimumPodSize() (*big.Int, error) { return _DarknodeRegistry.Contract.NextMinimumPodSize(&_DarknodeRegistry.CallOpts) } // NextMinimumPodSize is a free data retrieval call binding the contract method 0x702c25ee. // -// Solidity: function nextMinimumPodSize() constant returns(uint256) +// Solidity: function nextMinimumPodSize() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCallerSession) NextMinimumPodSize() (*big.Int, error) { return _DarknodeRegistry.Contract.NextMinimumPodSize(&_DarknodeRegistry.CallOpts) } // NextSlasher is a free data retrieval call binding the contract method 0x21a2ad3a. // -// Solidity: function nextSlasher() constant returns(address) +// Solidity: function nextSlasher() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCaller) NextSlasher(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "nextSlasher") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "nextSlasher") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // NextSlasher is a free data retrieval call binding the contract method 0x21a2ad3a. // -// Solidity: function nextSlasher() constant returns(address) +// Solidity: function nextSlasher() view returns(address) func (_DarknodeRegistry *DarknodeRegistrySession) NextSlasher() (common.Address, error) { return _DarknodeRegistry.Contract.NextSlasher(&_DarknodeRegistry.CallOpts) } // NextSlasher is a free data retrieval call binding the contract method 0x21a2ad3a. // -// Solidity: function nextSlasher() constant returns(address) +// Solidity: function nextSlasher() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCallerSession) NextSlasher() (common.Address, error) { return _DarknodeRegistry.Contract.NextSlasher(&_DarknodeRegistry.CallOpts) } // NumDarknodes is a free data retrieval call binding the contract method 0x1460e603. // -// Solidity: function numDarknodes() constant returns(uint256) +// Solidity: function numDarknodes() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCaller) NumDarknodes(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "numDarknodes") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "numDarknodes") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // NumDarknodes is a free data retrieval call binding the contract method 0x1460e603. // -// Solidity: function numDarknodes() constant returns(uint256) +// Solidity: function numDarknodes() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistrySession) NumDarknodes() (*big.Int, error) { return _DarknodeRegistry.Contract.NumDarknodes(&_DarknodeRegistry.CallOpts) } // NumDarknodes is a free data retrieval call binding the contract method 0x1460e603. // -// Solidity: function numDarknodes() constant returns(uint256) +// Solidity: function numDarknodes() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCallerSession) NumDarknodes() (*big.Int, error) { return _DarknodeRegistry.Contract.NumDarknodes(&_DarknodeRegistry.CallOpts) } // NumDarknodesNextEpoch is a free data retrieval call binding the contract method 0x0847e9fa. // -// Solidity: function numDarknodesNextEpoch() constant returns(uint256) +// Solidity: function numDarknodesNextEpoch() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCaller) NumDarknodesNextEpoch(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "numDarknodesNextEpoch") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "numDarknodesNextEpoch") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // NumDarknodesNextEpoch is a free data retrieval call binding the contract method 0x0847e9fa. // -// Solidity: function numDarknodesNextEpoch() constant returns(uint256) +// Solidity: function numDarknodesNextEpoch() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistrySession) NumDarknodesNextEpoch() (*big.Int, error) { return _DarknodeRegistry.Contract.NumDarknodesNextEpoch(&_DarknodeRegistry.CallOpts) } // NumDarknodesNextEpoch is a free data retrieval call binding the contract method 0x0847e9fa. // -// Solidity: function numDarknodesNextEpoch() constant returns(uint256) +// Solidity: function numDarknodesNextEpoch() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCallerSession) NumDarknodesNextEpoch() (*big.Int, error) { return _DarknodeRegistry.Contract.NumDarknodesNextEpoch(&_DarknodeRegistry.CallOpts) } // NumDarknodesPreviousEpoch is a free data retrieval call binding the contract method 0x71740d16. // -// Solidity: function numDarknodesPreviousEpoch() constant returns(uint256) +// Solidity: function numDarknodesPreviousEpoch() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCaller) NumDarknodesPreviousEpoch(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "numDarknodesPreviousEpoch") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "numDarknodesPreviousEpoch") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // NumDarknodesPreviousEpoch is a free data retrieval call binding the contract method 0x71740d16. // -// Solidity: function numDarknodesPreviousEpoch() constant returns(uint256) +// Solidity: function numDarknodesPreviousEpoch() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistrySession) NumDarknodesPreviousEpoch() (*big.Int, error) { return _DarknodeRegistry.Contract.NumDarknodesPreviousEpoch(&_DarknodeRegistry.CallOpts) } // NumDarknodesPreviousEpoch is a free data retrieval call binding the contract method 0x71740d16. // -// Solidity: function numDarknodesPreviousEpoch() constant returns(uint256) +// Solidity: function numDarknodesPreviousEpoch() view returns(uint256) func (_DarknodeRegistry *DarknodeRegistryCallerSession) NumDarknodesPreviousEpoch() (*big.Int, error) { return _DarknodeRegistry.Contract.NumDarknodesPreviousEpoch(&_DarknodeRegistry.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "owner") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_DarknodeRegistry *DarknodeRegistrySession) Owner() (common.Address, error) { return _DarknodeRegistry.Contract.Owner(&_DarknodeRegistry.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCallerSession) Owner() (common.Address, error) { return _DarknodeRegistry.Contract.Owner(&_DarknodeRegistry.CallOpts) } +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_DarknodeRegistry *DarknodeRegistryCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "pendingOwner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_DarknodeRegistry *DarknodeRegistrySession) PendingOwner() (common.Address, error) { + return _DarknodeRegistry.Contract.PendingOwner(&_DarknodeRegistry.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_DarknodeRegistry *DarknodeRegistryCallerSession) PendingOwner() (common.Address, error) { + return _DarknodeRegistry.Contract.PendingOwner(&_DarknodeRegistry.CallOpts) +} + // PreviousEpoch is a free data retrieval call binding the contract method 0x5cdaab48. // -// Solidity: function previousEpoch() constant returns(epochhash uint256, blocktime uint256) +// Solidity: function previousEpoch() view returns(uint256 epochhash, uint256 blocktime) func (_DarknodeRegistry *DarknodeRegistryCaller) PreviousEpoch(opts *bind.CallOpts) (struct { Epochhash *big.Int Blocktime *big.Int }, error) { - ret := new(struct { + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "previousEpoch") + + outstruct := new(struct { Epochhash *big.Int Blocktime *big.Int }) - out := ret - err := _DarknodeRegistry.contract.Call(opts, out, "previousEpoch") - return *ret, err + if err != nil { + return *outstruct, err + } + + outstruct.Epochhash = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Blocktime = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + } // PreviousEpoch is a free data retrieval call binding the contract method 0x5cdaab48. // -// Solidity: function previousEpoch() constant returns(epochhash uint256, blocktime uint256) +// Solidity: function previousEpoch() view returns(uint256 epochhash, uint256 blocktime) func (_DarknodeRegistry *DarknodeRegistrySession) PreviousEpoch() (struct { Epochhash *big.Int Blocktime *big.Int @@ -926,7 +1160,7 @@ func (_DarknodeRegistry *DarknodeRegistrySession) PreviousEpoch() (struct { // PreviousEpoch is a free data retrieval call binding the contract method 0x5cdaab48. // -// Solidity: function previousEpoch() constant returns(epochhash uint256, blocktime uint256) +// Solidity: function previousEpoch() view returns(uint256 epochhash, uint256 blocktime) func (_DarknodeRegistry *DarknodeRegistryCallerSession) PreviousEpoch() (struct { Epochhash *big.Int Blocktime *big.Int @@ -936,82 +1170,118 @@ func (_DarknodeRegistry *DarknodeRegistryCallerSession) PreviousEpoch() (struct // Ren is a free data retrieval call binding the contract method 0x8a9b4067. // -// Solidity: function ren() constant returns(address) +// Solidity: function ren() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCaller) Ren(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "ren") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "ren") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Ren is a free data retrieval call binding the contract method 0x8a9b4067. // -// Solidity: function ren() constant returns(address) +// Solidity: function ren() view returns(address) func (_DarknodeRegistry *DarknodeRegistrySession) Ren() (common.Address, error) { return _DarknodeRegistry.Contract.Ren(&_DarknodeRegistry.CallOpts) } // Ren is a free data retrieval call binding the contract method 0x8a9b4067. // -// Solidity: function ren() constant returns(address) +// Solidity: function ren() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCallerSession) Ren() (common.Address, error) { return _DarknodeRegistry.Contract.Ren(&_DarknodeRegistry.CallOpts) } // Slasher is a free data retrieval call binding the contract method 0xb1344271. // -// Solidity: function slasher() constant returns(address) +// Solidity: function slasher() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCaller) Slasher(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "slasher") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "slasher") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Slasher is a free data retrieval call binding the contract method 0xb1344271. // -// Solidity: function slasher() constant returns(address) +// Solidity: function slasher() view returns(address) func (_DarknodeRegistry *DarknodeRegistrySession) Slasher() (common.Address, error) { return _DarknodeRegistry.Contract.Slasher(&_DarknodeRegistry.CallOpts) } // Slasher is a free data retrieval call binding the contract method 0xb1344271. // -// Solidity: function slasher() constant returns(address) +// Solidity: function slasher() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCallerSession) Slasher() (common.Address, error) { return _DarknodeRegistry.Contract.Slasher(&_DarknodeRegistry.CallOpts) } // Store is a free data retrieval call binding the contract method 0x975057e7. // -// Solidity: function store() constant returns(address) +// Solidity: function store() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCaller) Store(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _DarknodeRegistry.contract.Call(opts, out, "store") - return *ret0, err + var out []interface{} + err := _DarknodeRegistry.contract.Call(opts, &out, "store") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Store is a free data retrieval call binding the contract method 0x975057e7. // -// Solidity: function store() constant returns(address) +// Solidity: function store() view returns(address) func (_DarknodeRegistry *DarknodeRegistrySession) Store() (common.Address, error) { return _DarknodeRegistry.Contract.Store(&_DarknodeRegistry.CallOpts) } // Store is a free data retrieval call binding the contract method 0x975057e7. // -// Solidity: function store() constant returns(address) +// Solidity: function store() view returns(address) func (_DarknodeRegistry *DarknodeRegistryCallerSession) Store() (common.Address, error) { return _DarknodeRegistry.Contract.Store(&_DarknodeRegistry.CallOpts) } +// BlacklistRecoverableToken is a paid mutator transaction binding the contract method 0xf65d901c. +// +// Solidity: function blacklistRecoverableToken(address _token) returns() +func (_DarknodeRegistry *DarknodeRegistryTransactor) BlacklistRecoverableToken(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) { + return _DarknodeRegistry.contract.Transact(opts, "blacklistRecoverableToken", _token) +} + +// BlacklistRecoverableToken is a paid mutator transaction binding the contract method 0xf65d901c. +// +// Solidity: function blacklistRecoverableToken(address _token) returns() +func (_DarknodeRegistry *DarknodeRegistrySession) BlacklistRecoverableToken(_token common.Address) (*types.Transaction, error) { + return _DarknodeRegistry.Contract.BlacklistRecoverableToken(&_DarknodeRegistry.TransactOpts, _token) +} + +// BlacklistRecoverableToken is a paid mutator transaction binding the contract method 0xf65d901c. +// +// Solidity: function blacklistRecoverableToken(address _token) returns() +func (_DarknodeRegistry *DarknodeRegistryTransactorSession) BlacklistRecoverableToken(_token common.Address) (*types.Transaction, error) { + return _DarknodeRegistry.Contract.BlacklistRecoverableToken(&_DarknodeRegistry.TransactOpts, _token) +} + // ClaimOwnership is a paid mutator transaction binding the contract method 0x4e71e0c8. // // Solidity: function claimOwnership() returns() @@ -1056,21 +1326,21 @@ func (_DarknodeRegistry *DarknodeRegistryTransactorSession) ClaimStoreOwnership( // Deregister is a paid mutator transaction binding the contract method 0x84ac33ec. // -// Solidity: function deregister(_darknodeID address) returns() +// Solidity: function deregister(address _darknodeID) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) Deregister(opts *bind.TransactOpts, _darknodeID common.Address) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "deregister", _darknodeID) } // Deregister is a paid mutator transaction binding the contract method 0x84ac33ec. // -// Solidity: function deregister(_darknodeID address) returns() +// Solidity: function deregister(address _darknodeID) returns() func (_DarknodeRegistry *DarknodeRegistrySession) Deregister(_darknodeID common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.Deregister(&_DarknodeRegistry.TransactOpts, _darknodeID) } // Deregister is a paid mutator transaction binding the contract method 0x84ac33ec. // -// Solidity: function deregister(_darknodeID address) returns() +// Solidity: function deregister(address _darknodeID) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) Deregister(_darknodeID common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.Deregister(&_DarknodeRegistry.TransactOpts, _darknodeID) } @@ -1096,65 +1366,107 @@ func (_DarknodeRegistry *DarknodeRegistryTransactorSession) Epoch() (*types.Tran return _DarknodeRegistry.Contract.Epoch(&_DarknodeRegistry.TransactOpts) } +// Initialize is a paid mutator transaction binding the contract method 0x74fe2916. +// +// Solidity: function initialize(string _VERSION, address _renAddress, address _storeAddress, uint256 _minimumBond, uint256 _minimumPodSize, uint256 _minimumEpochIntervalSeconds, uint256 _deregistrationIntervalSeconds) returns() +func (_DarknodeRegistry *DarknodeRegistryTransactor) Initialize(opts *bind.TransactOpts, _VERSION string, _renAddress common.Address, _storeAddress common.Address, _minimumBond *big.Int, _minimumPodSize *big.Int, _minimumEpochIntervalSeconds *big.Int, _deregistrationIntervalSeconds *big.Int) (*types.Transaction, error) { + return _DarknodeRegistry.contract.Transact(opts, "initialize", _VERSION, _renAddress, _storeAddress, _minimumBond, _minimumPodSize, _minimumEpochIntervalSeconds, _deregistrationIntervalSeconds) +} + +// Initialize is a paid mutator transaction binding the contract method 0x74fe2916. +// +// Solidity: function initialize(string _VERSION, address _renAddress, address _storeAddress, uint256 _minimumBond, uint256 _minimumPodSize, uint256 _minimumEpochIntervalSeconds, uint256 _deregistrationIntervalSeconds) returns() +func (_DarknodeRegistry *DarknodeRegistrySession) Initialize(_VERSION string, _renAddress common.Address, _storeAddress common.Address, _minimumBond *big.Int, _minimumPodSize *big.Int, _minimumEpochIntervalSeconds *big.Int, _deregistrationIntervalSeconds *big.Int) (*types.Transaction, error) { + return _DarknodeRegistry.Contract.Initialize(&_DarknodeRegistry.TransactOpts, _VERSION, _renAddress, _storeAddress, _minimumBond, _minimumPodSize, _minimumEpochIntervalSeconds, _deregistrationIntervalSeconds) +} + +// Initialize is a paid mutator transaction binding the contract method 0x74fe2916. +// +// Solidity: function initialize(string _VERSION, address _renAddress, address _storeAddress, uint256 _minimumBond, uint256 _minimumPodSize, uint256 _minimumEpochIntervalSeconds, uint256 _deregistrationIntervalSeconds) returns() +func (_DarknodeRegistry *DarknodeRegistryTransactorSession) Initialize(_VERSION string, _renAddress common.Address, _storeAddress common.Address, _minimumBond *big.Int, _minimumPodSize *big.Int, _minimumEpochIntervalSeconds *big.Int, _deregistrationIntervalSeconds *big.Int) (*types.Transaction, error) { + return _DarknodeRegistry.Contract.Initialize(&_DarknodeRegistry.TransactOpts, _VERSION, _renAddress, _storeAddress, _minimumBond, _minimumPodSize, _minimumEpochIntervalSeconds, _deregistrationIntervalSeconds) +} + +// Initialize0 is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _nextOwner) returns() +func (_DarknodeRegistry *DarknodeRegistryTransactor) Initialize0(opts *bind.TransactOpts, _nextOwner common.Address) (*types.Transaction, error) { + return _DarknodeRegistry.contract.Transact(opts, "initialize0", _nextOwner) +} + +// Initialize0 is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _nextOwner) returns() +func (_DarknodeRegistry *DarknodeRegistrySession) Initialize0(_nextOwner common.Address) (*types.Transaction, error) { + return _DarknodeRegistry.Contract.Initialize0(&_DarknodeRegistry.TransactOpts, _nextOwner) +} + +// Initialize0 is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _nextOwner) returns() +func (_DarknodeRegistry *DarknodeRegistryTransactorSession) Initialize0(_nextOwner common.Address) (*types.Transaction, error) { + return _DarknodeRegistry.Contract.Initialize0(&_DarknodeRegistry.TransactOpts, _nextOwner) +} + // RecoverTokens is a paid mutator transaction binding the contract method 0x16114acd. // -// Solidity: function recoverTokens(_token address) returns() +// Solidity: function recoverTokens(address _token) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) RecoverTokens(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "recoverTokens", _token) } // RecoverTokens is a paid mutator transaction binding the contract method 0x16114acd. // -// Solidity: function recoverTokens(_token address) returns() +// Solidity: function recoverTokens(address _token) returns() func (_DarknodeRegistry *DarknodeRegistrySession) RecoverTokens(_token common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.RecoverTokens(&_DarknodeRegistry.TransactOpts, _token) } // RecoverTokens is a paid mutator transaction binding the contract method 0x16114acd. // -// Solidity: function recoverTokens(_token address) returns() +// Solidity: function recoverTokens(address _token) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) RecoverTokens(_token common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.RecoverTokens(&_DarknodeRegistry.TransactOpts, _token) } // Refund is a paid mutator transaction binding the contract method 0xfa89401a. // -// Solidity: function refund(_darknodeID address) returns() +// Solidity: function refund(address _darknodeID) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) Refund(opts *bind.TransactOpts, _darknodeID common.Address) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "refund", _darknodeID) } // Refund is a paid mutator transaction binding the contract method 0xfa89401a. // -// Solidity: function refund(_darknodeID address) returns() +// Solidity: function refund(address _darknodeID) returns() func (_DarknodeRegistry *DarknodeRegistrySession) Refund(_darknodeID common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.Refund(&_DarknodeRegistry.TransactOpts, _darknodeID) } // Refund is a paid mutator transaction binding the contract method 0xfa89401a. // -// Solidity: function refund(_darknodeID address) returns() +// Solidity: function refund(address _darknodeID) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) Refund(_darknodeID common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.Refund(&_DarknodeRegistry.TransactOpts, _darknodeID) } // Register is a paid mutator transaction binding the contract method 0x24b8fbf6. // -// Solidity: function register(_darknodeID address, _publicKey bytes) returns() +// Solidity: function register(address _darknodeID, bytes _publicKey) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) Register(opts *bind.TransactOpts, _darknodeID common.Address, _publicKey []byte) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "register", _darknodeID, _publicKey) } // Register is a paid mutator transaction binding the contract method 0x24b8fbf6. // -// Solidity: function register(_darknodeID address, _publicKey bytes) returns() +// Solidity: function register(address _darknodeID, bytes _publicKey) returns() func (_DarknodeRegistry *DarknodeRegistrySession) Register(_darknodeID common.Address, _publicKey []byte) (*types.Transaction, error) { return _DarknodeRegistry.Contract.Register(&_DarknodeRegistry.TransactOpts, _darknodeID, _publicKey) } // Register is a paid mutator transaction binding the contract method 0x24b8fbf6. // -// Solidity: function register(_darknodeID address, _publicKey bytes) returns() +// Solidity: function register(address _darknodeID, bytes _publicKey) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) Register(_darknodeID common.Address, _publicKey []byte) (*types.Transaction, error) { return _DarknodeRegistry.Contract.Register(&_DarknodeRegistry.TransactOpts, _darknodeID, _publicKey) } @@ -1182,168 +1494,168 @@ func (_DarknodeRegistry *DarknodeRegistryTransactorSession) RenounceOwnership() // Slash is a paid mutator transaction binding the contract method 0xe74f8239. // -// Solidity: function slash(_guilty address, _challenger address, _percentage uint256) returns() +// Solidity: function slash(address _guilty, address _challenger, uint256 _percentage) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) Slash(opts *bind.TransactOpts, _guilty common.Address, _challenger common.Address, _percentage *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "slash", _guilty, _challenger, _percentage) } // Slash is a paid mutator transaction binding the contract method 0xe74f8239. // -// Solidity: function slash(_guilty address, _challenger address, _percentage uint256) returns() +// Solidity: function slash(address _guilty, address _challenger, uint256 _percentage) returns() func (_DarknodeRegistry *DarknodeRegistrySession) Slash(_guilty common.Address, _challenger common.Address, _percentage *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.Contract.Slash(&_DarknodeRegistry.TransactOpts, _guilty, _challenger, _percentage) } // Slash is a paid mutator transaction binding the contract method 0xe74f8239. // -// Solidity: function slash(_guilty address, _challenger address, _percentage uint256) returns() +// Solidity: function slash(address _guilty, address _challenger, uint256 _percentage) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) Slash(_guilty common.Address, _challenger common.Address, _percentage *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.Contract.Slash(&_DarknodeRegistry.TransactOpts, _guilty, _challenger, _percentage) } // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // -// Solidity: function transferOwnership(newOwner address) returns() +// Solidity: function transferOwnership(address newOwner) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "transferOwnership", newOwner) } // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // -// Solidity: function transferOwnership(newOwner address) returns() +// Solidity: function transferOwnership(address newOwner) returns() func (_DarknodeRegistry *DarknodeRegistrySession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.TransferOwnership(&_DarknodeRegistry.TransactOpts, newOwner) } // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // -// Solidity: function transferOwnership(newOwner address) returns() +// Solidity: function transferOwnership(address newOwner) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.TransferOwnership(&_DarknodeRegistry.TransactOpts, newOwner) } // TransferStoreOwnership is a paid mutator transaction binding the contract method 0xc2250a99. // -// Solidity: function transferStoreOwnership(_newOwner address) returns() +// Solidity: function transferStoreOwnership(address _newOwner) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) TransferStoreOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "transferStoreOwnership", _newOwner) } // TransferStoreOwnership is a paid mutator transaction binding the contract method 0xc2250a99. // -// Solidity: function transferStoreOwnership(_newOwner address) returns() +// Solidity: function transferStoreOwnership(address _newOwner) returns() func (_DarknodeRegistry *DarknodeRegistrySession) TransferStoreOwnership(_newOwner common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.TransferStoreOwnership(&_DarknodeRegistry.TransactOpts, _newOwner) } // TransferStoreOwnership is a paid mutator transaction binding the contract method 0xc2250a99. // -// Solidity: function transferStoreOwnership(_newOwner address) returns() +// Solidity: function transferStoreOwnership(address _newOwner) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) TransferStoreOwnership(_newOwner common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.TransferStoreOwnership(&_DarknodeRegistry.TransactOpts, _newOwner) } // UpdateDarknodePayment is a paid mutator transaction binding the contract method 0x71b4133c. // -// Solidity: function updateDarknodePayment(_darknodePayment address) returns() +// Solidity: function updateDarknodePayment(address _darknodePayment) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) UpdateDarknodePayment(opts *bind.TransactOpts, _darknodePayment common.Address) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "updateDarknodePayment", _darknodePayment) } // UpdateDarknodePayment is a paid mutator transaction binding the contract method 0x71b4133c. // -// Solidity: function updateDarknodePayment(_darknodePayment address) returns() +// Solidity: function updateDarknodePayment(address _darknodePayment) returns() func (_DarknodeRegistry *DarknodeRegistrySession) UpdateDarknodePayment(_darknodePayment common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.UpdateDarknodePayment(&_DarknodeRegistry.TransactOpts, _darknodePayment) } // UpdateDarknodePayment is a paid mutator transaction binding the contract method 0x71b4133c. // -// Solidity: function updateDarknodePayment(_darknodePayment address) returns() +// Solidity: function updateDarknodePayment(address _darknodePayment) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) UpdateDarknodePayment(_darknodePayment common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.UpdateDarknodePayment(&_DarknodeRegistry.TransactOpts, _darknodePayment) } // UpdateMinimumBond is a paid mutator transaction binding the contract method 0x0ff9aafe. // -// Solidity: function updateMinimumBond(_nextMinimumBond uint256) returns() +// Solidity: function updateMinimumBond(uint256 _nextMinimumBond) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) UpdateMinimumBond(opts *bind.TransactOpts, _nextMinimumBond *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "updateMinimumBond", _nextMinimumBond) } // UpdateMinimumBond is a paid mutator transaction binding the contract method 0x0ff9aafe. // -// Solidity: function updateMinimumBond(_nextMinimumBond uint256) returns() +// Solidity: function updateMinimumBond(uint256 _nextMinimumBond) returns() func (_DarknodeRegistry *DarknodeRegistrySession) UpdateMinimumBond(_nextMinimumBond *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.Contract.UpdateMinimumBond(&_DarknodeRegistry.TransactOpts, _nextMinimumBond) } // UpdateMinimumBond is a paid mutator transaction binding the contract method 0x0ff9aafe. // -// Solidity: function updateMinimumBond(_nextMinimumBond uint256) returns() +// Solidity: function updateMinimumBond(uint256 _nextMinimumBond) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) UpdateMinimumBond(_nextMinimumBond *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.Contract.UpdateMinimumBond(&_DarknodeRegistry.TransactOpts, _nextMinimumBond) } // UpdateMinimumEpochInterval is a paid mutator transaction binding the contract method 0x63b851b9. // -// Solidity: function updateMinimumEpochInterval(_nextMinimumEpochInterval uint256) returns() +// Solidity: function updateMinimumEpochInterval(uint256 _nextMinimumEpochInterval) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) UpdateMinimumEpochInterval(opts *bind.TransactOpts, _nextMinimumEpochInterval *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "updateMinimumEpochInterval", _nextMinimumEpochInterval) } // UpdateMinimumEpochInterval is a paid mutator transaction binding the contract method 0x63b851b9. // -// Solidity: function updateMinimumEpochInterval(_nextMinimumEpochInterval uint256) returns() +// Solidity: function updateMinimumEpochInterval(uint256 _nextMinimumEpochInterval) returns() func (_DarknodeRegistry *DarknodeRegistrySession) UpdateMinimumEpochInterval(_nextMinimumEpochInterval *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.Contract.UpdateMinimumEpochInterval(&_DarknodeRegistry.TransactOpts, _nextMinimumEpochInterval) } // UpdateMinimumEpochInterval is a paid mutator transaction binding the contract method 0x63b851b9. // -// Solidity: function updateMinimumEpochInterval(_nextMinimumEpochInterval uint256) returns() +// Solidity: function updateMinimumEpochInterval(uint256 _nextMinimumEpochInterval) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) UpdateMinimumEpochInterval(_nextMinimumEpochInterval *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.Contract.UpdateMinimumEpochInterval(&_DarknodeRegistry.TransactOpts, _nextMinimumEpochInterval) } // UpdateMinimumPodSize is a paid mutator transaction binding the contract method 0x80a0c461. // -// Solidity: function updateMinimumPodSize(_nextMinimumPodSize uint256) returns() +// Solidity: function updateMinimumPodSize(uint256 _nextMinimumPodSize) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) UpdateMinimumPodSize(opts *bind.TransactOpts, _nextMinimumPodSize *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "updateMinimumPodSize", _nextMinimumPodSize) } // UpdateMinimumPodSize is a paid mutator transaction binding the contract method 0x80a0c461. // -// Solidity: function updateMinimumPodSize(_nextMinimumPodSize uint256) returns() +// Solidity: function updateMinimumPodSize(uint256 _nextMinimumPodSize) returns() func (_DarknodeRegistry *DarknodeRegistrySession) UpdateMinimumPodSize(_nextMinimumPodSize *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.Contract.UpdateMinimumPodSize(&_DarknodeRegistry.TransactOpts, _nextMinimumPodSize) } // UpdateMinimumPodSize is a paid mutator transaction binding the contract method 0x80a0c461. // -// Solidity: function updateMinimumPodSize(_nextMinimumPodSize uint256) returns() +// Solidity: function updateMinimumPodSize(uint256 _nextMinimumPodSize) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) UpdateMinimumPodSize(_nextMinimumPodSize *big.Int) (*types.Transaction, error) { return _DarknodeRegistry.Contract.UpdateMinimumPodSize(&_DarknodeRegistry.TransactOpts, _nextMinimumPodSize) } // UpdateSlasher is a paid mutator transaction binding the contract method 0xb3139d38. // -// Solidity: function updateSlasher(_slasher address) returns() +// Solidity: function updateSlasher(address _slasher) returns() func (_DarknodeRegistry *DarknodeRegistryTransactor) UpdateSlasher(opts *bind.TransactOpts, _slasher common.Address) (*types.Transaction, error) { return _DarknodeRegistry.contract.Transact(opts, "updateSlasher", _slasher) } // UpdateSlasher is a paid mutator transaction binding the contract method 0xb3139d38. // -// Solidity: function updateSlasher(_slasher address) returns() +// Solidity: function updateSlasher(address _slasher) returns() func (_DarknodeRegistry *DarknodeRegistrySession) UpdateSlasher(_slasher common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.UpdateSlasher(&_DarknodeRegistry.TransactOpts, _slasher) } // UpdateSlasher is a paid mutator transaction binding the contract method 0xb3139d38. // -// Solidity: function updateSlasher(_slasher address) returns() +// Solidity: function updateSlasher(address _slasher) returns() func (_DarknodeRegistry *DarknodeRegistryTransactorSession) UpdateSlasher(_slasher common.Address) (*types.Transaction, error) { return _DarknodeRegistry.Contract.UpdateSlasher(&_DarknodeRegistry.TransactOpts, _slasher) } @@ -1417,26 +1729,26 @@ func (it *DarknodeRegistryLogDarknodeDeregisteredIterator) Close() error { // DarknodeRegistryLogDarknodeDeregistered represents a LogDarknodeDeregistered event raised by the DarknodeRegistry contract. type DarknodeRegistryLogDarknodeDeregistered struct { - Operator common.Address - DarknodeID common.Address - Raw types.Log // Blockchain specific contextual infos + DarknodeOperator common.Address + DarknodeID common.Address + Raw types.Log // Blockchain specific contextual infos } // FilterLogDarknodeDeregistered is a free log retrieval operation binding the contract event 0xf73268ea792d9dbf3e21a95ec9711f0b535c5f6c99f6b4f54f6766838086b842. // -// Solidity: event LogDarknodeDeregistered(_operator indexed address, _darknodeID indexed address) -func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeDeregistered(opts *bind.FilterOpts, _operator []common.Address, _darknodeID []common.Address) (*DarknodeRegistryLogDarknodeDeregisteredIterator, error) { +// Solidity: event LogDarknodeDeregistered(address indexed _darknodeOperator, address indexed _darknodeID) +func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeDeregistered(opts *bind.FilterOpts, _darknodeOperator []common.Address, _darknodeID []common.Address) (*DarknodeRegistryLogDarknodeDeregisteredIterator, error) { - var _operatorRule []interface{} - for _, _operatorItem := range _operator { - _operatorRule = append(_operatorRule, _operatorItem) + var _darknodeOperatorRule []interface{} + for _, _darknodeOperatorItem := range _darknodeOperator { + _darknodeOperatorRule = append(_darknodeOperatorRule, _darknodeOperatorItem) } var _darknodeIDRule []interface{} for _, _darknodeIDItem := range _darknodeID { _darknodeIDRule = append(_darknodeIDRule, _darknodeIDItem) } - logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogDarknodeDeregistered", _operatorRule, _darknodeIDRule) + logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogDarknodeDeregistered", _darknodeOperatorRule, _darknodeIDRule) if err != nil { return nil, err } @@ -1445,19 +1757,19 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeDeregistered // WatchLogDarknodeDeregistered is a free log subscription operation binding the contract event 0xf73268ea792d9dbf3e21a95ec9711f0b535c5f6c99f6b4f54f6766838086b842. // -// Solidity: event LogDarknodeDeregistered(_operator indexed address, _darknodeID indexed address) -func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeDeregistered(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogDarknodeDeregistered, _operator []common.Address, _darknodeID []common.Address) (event.Subscription, error) { +// Solidity: event LogDarknodeDeregistered(address indexed _darknodeOperator, address indexed _darknodeID) +func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeDeregistered(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogDarknodeDeregistered, _darknodeOperator []common.Address, _darknodeID []common.Address) (event.Subscription, error) { - var _operatorRule []interface{} - for _, _operatorItem := range _operator { - _operatorRule = append(_operatorRule, _operatorItem) + var _darknodeOperatorRule []interface{} + for _, _darknodeOperatorItem := range _darknodeOperator { + _darknodeOperatorRule = append(_darknodeOperatorRule, _darknodeOperatorItem) } var _darknodeIDRule []interface{} for _, _darknodeIDItem := range _darknodeID { _darknodeIDRule = append(_darknodeIDRule, _darknodeIDItem) } - logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogDarknodeDeregistered", _operatorRule, _darknodeIDRule) + logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogDarknodeDeregistered", _darknodeOperatorRule, _darknodeIDRule) if err != nil { return nil, err } @@ -1489,9 +1801,21 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeDeregistered( }), nil } -// DarknodeRegistryLogDarknodeOwnerRefundedIterator is returned from FilterLogDarknodeOwnerRefunded and is used to iterate over the raw logs and unpacked data for LogDarknodeOwnerRefunded events raised by the DarknodeRegistry contract. -type DarknodeRegistryLogDarknodeOwnerRefundedIterator struct { - Event *DarknodeRegistryLogDarknodeOwnerRefunded // Event containing the contract specifics and raw log +// ParseLogDarknodeDeregistered is a log parse operation binding the contract event 0xf73268ea792d9dbf3e21a95ec9711f0b535c5f6c99f6b4f54f6766838086b842. +// +// Solidity: event LogDarknodeDeregistered(address indexed _darknodeOperator, address indexed _darknodeID) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseLogDarknodeDeregistered(log types.Log) (*DarknodeRegistryLogDarknodeDeregistered, error) { + event := new(DarknodeRegistryLogDarknodeDeregistered) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogDarknodeDeregistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// DarknodeRegistryLogDarknodePaymentUpdatedIterator is returned from FilterLogDarknodePaymentUpdated and is used to iterate over the raw logs and unpacked data for LogDarknodePaymentUpdated events raised by the DarknodeRegistry contract. +type DarknodeRegistryLogDarknodePaymentUpdatedIterator struct { + Event *DarknodeRegistryLogDarknodePaymentUpdated // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1505,7 +1829,7 @@ type DarknodeRegistryLogDarknodeOwnerRefundedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *DarknodeRegistryLogDarknodeOwnerRefundedIterator) Next() bool { +func (it *DarknodeRegistryLogDarknodePaymentUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1514,7 +1838,7 @@ func (it *DarknodeRegistryLogDarknodeOwnerRefundedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(DarknodeRegistryLogDarknodeOwnerRefunded) + it.Event = new(DarknodeRegistryLogDarknodePaymentUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1529,7 +1853,7 @@ func (it *DarknodeRegistryLogDarknodeOwnerRefundedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(DarknodeRegistryLogDarknodeOwnerRefunded) + it.Event = new(DarknodeRegistryLogDarknodePaymentUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1545,52 +1869,60 @@ func (it *DarknodeRegistryLogDarknodeOwnerRefundedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *DarknodeRegistryLogDarknodeOwnerRefundedIterator) Error() error { +func (it *DarknodeRegistryLogDarknodePaymentUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *DarknodeRegistryLogDarknodeOwnerRefundedIterator) Close() error { +func (it *DarknodeRegistryLogDarknodePaymentUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// DarknodeRegistryLogDarknodeOwnerRefunded represents a LogDarknodeOwnerRefunded event raised by the DarknodeRegistry contract. -type DarknodeRegistryLogDarknodeOwnerRefunded struct { - Operator common.Address - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos +// DarknodeRegistryLogDarknodePaymentUpdated represents a LogDarknodePaymentUpdated event raised by the DarknodeRegistry contract. +type DarknodeRegistryLogDarknodePaymentUpdated struct { + PreviousDarknodePayment common.Address + NextDarknodePayment common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterLogDarknodeOwnerRefunded is a free log retrieval operation binding the contract event 0x96ab9e56c79eee4a72db6e2879cbfbecdba5c65b411f4861824e66b89df19764. +// FilterLogDarknodePaymentUpdated is a free log retrieval operation binding the contract event 0xe3e25a79a5ba7c894fcc55794b2712e225537e89f777b9b9df307cc5504ba0e9. // -// Solidity: event LogDarknodeOwnerRefunded(_operator indexed address, _amount uint256) -func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeOwnerRefunded(opts *bind.FilterOpts, _operator []common.Address) (*DarknodeRegistryLogDarknodeOwnerRefundedIterator, error) { +// Solidity: event LogDarknodePaymentUpdated(address indexed _previousDarknodePayment, address indexed _nextDarknodePayment) +func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodePaymentUpdated(opts *bind.FilterOpts, _previousDarknodePayment []common.Address, _nextDarknodePayment []common.Address) (*DarknodeRegistryLogDarknodePaymentUpdatedIterator, error) { - var _operatorRule []interface{} - for _, _operatorItem := range _operator { - _operatorRule = append(_operatorRule, _operatorItem) + var _previousDarknodePaymentRule []interface{} + for _, _previousDarknodePaymentItem := range _previousDarknodePayment { + _previousDarknodePaymentRule = append(_previousDarknodePaymentRule, _previousDarknodePaymentItem) + } + var _nextDarknodePaymentRule []interface{} + for _, _nextDarknodePaymentItem := range _nextDarknodePayment { + _nextDarknodePaymentRule = append(_nextDarknodePaymentRule, _nextDarknodePaymentItem) } - logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogDarknodeOwnerRefunded", _operatorRule) + logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogDarknodePaymentUpdated", _previousDarknodePaymentRule, _nextDarknodePaymentRule) if err != nil { return nil, err } - return &DarknodeRegistryLogDarknodeOwnerRefundedIterator{contract: _DarknodeRegistry.contract, event: "LogDarknodeOwnerRefunded", logs: logs, sub: sub}, nil + return &DarknodeRegistryLogDarknodePaymentUpdatedIterator{contract: _DarknodeRegistry.contract, event: "LogDarknodePaymentUpdated", logs: logs, sub: sub}, nil } -// WatchLogDarknodeOwnerRefunded is a free log subscription operation binding the contract event 0x96ab9e56c79eee4a72db6e2879cbfbecdba5c65b411f4861824e66b89df19764. +// WatchLogDarknodePaymentUpdated is a free log subscription operation binding the contract event 0xe3e25a79a5ba7c894fcc55794b2712e225537e89f777b9b9df307cc5504ba0e9. // -// Solidity: event LogDarknodeOwnerRefunded(_operator indexed address, _amount uint256) -func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeOwnerRefunded(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogDarknodeOwnerRefunded, _operator []common.Address) (event.Subscription, error) { +// Solidity: event LogDarknodePaymentUpdated(address indexed _previousDarknodePayment, address indexed _nextDarknodePayment) +func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodePaymentUpdated(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogDarknodePaymentUpdated, _previousDarknodePayment []common.Address, _nextDarknodePayment []common.Address) (event.Subscription, error) { - var _operatorRule []interface{} - for _, _operatorItem := range _operator { - _operatorRule = append(_operatorRule, _operatorItem) + var _previousDarknodePaymentRule []interface{} + for _, _previousDarknodePaymentItem := range _previousDarknodePayment { + _previousDarknodePaymentRule = append(_previousDarknodePaymentRule, _previousDarknodePaymentItem) + } + var _nextDarknodePaymentRule []interface{} + for _, _nextDarknodePaymentItem := range _nextDarknodePayment { + _nextDarknodePaymentRule = append(_nextDarknodePaymentRule, _nextDarknodePaymentItem) } - logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogDarknodeOwnerRefunded", _operatorRule) + logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogDarknodePaymentUpdated", _previousDarknodePaymentRule, _nextDarknodePaymentRule) if err != nil { return nil, err } @@ -1600,8 +1932,8 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeOwnerRefunded select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(DarknodeRegistryLogDarknodeOwnerRefunded) - if err := _DarknodeRegistry.contract.UnpackLog(event, "LogDarknodeOwnerRefunded", log); err != nil { + event := new(DarknodeRegistryLogDarknodePaymentUpdated) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogDarknodePaymentUpdated", log); err != nil { return err } event.Raw = log @@ -1622,9 +1954,21 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeOwnerRefunded }), nil } -// DarknodeRegistryLogDarknodePaymentUpdatedIterator is returned from FilterLogDarknodePaymentUpdated and is used to iterate over the raw logs and unpacked data for LogDarknodePaymentUpdated events raised by the DarknodeRegistry contract. -type DarknodeRegistryLogDarknodePaymentUpdatedIterator struct { - Event *DarknodeRegistryLogDarknodePaymentUpdated // Event containing the contract specifics and raw log +// ParseLogDarknodePaymentUpdated is a log parse operation binding the contract event 0xe3e25a79a5ba7c894fcc55794b2712e225537e89f777b9b9df307cc5504ba0e9. +// +// Solidity: event LogDarknodePaymentUpdated(address indexed _previousDarknodePayment, address indexed _nextDarknodePayment) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseLogDarknodePaymentUpdated(log types.Log) (*DarknodeRegistryLogDarknodePaymentUpdated, error) { + event := new(DarknodeRegistryLogDarknodePaymentUpdated) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogDarknodePaymentUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// DarknodeRegistryLogDarknodeRefundedIterator is returned from FilterLogDarknodeRefunded and is used to iterate over the raw logs and unpacked data for LogDarknodeRefunded events raised by the DarknodeRegistry contract. +type DarknodeRegistryLogDarknodeRefundedIterator struct { + Event *DarknodeRegistryLogDarknodeRefunded // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1638,7 +1982,7 @@ type DarknodeRegistryLogDarknodePaymentUpdatedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *DarknodeRegistryLogDarknodePaymentUpdatedIterator) Next() bool { +func (it *DarknodeRegistryLogDarknodeRefundedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1647,7 +1991,7 @@ func (it *DarknodeRegistryLogDarknodePaymentUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(DarknodeRegistryLogDarknodePaymentUpdated) + it.Event = new(DarknodeRegistryLogDarknodeRefunded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1662,7 +2006,7 @@ func (it *DarknodeRegistryLogDarknodePaymentUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(DarknodeRegistryLogDarknodePaymentUpdated) + it.Event = new(DarknodeRegistryLogDarknodeRefunded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1678,42 +2022,61 @@ func (it *DarknodeRegistryLogDarknodePaymentUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *DarknodeRegistryLogDarknodePaymentUpdatedIterator) Error() error { +func (it *DarknodeRegistryLogDarknodeRefundedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *DarknodeRegistryLogDarknodePaymentUpdatedIterator) Close() error { +func (it *DarknodeRegistryLogDarknodeRefundedIterator) Close() error { it.sub.Unsubscribe() return nil } -// DarknodeRegistryLogDarknodePaymentUpdated represents a LogDarknodePaymentUpdated event raised by the DarknodeRegistry contract. -type DarknodeRegistryLogDarknodePaymentUpdated struct { - PreviousDarknodePayment common.Address - NextDarknodePayment common.Address - Raw types.Log // Blockchain specific contextual infos +// DarknodeRegistryLogDarknodeRefunded represents a LogDarknodeRefunded event raised by the DarknodeRegistry contract. +type DarknodeRegistryLogDarknodeRefunded struct { + DarknodeOperator common.Address + DarknodeID common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterLogDarknodePaymentUpdated is a free log retrieval operation binding the contract event 0xe3e25a79a5ba7c894fcc55794b2712e225537e89f777b9b9df307cc5504ba0e9. +// FilterLogDarknodeRefunded is a free log retrieval operation binding the contract event 0x3eeec3803912dfbf607c8488e8aee15f415e51c9936250a5142642c9e470c128. // -// Solidity: event LogDarknodePaymentUpdated(_previousDarknodePayment address, _nextDarknodePayment address) -func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodePaymentUpdated(opts *bind.FilterOpts) (*DarknodeRegistryLogDarknodePaymentUpdatedIterator, error) { +// Solidity: event LogDarknodeRefunded(address indexed _darknodeOperator, address indexed _darknodeID, uint256 _amount) +func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeRefunded(opts *bind.FilterOpts, _darknodeOperator []common.Address, _darknodeID []common.Address) (*DarknodeRegistryLogDarknodeRefundedIterator, error) { + + var _darknodeOperatorRule []interface{} + for _, _darknodeOperatorItem := range _darknodeOperator { + _darknodeOperatorRule = append(_darknodeOperatorRule, _darknodeOperatorItem) + } + var _darknodeIDRule []interface{} + for _, _darknodeIDItem := range _darknodeID { + _darknodeIDRule = append(_darknodeIDRule, _darknodeIDItem) + } - logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogDarknodePaymentUpdated") + logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogDarknodeRefunded", _darknodeOperatorRule, _darknodeIDRule) if err != nil { return nil, err } - return &DarknodeRegistryLogDarknodePaymentUpdatedIterator{contract: _DarknodeRegistry.contract, event: "LogDarknodePaymentUpdated", logs: logs, sub: sub}, nil + return &DarknodeRegistryLogDarknodeRefundedIterator{contract: _DarknodeRegistry.contract, event: "LogDarknodeRefunded", logs: logs, sub: sub}, nil } -// WatchLogDarknodePaymentUpdated is a free log subscription operation binding the contract event 0xe3e25a79a5ba7c894fcc55794b2712e225537e89f777b9b9df307cc5504ba0e9. +// WatchLogDarknodeRefunded is a free log subscription operation binding the contract event 0x3eeec3803912dfbf607c8488e8aee15f415e51c9936250a5142642c9e470c128. // -// Solidity: event LogDarknodePaymentUpdated(_previousDarknodePayment address, _nextDarknodePayment address) -func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodePaymentUpdated(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogDarknodePaymentUpdated) (event.Subscription, error) { +// Solidity: event LogDarknodeRefunded(address indexed _darknodeOperator, address indexed _darknodeID, uint256 _amount) +func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeRefunded(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogDarknodeRefunded, _darknodeOperator []common.Address, _darknodeID []common.Address) (event.Subscription, error) { - logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogDarknodePaymentUpdated") + var _darknodeOperatorRule []interface{} + for _, _darknodeOperatorItem := range _darknodeOperator { + _darknodeOperatorRule = append(_darknodeOperatorRule, _darknodeOperatorItem) + } + var _darknodeIDRule []interface{} + for _, _darknodeIDItem := range _darknodeID { + _darknodeIDRule = append(_darknodeIDRule, _darknodeIDItem) + } + + logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogDarknodeRefunded", _darknodeOperatorRule, _darknodeIDRule) if err != nil { return nil, err } @@ -1723,8 +2086,8 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodePaymentUpdate select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(DarknodeRegistryLogDarknodePaymentUpdated) - if err := _DarknodeRegistry.contract.UnpackLog(event, "LogDarknodePaymentUpdated", log); err != nil { + event := new(DarknodeRegistryLogDarknodeRefunded) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogDarknodeRefunded", log); err != nil { return err } event.Raw = log @@ -1745,6 +2108,18 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodePaymentUpdate }), nil } +// ParseLogDarknodeRefunded is a log parse operation binding the contract event 0x3eeec3803912dfbf607c8488e8aee15f415e51c9936250a5142642c9e470c128. +// +// Solidity: event LogDarknodeRefunded(address indexed _darknodeOperator, address indexed _darknodeID, uint256 _amount) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseLogDarknodeRefunded(log types.Log) (*DarknodeRegistryLogDarknodeRefunded, error) { + event := new(DarknodeRegistryLogDarknodeRefunded) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogDarknodeRefunded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // DarknodeRegistryLogDarknodeRegisteredIterator is returned from FilterLogDarknodeRegistered and is used to iterate over the raw logs and unpacked data for LogDarknodeRegistered events raised by the DarknodeRegistry contract. type DarknodeRegistryLogDarknodeRegisteredIterator struct { Event *DarknodeRegistryLogDarknodeRegistered // Event containing the contract specifics and raw log @@ -1814,27 +2189,27 @@ func (it *DarknodeRegistryLogDarknodeRegisteredIterator) Close() error { // DarknodeRegistryLogDarknodeRegistered represents a LogDarknodeRegistered event raised by the DarknodeRegistry contract. type DarknodeRegistryLogDarknodeRegistered struct { - Operator common.Address - DarknodeID common.Address - Bond *big.Int - Raw types.Log // Blockchain specific contextual infos + DarknodeOperator common.Address + DarknodeID common.Address + Bond *big.Int + Raw types.Log // Blockchain specific contextual infos } // FilterLogDarknodeRegistered is a free log retrieval operation binding the contract event 0x7c56cb7f63b6922d24414bf7c2b2c40c7ea1ea637c3f400efa766a85ecf2f093. // -// Solidity: event LogDarknodeRegistered(_operator indexed address, _darknodeID indexed address, _bond uint256) -func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeRegistered(opts *bind.FilterOpts, _operator []common.Address, _darknodeID []common.Address) (*DarknodeRegistryLogDarknodeRegisteredIterator, error) { +// Solidity: event LogDarknodeRegistered(address indexed _darknodeOperator, address indexed _darknodeID, uint256 _bond) +func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeRegistered(opts *bind.FilterOpts, _darknodeOperator []common.Address, _darknodeID []common.Address) (*DarknodeRegistryLogDarknodeRegisteredIterator, error) { - var _operatorRule []interface{} - for _, _operatorItem := range _operator { - _operatorRule = append(_operatorRule, _operatorItem) + var _darknodeOperatorRule []interface{} + for _, _darknodeOperatorItem := range _darknodeOperator { + _darknodeOperatorRule = append(_darknodeOperatorRule, _darknodeOperatorItem) } var _darknodeIDRule []interface{} for _, _darknodeIDItem := range _darknodeID { _darknodeIDRule = append(_darknodeIDRule, _darknodeIDItem) } - logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogDarknodeRegistered", _operatorRule, _darknodeIDRule) + logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogDarknodeRegistered", _darknodeOperatorRule, _darknodeIDRule) if err != nil { return nil, err } @@ -1843,19 +2218,19 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeRegistered(o // WatchLogDarknodeRegistered is a free log subscription operation binding the contract event 0x7c56cb7f63b6922d24414bf7c2b2c40c7ea1ea637c3f400efa766a85ecf2f093. // -// Solidity: event LogDarknodeRegistered(_operator indexed address, _darknodeID indexed address, _bond uint256) -func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeRegistered(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogDarknodeRegistered, _operator []common.Address, _darknodeID []common.Address) (event.Subscription, error) { +// Solidity: event LogDarknodeRegistered(address indexed _darknodeOperator, address indexed _darknodeID, uint256 _bond) +func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeRegistered(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogDarknodeRegistered, _darknodeOperator []common.Address, _darknodeID []common.Address) (event.Subscription, error) { - var _operatorRule []interface{} - for _, _operatorItem := range _operator { - _operatorRule = append(_operatorRule, _operatorItem) + var _darknodeOperatorRule []interface{} + for _, _darknodeOperatorItem := range _darknodeOperator { + _darknodeOperatorRule = append(_darknodeOperatorRule, _darknodeOperatorItem) } var _darknodeIDRule []interface{} for _, _darknodeIDItem := range _darknodeID { _darknodeIDRule = append(_darknodeIDRule, _darknodeIDItem) } - logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogDarknodeRegistered", _operatorRule, _darknodeIDRule) + logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogDarknodeRegistered", _darknodeOperatorRule, _darknodeIDRule) if err != nil { return nil, err } @@ -1887,6 +2262,18 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeRegistered(op }), nil } +// ParseLogDarknodeRegistered is a log parse operation binding the contract event 0x7c56cb7f63b6922d24414bf7c2b2c40c7ea1ea637c3f400efa766a85ecf2f093. +// +// Solidity: event LogDarknodeRegistered(address indexed _darknodeOperator, address indexed _darknodeID, uint256 _bond) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseLogDarknodeRegistered(log types.Log) (*DarknodeRegistryLogDarknodeRegistered, error) { + event := new(DarknodeRegistryLogDarknodeRegistered) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogDarknodeRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // DarknodeRegistryLogDarknodeSlashedIterator is returned from FilterLogDarknodeSlashed and is used to iterate over the raw logs and unpacked data for LogDarknodeSlashed events raised by the DarknodeRegistry contract. type DarknodeRegistryLogDarknodeSlashedIterator struct { Event *DarknodeRegistryLogDarknodeSlashed // Event containing the contract specifics and raw log @@ -1956,21 +2343,21 @@ func (it *DarknodeRegistryLogDarknodeSlashedIterator) Close() error { // DarknodeRegistryLogDarknodeSlashed represents a LogDarknodeSlashed event raised by the DarknodeRegistry contract. type DarknodeRegistryLogDarknodeSlashed struct { - Operator common.Address - DarknodeID common.Address - Challenger common.Address - Percentage *big.Int - Raw types.Log // Blockchain specific contextual infos + DarknodeOperator common.Address + DarknodeID common.Address + Challenger common.Address + Percentage *big.Int + Raw types.Log // Blockchain specific contextual infos } // FilterLogDarknodeSlashed is a free log retrieval operation binding the contract event 0xb43e0cc88b4d6ae901c6c99d1b58769cb8c9ded8e6f20a0d3712d09bf9e1ea77. // -// Solidity: event LogDarknodeSlashed(_operator indexed address, _darknodeID indexed address, _challenger indexed address, _percentage uint256) -func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeSlashed(opts *bind.FilterOpts, _operator []common.Address, _darknodeID []common.Address, _challenger []common.Address) (*DarknodeRegistryLogDarknodeSlashedIterator, error) { +// Solidity: event LogDarknodeSlashed(address indexed _darknodeOperator, address indexed _darknodeID, address indexed _challenger, uint256 _percentage) +func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeSlashed(opts *bind.FilterOpts, _darknodeOperator []common.Address, _darknodeID []common.Address, _challenger []common.Address) (*DarknodeRegistryLogDarknodeSlashedIterator, error) { - var _operatorRule []interface{} - for _, _operatorItem := range _operator { - _operatorRule = append(_operatorRule, _operatorItem) + var _darknodeOperatorRule []interface{} + for _, _darknodeOperatorItem := range _darknodeOperator { + _darknodeOperatorRule = append(_darknodeOperatorRule, _darknodeOperatorItem) } var _darknodeIDRule []interface{} for _, _darknodeIDItem := range _darknodeID { @@ -1981,7 +2368,7 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeSlashed(opts _challengerRule = append(_challengerRule, _challengerItem) } - logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogDarknodeSlashed", _operatorRule, _darknodeIDRule, _challengerRule) + logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogDarknodeSlashed", _darknodeOperatorRule, _darknodeIDRule, _challengerRule) if err != nil { return nil, err } @@ -1990,12 +2377,12 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogDarknodeSlashed(opts // WatchLogDarknodeSlashed is a free log subscription operation binding the contract event 0xb43e0cc88b4d6ae901c6c99d1b58769cb8c9ded8e6f20a0d3712d09bf9e1ea77. // -// Solidity: event LogDarknodeSlashed(_operator indexed address, _darknodeID indexed address, _challenger indexed address, _percentage uint256) -func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeSlashed(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogDarknodeSlashed, _operator []common.Address, _darknodeID []common.Address, _challenger []common.Address) (event.Subscription, error) { +// Solidity: event LogDarknodeSlashed(address indexed _darknodeOperator, address indexed _darknodeID, address indexed _challenger, uint256 _percentage) +func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeSlashed(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogDarknodeSlashed, _darknodeOperator []common.Address, _darknodeID []common.Address, _challenger []common.Address) (event.Subscription, error) { - var _operatorRule []interface{} - for _, _operatorItem := range _operator { - _operatorRule = append(_operatorRule, _operatorItem) + var _darknodeOperatorRule []interface{} + for _, _darknodeOperatorItem := range _darknodeOperator { + _darknodeOperatorRule = append(_darknodeOperatorRule, _darknodeOperatorItem) } var _darknodeIDRule []interface{} for _, _darknodeIDItem := range _darknodeID { @@ -2006,7 +2393,7 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeSlashed(opts _challengerRule = append(_challengerRule, _challengerItem) } - logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogDarknodeSlashed", _operatorRule, _darknodeIDRule, _challengerRule) + logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogDarknodeSlashed", _darknodeOperatorRule, _darknodeIDRule, _challengerRule) if err != nil { return nil, err } @@ -2038,6 +2425,18 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogDarknodeSlashed(opts }), nil } +// ParseLogDarknodeSlashed is a log parse operation binding the contract event 0xb43e0cc88b4d6ae901c6c99d1b58769cb8c9ded8e6f20a0d3712d09bf9e1ea77. +// +// Solidity: event LogDarknodeSlashed(address indexed _darknodeOperator, address indexed _darknodeID, address indexed _challenger, uint256 _percentage) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseLogDarknodeSlashed(log types.Log) (*DarknodeRegistryLogDarknodeSlashed, error) { + event := new(DarknodeRegistryLogDarknodeSlashed) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogDarknodeSlashed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // DarknodeRegistryLogMinimumBondUpdatedIterator is returned from FilterLogMinimumBondUpdated and is used to iterate over the raw logs and unpacked data for LogMinimumBondUpdated events raised by the DarknodeRegistry contract. type DarknodeRegistryLogMinimumBondUpdatedIterator struct { Event *DarknodeRegistryLogMinimumBondUpdated // Event containing the contract specifics and raw log @@ -2114,7 +2513,7 @@ type DarknodeRegistryLogMinimumBondUpdated struct { // FilterLogMinimumBondUpdated is a free log retrieval operation binding the contract event 0x7c77c94944e9e4e5b0d46f1297127d060020792687cd743401d782346c68f655. // -// Solidity: event LogMinimumBondUpdated(_previousMinimumBond uint256, _nextMinimumBond uint256) +// Solidity: event LogMinimumBondUpdated(uint256 _previousMinimumBond, uint256 _nextMinimumBond) func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogMinimumBondUpdated(opts *bind.FilterOpts) (*DarknodeRegistryLogMinimumBondUpdatedIterator, error) { logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogMinimumBondUpdated") @@ -2126,7 +2525,7 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogMinimumBondUpdated(o // WatchLogMinimumBondUpdated is a free log subscription operation binding the contract event 0x7c77c94944e9e4e5b0d46f1297127d060020792687cd743401d782346c68f655. // -// Solidity: event LogMinimumBondUpdated(_previousMinimumBond uint256, _nextMinimumBond uint256) +// Solidity: event LogMinimumBondUpdated(uint256 _previousMinimumBond, uint256 _nextMinimumBond) func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogMinimumBondUpdated(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogMinimumBondUpdated) (event.Subscription, error) { logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogMinimumBondUpdated") @@ -2161,6 +2560,18 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogMinimumBondUpdated(op }), nil } +// ParseLogMinimumBondUpdated is a log parse operation binding the contract event 0x7c77c94944e9e4e5b0d46f1297127d060020792687cd743401d782346c68f655. +// +// Solidity: event LogMinimumBondUpdated(uint256 _previousMinimumBond, uint256 _nextMinimumBond) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseLogMinimumBondUpdated(log types.Log) (*DarknodeRegistryLogMinimumBondUpdated, error) { + event := new(DarknodeRegistryLogMinimumBondUpdated) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogMinimumBondUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // DarknodeRegistryLogMinimumEpochIntervalUpdatedIterator is returned from FilterLogMinimumEpochIntervalUpdated and is used to iterate over the raw logs and unpacked data for LogMinimumEpochIntervalUpdated events raised by the DarknodeRegistry contract. type DarknodeRegistryLogMinimumEpochIntervalUpdatedIterator struct { Event *DarknodeRegistryLogMinimumEpochIntervalUpdated // Event containing the contract specifics and raw log @@ -2237,7 +2648,7 @@ type DarknodeRegistryLogMinimumEpochIntervalUpdated struct { // FilterLogMinimumEpochIntervalUpdated is a free log retrieval operation binding the contract event 0xb218cde2730b79a0667ddf869466ee66a12ef56fe65fa4986a590f8a7108c9de. // -// Solidity: event LogMinimumEpochIntervalUpdated(_previousMinimumEpochInterval uint256, _nextMinimumEpochInterval uint256) +// Solidity: event LogMinimumEpochIntervalUpdated(uint256 _previousMinimumEpochInterval, uint256 _nextMinimumEpochInterval) func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogMinimumEpochIntervalUpdated(opts *bind.FilterOpts) (*DarknodeRegistryLogMinimumEpochIntervalUpdatedIterator, error) { logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogMinimumEpochIntervalUpdated") @@ -2249,7 +2660,7 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogMinimumEpochInterval // WatchLogMinimumEpochIntervalUpdated is a free log subscription operation binding the contract event 0xb218cde2730b79a0667ddf869466ee66a12ef56fe65fa4986a590f8a7108c9de. // -// Solidity: event LogMinimumEpochIntervalUpdated(_previousMinimumEpochInterval uint256, _nextMinimumEpochInterval uint256) +// Solidity: event LogMinimumEpochIntervalUpdated(uint256 _previousMinimumEpochInterval, uint256 _nextMinimumEpochInterval) func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogMinimumEpochIntervalUpdated(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogMinimumEpochIntervalUpdated) (event.Subscription, error) { logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogMinimumEpochIntervalUpdated") @@ -2284,6 +2695,18 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogMinimumEpochIntervalU }), nil } +// ParseLogMinimumEpochIntervalUpdated is a log parse operation binding the contract event 0xb218cde2730b79a0667ddf869466ee66a12ef56fe65fa4986a590f8a7108c9de. +// +// Solidity: event LogMinimumEpochIntervalUpdated(uint256 _previousMinimumEpochInterval, uint256 _nextMinimumEpochInterval) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseLogMinimumEpochIntervalUpdated(log types.Log) (*DarknodeRegistryLogMinimumEpochIntervalUpdated, error) { + event := new(DarknodeRegistryLogMinimumEpochIntervalUpdated) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogMinimumEpochIntervalUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // DarknodeRegistryLogMinimumPodSizeUpdatedIterator is returned from FilterLogMinimumPodSizeUpdated and is used to iterate over the raw logs and unpacked data for LogMinimumPodSizeUpdated events raised by the DarknodeRegistry contract. type DarknodeRegistryLogMinimumPodSizeUpdatedIterator struct { Event *DarknodeRegistryLogMinimumPodSizeUpdated // Event containing the contract specifics and raw log @@ -2360,7 +2783,7 @@ type DarknodeRegistryLogMinimumPodSizeUpdated struct { // FilterLogMinimumPodSizeUpdated is a free log retrieval operation binding the contract event 0x6d520e46e5714982ddf8cb6216bcb3e1c1d5b79d337afc305335f819394f5d6a. // -// Solidity: event LogMinimumPodSizeUpdated(_previousMinimumPodSize uint256, _nextMinimumPodSize uint256) +// Solidity: event LogMinimumPodSizeUpdated(uint256 _previousMinimumPodSize, uint256 _nextMinimumPodSize) func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogMinimumPodSizeUpdated(opts *bind.FilterOpts) (*DarknodeRegistryLogMinimumPodSizeUpdatedIterator, error) { logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogMinimumPodSizeUpdated") @@ -2372,7 +2795,7 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogMinimumPodSizeUpdate // WatchLogMinimumPodSizeUpdated is a free log subscription operation binding the contract event 0x6d520e46e5714982ddf8cb6216bcb3e1c1d5b79d337afc305335f819394f5d6a. // -// Solidity: event LogMinimumPodSizeUpdated(_previousMinimumPodSize uint256, _nextMinimumPodSize uint256) +// Solidity: event LogMinimumPodSizeUpdated(uint256 _previousMinimumPodSize, uint256 _nextMinimumPodSize) func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogMinimumPodSizeUpdated(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogMinimumPodSizeUpdated) (event.Subscription, error) { logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogMinimumPodSizeUpdated") @@ -2407,6 +2830,18 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogMinimumPodSizeUpdated }), nil } +// ParseLogMinimumPodSizeUpdated is a log parse operation binding the contract event 0x6d520e46e5714982ddf8cb6216bcb3e1c1d5b79d337afc305335f819394f5d6a. +// +// Solidity: event LogMinimumPodSizeUpdated(uint256 _previousMinimumPodSize, uint256 _nextMinimumPodSize) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseLogMinimumPodSizeUpdated(log types.Log) (*DarknodeRegistryLogMinimumPodSizeUpdated, error) { + event := new(DarknodeRegistryLogMinimumPodSizeUpdated) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogMinimumPodSizeUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // DarknodeRegistryLogNewEpochIterator is returned from FilterLogNewEpoch and is used to iterate over the raw logs and unpacked data for LogNewEpoch events raised by the DarknodeRegistry contract. type DarknodeRegistryLogNewEpochIterator struct { Event *DarknodeRegistryLogNewEpoch // Event containing the contract specifics and raw log @@ -2482,7 +2917,7 @@ type DarknodeRegistryLogNewEpoch struct { // FilterLogNewEpoch is a free log retrieval operation binding the contract event 0xaf2fc4796f2932ce294c3684deffe5098d3ef65dc2dd64efa80ef94eed88b01e. // -// Solidity: event LogNewEpoch(epochhash indexed uint256) +// Solidity: event LogNewEpoch(uint256 indexed epochhash) func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogNewEpoch(opts *bind.FilterOpts, epochhash []*big.Int) (*DarknodeRegistryLogNewEpochIterator, error) { var epochhashRule []interface{} @@ -2499,7 +2934,7 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogNewEpoch(opts *bind. // WatchLogNewEpoch is a free log subscription operation binding the contract event 0xaf2fc4796f2932ce294c3684deffe5098d3ef65dc2dd64efa80ef94eed88b01e. // -// Solidity: event LogNewEpoch(epochhash indexed uint256) +// Solidity: event LogNewEpoch(uint256 indexed epochhash) func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogNewEpoch(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogNewEpoch, epochhash []*big.Int) (event.Subscription, error) { var epochhashRule []interface{} @@ -2539,6 +2974,18 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogNewEpoch(opts *bind.W }), nil } +// ParseLogNewEpoch is a log parse operation binding the contract event 0xaf2fc4796f2932ce294c3684deffe5098d3ef65dc2dd64efa80ef94eed88b01e. +// +// Solidity: event LogNewEpoch(uint256 indexed epochhash) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseLogNewEpoch(log types.Log) (*DarknodeRegistryLogNewEpoch, error) { + event := new(DarknodeRegistryLogNewEpoch) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogNewEpoch", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // DarknodeRegistryLogSlasherUpdatedIterator is returned from FilterLogSlasherUpdated and is used to iterate over the raw logs and unpacked data for LogSlasherUpdated events raised by the DarknodeRegistry contract. type DarknodeRegistryLogSlasherUpdatedIterator struct { Event *DarknodeRegistryLogSlasherUpdated // Event containing the contract specifics and raw log @@ -2615,10 +3062,19 @@ type DarknodeRegistryLogSlasherUpdated struct { // FilterLogSlasherUpdated is a free log retrieval operation binding the contract event 0x933228a1c3ba8fadd3ce47a9db5b898be647f89af99ba7c1b9a655f59ea306c8. // -// Solidity: event LogSlasherUpdated(_previousSlasher address, _nextSlasher address) -func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogSlasherUpdated(opts *bind.FilterOpts) (*DarknodeRegistryLogSlasherUpdatedIterator, error) { +// Solidity: event LogSlasherUpdated(address indexed _previousSlasher, address indexed _nextSlasher) +func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogSlasherUpdated(opts *bind.FilterOpts, _previousSlasher []common.Address, _nextSlasher []common.Address) (*DarknodeRegistryLogSlasherUpdatedIterator, error) { - logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogSlasherUpdated") + var _previousSlasherRule []interface{} + for _, _previousSlasherItem := range _previousSlasher { + _previousSlasherRule = append(_previousSlasherRule, _previousSlasherItem) + } + var _nextSlasherRule []interface{} + for _, _nextSlasherItem := range _nextSlasher { + _nextSlasherRule = append(_nextSlasherRule, _nextSlasherItem) + } + + logs, sub, err := _DarknodeRegistry.contract.FilterLogs(opts, "LogSlasherUpdated", _previousSlasherRule, _nextSlasherRule) if err != nil { return nil, err } @@ -2627,10 +3083,19 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterLogSlasherUpdated(opts // WatchLogSlasherUpdated is a free log subscription operation binding the contract event 0x933228a1c3ba8fadd3ce47a9db5b898be647f89af99ba7c1b9a655f59ea306c8. // -// Solidity: event LogSlasherUpdated(_previousSlasher address, _nextSlasher address) -func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogSlasherUpdated(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogSlasherUpdated) (event.Subscription, error) { +// Solidity: event LogSlasherUpdated(address indexed _previousSlasher, address indexed _nextSlasher) +func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogSlasherUpdated(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryLogSlasherUpdated, _previousSlasher []common.Address, _nextSlasher []common.Address) (event.Subscription, error) { + + var _previousSlasherRule []interface{} + for _, _previousSlasherItem := range _previousSlasher { + _previousSlasherRule = append(_previousSlasherRule, _previousSlasherItem) + } + var _nextSlasherRule []interface{} + for _, _nextSlasherItem := range _nextSlasher { + _nextSlasherRule = append(_nextSlasherRule, _nextSlasherItem) + } - logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogSlasherUpdated") + logs, sub, err := _DarknodeRegistry.contract.WatchLogs(opts, "LogSlasherUpdated", _previousSlasherRule, _nextSlasherRule) if err != nil { return nil, err } @@ -2662,6 +3127,18 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchLogSlasherUpdated(opts * }), nil } +// ParseLogSlasherUpdated is a log parse operation binding the contract event 0x933228a1c3ba8fadd3ce47a9db5b898be647f89af99ba7c1b9a655f59ea306c8. +// +// Solidity: event LogSlasherUpdated(address indexed _previousSlasher, address indexed _nextSlasher) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseLogSlasherUpdated(log types.Log) (*DarknodeRegistryLogSlasherUpdated, error) { + event := new(DarknodeRegistryLogSlasherUpdated) + if err := _DarknodeRegistry.contract.UnpackLog(event, "LogSlasherUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // DarknodeRegistryOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the DarknodeRegistry contract. type DarknodeRegistryOwnershipTransferredIterator struct { Event *DarknodeRegistryOwnershipTransferred // Event containing the contract specifics and raw log @@ -2738,7 +3215,7 @@ type DarknodeRegistryOwnershipTransferred struct { // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: event OwnershipTransferred(previousOwner indexed address, newOwner indexed address) +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*DarknodeRegistryOwnershipTransferredIterator, error) { var previousOwnerRule []interface{} @@ -2759,7 +3236,7 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) FilterOwnershipTransferred(op // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: event OwnershipTransferred(previousOwner indexed address, newOwner indexed address) +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *DarknodeRegistryOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { var previousOwnerRule []interface{} @@ -2802,3 +3279,15 @@ func (_DarknodeRegistry *DarknodeRegistryFilterer) WatchOwnershipTransferred(opt } }), nil } + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_DarknodeRegistry *DarknodeRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*DarknodeRegistryOwnershipTransferred, error) { + event := new(DarknodeRegistryOwnershipTransferred) + if err := _DarknodeRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/darknode/bindings/erc20.go b/darknode/bindings/erc20.go index 078a15c1..0861bde1 100644 --- a/darknode/bindings/erc20.go +++ b/darknode/bindings/erc20.go @@ -4,6 +4,7 @@ package bindings import ( + "errors" "math/big" "strings" @@ -15,8 +16,26 @@ import ( "github.com/ethereum/go-ethereum/event" ) +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// ERC20MetaData contains all meta data concerning the ERC20 contract. +var ERC20MetaData = &bind.MetaData{ + ABI: "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]", +} + // ERC20ABI is the input ABI used to generate the binding from. -const ERC20ABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" +// Deprecated: Use ERC20MetaData.ABI instead. +var ERC20ABI = ERC20MetaData.ABI // ERC20 is an auto generated Go binding around an Ethereum contract. type ERC20 struct { @@ -126,7 +145,7 @@ func bindERC20(address common.Address, caller bind.ContractCaller, transactor bi // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _ERC20.Contract.ERC20Caller.contract.Call(opts, result, method, params...) } @@ -145,7 +164,7 @@ func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _ERC20.Contract.contract.Call(opts, result, method, params...) } @@ -162,223 +181,274 @@ func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method strin // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // -// Solidity: function allowance(_owner address, _spender address) constant returns(uint256) +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "allowance", _owner, _spender) - return *ret0, err + var out []interface{} + err := _ERC20.contract.Call(opts, &out, "allowance", _owner, _spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // -// Solidity: function allowance(_owner address, _spender address) constant returns(uint256) +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) func (_ERC20 *ERC20Session) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { return _ERC20.Contract.Allowance(&_ERC20.CallOpts, _owner, _spender) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // -// Solidity: function allowance(_owner address, _spender address) constant returns(uint256) +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) func (_ERC20 *ERC20CallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { return _ERC20.Contract.Allowance(&_ERC20.CallOpts, _owner, _spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // -// Solidity: function balanceOf(_owner address) constant returns(balance uint256) +// Solidity: function balanceOf(address _owner) view returns(uint256 balance) func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "balanceOf", _owner) - return *ret0, err + var out []interface{} + err := _ERC20.contract.Call(opts, &out, "balanceOf", _owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // -// Solidity: function balanceOf(_owner address) constant returns(balance uint256) +// Solidity: function balanceOf(address _owner) view returns(uint256 balance) func (_ERC20 *ERC20Session) BalanceOf(_owner common.Address) (*big.Int, error) { return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, _owner) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // -// Solidity: function balanceOf(_owner address) constant returns(balance uint256) +// Solidity: function balanceOf(address _owner) view returns(uint256 balance) func (_ERC20 *ERC20CallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, _owner) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // -// Solidity: function decimals() constant returns(uint8) +// Solidity: function decimals() view returns(uint8) func (_ERC20 *ERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "decimals") - return *ret0, err + var out []interface{} + err := _ERC20.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // -// Solidity: function decimals() constant returns(uint8) +// Solidity: function decimals() view returns(uint8) func (_ERC20 *ERC20Session) Decimals() (uint8, error) { return _ERC20.Contract.Decimals(&_ERC20.CallOpts) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // -// Solidity: function decimals() constant returns(uint8) +// Solidity: function decimals() view returns(uint8) func (_ERC20 *ERC20CallerSession) Decimals() (uint8, error) { return _ERC20.Contract.Decimals(&_ERC20.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // -// Solidity: function name() constant returns(string) +// Solidity: function name() view returns(string) func (_ERC20 *ERC20Caller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "name") - return *ret0, err + var out []interface{} + err := _ERC20.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + } // Name is a free data retrieval call binding the contract method 0x06fdde03. // -// Solidity: function name() constant returns(string) +// Solidity: function name() view returns(string) func (_ERC20 *ERC20Session) Name() (string, error) { return _ERC20.Contract.Name(&_ERC20.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // -// Solidity: function name() constant returns(string) +// Solidity: function name() view returns(string) func (_ERC20 *ERC20CallerSession) Name() (string, error) { return _ERC20.Contract.Name(&_ERC20.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // -// Solidity: function symbol() constant returns(string) +// Solidity: function symbol() view returns(string) func (_ERC20 *ERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "symbol") - return *ret0, err + var out []interface{} + err := _ERC20.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // -// Solidity: function symbol() constant returns(string) +// Solidity: function symbol() view returns(string) func (_ERC20 *ERC20Session) Symbol() (string, error) { return _ERC20.Contract.Symbol(&_ERC20.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // -// Solidity: function symbol() constant returns(string) +// Solidity: function symbol() view returns(string) func (_ERC20 *ERC20CallerSession) Symbol() (string, error) { return _ERC20.Contract.Symbol(&_ERC20.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // -// Solidity: function totalSupply() constant returns(uint256) +// Solidity: function totalSupply() view returns(uint256) func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err + var out []interface{} + err := _ERC20.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // -// Solidity: function totalSupply() constant returns(uint256) +// Solidity: function totalSupply() view returns(uint256) func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // -// Solidity: function totalSupply() constant returns(uint256) +// Solidity: function totalSupply() view returns(uint256) func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // -// Solidity: function approve(_spender address, _value uint256) returns(bool) +// Solidity: function approve(address _spender, uint256 _value) returns(bool) func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) { return _ERC20.contract.Transact(opts, "approve", _spender, _value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // -// Solidity: function approve(_spender address, _value uint256) returns(bool) +// Solidity: function approve(address _spender, uint256 _value) returns(bool) func (_ERC20 *ERC20Session) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.Approve(&_ERC20.TransactOpts, _spender, _value) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // -// Solidity: function approve(_spender address, _value uint256) returns(bool) +// Solidity: function approve(address _spender, uint256 _value) returns(bool) func (_ERC20 *ERC20TransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.Approve(&_ERC20.TransactOpts, _spender, _value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // -// Solidity: function transfer(_to address, _value uint256) returns(bool) +// Solidity: function transfer(address _to, uint256 _value) returns(bool) func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { return _ERC20.contract.Transact(opts, "transfer", _to, _value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // -// Solidity: function transfer(_to address, _value uint256) returns(bool) +// Solidity: function transfer(address _to, uint256 _value) returns(bool) func (_ERC20 *ERC20Session) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, _to, _value) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // -// Solidity: function transfer(_to address, _value uint256) returns(bool) +// Solidity: function transfer(address _to, uint256 _value) returns(bool) func (_ERC20 *ERC20TransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, _to, _value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // -// Solidity: function transferFrom(_from address, _to address, _value uint256) returns(bool) +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { return _ERC20.contract.Transact(opts, "transferFrom", _from, _to, _value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // -// Solidity: function transferFrom(_from address, _to address, _value uint256) returns(bool) +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) func (_ERC20 *ERC20Session) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, _from, _to, _value) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // -// Solidity: function transferFrom(_from address, _to address, _value uint256) returns(bool) +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) func (_ERC20 *ERC20TransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, _from, _to, _value) } +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_ERC20 *ERC20Transactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _ERC20.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_ERC20 *ERC20Session) Fallback(calldata []byte) (*types.Transaction, error) { + return _ERC20.Contract.Fallback(&_ERC20.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_ERC20 *ERC20TransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _ERC20.Contract.Fallback(&_ERC20.TransactOpts, calldata) +} + // ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract. type ERC20ApprovalIterator struct { Event *ERC20Approval // Event containing the contract specifics and raw log @@ -456,7 +526,7 @@ type ERC20Approval struct { // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // -// Solidity: event Approval(owner indexed address, spender indexed address, value uint256) +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) { var ownerRule []interface{} @@ -477,7 +547,7 @@ func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []commo // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // -// Solidity: event Approval(owner indexed address, spender indexed address, value uint256) +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { var ownerRule []interface{} @@ -521,6 +591,18 @@ func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ER }), nil } +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { + event := new(ERC20Approval) + if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract. type ERC20TransferIterator struct { Event *ERC20Transfer // Event containing the contract specifics and raw log @@ -598,7 +680,7 @@ type ERC20Transfer struct { // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // -// Solidity: event Transfer(from indexed address, to indexed address, value uint256) +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) { var fromRule []interface{} @@ -619,7 +701,7 @@ func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // -// Solidity: event Transfer(from indexed address, to indexed address, value uint256) +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} @@ -662,3 +744,15 @@ func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ER } }), nil } + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { + event := new(ERC20Transfer) + if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/darknode/bindings/protocol.go b/darknode/bindings/protocol.go index 9f433b6a..4c11d8bc 100644 --- a/darknode/bindings/protocol.go +++ b/darknode/bindings/protocol.go @@ -4,17 +4,38 @@ package bindings import ( + "errors" "math/big" "strings" + ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" ) +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// ProtocolMetaData contains all meta data concerning the Protocol contract. +var ProtocolMetaData = &bind.MetaData{ + ABI: "[{\"constant\":false,\"inputs\":[{\"internalType\":\"contractDarknodeRegistry\",\"name\":\"_newDarknodeRegistry\",\"type\":\"address\"}],\"name\":\"_updateDarknodeRegistry\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractShifterRegistry\",\"name\":\"_newShifterRegistry\",\"type\":\"address\"}],\"name\":\"_updateShifterRegistry\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodePayment\",\"outputs\":[{\"internalType\":\"contractDarknodePayment\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodePaymentStore\",\"outputs\":[{\"internalType\":\"contractDarknodePaymentStore\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodeRegistry\",\"outputs\":[{\"internalType\":\"contractDarknodeRegistry\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodeRegistryStore\",\"outputs\":[{\"internalType\":\"contractDarknodeRegistryStore\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodeSlasher\",\"outputs\":[{\"internalType\":\"contractDarknodeSlasher\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_start\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getShiftedTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"string\",\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"name\":\"getShifterBySymbol\",\"outputs\":[{\"internalType\":\"contractIShifter\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"getShifterByToken\",\"outputs\":[{\"internalType\":\"contractIShifter\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_start\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getShifters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"string\",\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"name\":\"getTokenBySymbol\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"renToken\",\"outputs\":[{\"internalType\":\"contractRenToken\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"shifterRegistry\",\"outputs\":[{\"internalType\":\"contractShifterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]", +} + // ProtocolABI is the input ABI used to generate the binding from. -const ProtocolABI = "[{\"constant\":false,\"inputs\":[{\"internalType\":\"contractDarknodeRegistry\",\"name\":\"_newDarknodeRegistry\",\"type\":\"address\"}],\"name\":\"_updateDarknodeRegistry\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractShifterRegistry\",\"name\":\"_newShifterRegistry\",\"type\":\"address\"}],\"name\":\"_updateShifterRegistry\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodePayment\",\"outputs\":[{\"internalType\":\"contractDarknodePayment\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodePaymentStore\",\"outputs\":[{\"internalType\":\"contractDarknodePaymentStore\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodeRegistry\",\"outputs\":[{\"internalType\":\"contractDarknodeRegistry\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodeRegistryStore\",\"outputs\":[{\"internalType\":\"contractDarknodeRegistryStore\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodeSlasher\",\"outputs\":[{\"internalType\":\"contractDarknodeSlasher\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_start\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getShiftedTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"string\",\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"name\":\"getShifterBySymbol\",\"outputs\":[{\"internalType\":\"contractIShifter\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"getShifterByToken\",\"outputs\":[{\"internalType\":\"contractIShifter\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_start\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getShifters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"string\",\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"name\":\"getTokenBySymbol\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"renToken\",\"outputs\":[{\"internalType\":\"contractRenToken\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"shifterRegistry\",\"outputs\":[{\"internalType\":\"contractShifterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" +// Deprecated: Use ProtocolMetaData.ABI instead. +var ProtocolABI = ProtocolMetaData.ABI // Protocol is an auto generated Go binding around an Ethereum contract. type Protocol struct { @@ -124,7 +145,7 @@ func bindProtocol(address common.Address, caller bind.ContractCaller, transactor // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_Protocol *ProtocolRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Protocol *ProtocolRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Protocol.Contract.ProtocolCaller.contract.Call(opts, result, method, params...) } @@ -143,7 +164,7 @@ func (_Protocol *ProtocolRaw) Transact(opts *bind.TransactOpts, method string, p // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_Protocol *ProtocolCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Protocol *ProtocolCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Protocol.Contract.contract.Call(opts, result, method, params...) } @@ -160,401 +181,466 @@ func (_Protocol *ProtocolTransactorRaw) Transact(opts *bind.TransactOpts, method // DarknodePayment is a free data retrieval call binding the contract method 0xb6b34c67. // -// Solidity: function darknodePayment() constant returns(address) +// Solidity: function darknodePayment() view returns(address) func (_Protocol *ProtocolCaller) DarknodePayment(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "darknodePayment") - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "darknodePayment") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // DarknodePayment is a free data retrieval call binding the contract method 0xb6b34c67. // -// Solidity: function darknodePayment() constant returns(address) +// Solidity: function darknodePayment() view returns(address) func (_Protocol *ProtocolSession) DarknodePayment() (common.Address, error) { return _Protocol.Contract.DarknodePayment(&_Protocol.CallOpts) } // DarknodePayment is a free data retrieval call binding the contract method 0xb6b34c67. // -// Solidity: function darknodePayment() constant returns(address) +// Solidity: function darknodePayment() view returns(address) func (_Protocol *ProtocolCallerSession) DarknodePayment() (common.Address, error) { return _Protocol.Contract.DarknodePayment(&_Protocol.CallOpts) } // DarknodePaymentStore is a free data retrieval call binding the contract method 0xbcfe9fe5. // -// Solidity: function darknodePaymentStore() constant returns(address) +// Solidity: function darknodePaymentStore() view returns(address) func (_Protocol *ProtocolCaller) DarknodePaymentStore(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "darknodePaymentStore") - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "darknodePaymentStore") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // DarknodePaymentStore is a free data retrieval call binding the contract method 0xbcfe9fe5. // -// Solidity: function darknodePaymentStore() constant returns(address) +// Solidity: function darknodePaymentStore() view returns(address) func (_Protocol *ProtocolSession) DarknodePaymentStore() (common.Address, error) { return _Protocol.Contract.DarknodePaymentStore(&_Protocol.CallOpts) } // DarknodePaymentStore is a free data retrieval call binding the contract method 0xbcfe9fe5. // -// Solidity: function darknodePaymentStore() constant returns(address) +// Solidity: function darknodePaymentStore() view returns(address) func (_Protocol *ProtocolCallerSession) DarknodePaymentStore() (common.Address, error) { return _Protocol.Contract.DarknodePaymentStore(&_Protocol.CallOpts) } // DarknodeRegistry is a free data retrieval call binding the contract method 0x9e45e0d0. // -// Solidity: function darknodeRegistry() constant returns(address) +// Solidity: function darknodeRegistry() view returns(address) func (_Protocol *ProtocolCaller) DarknodeRegistry(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "darknodeRegistry") - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "darknodeRegistry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // DarknodeRegistry is a free data retrieval call binding the contract method 0x9e45e0d0. // -// Solidity: function darknodeRegistry() constant returns(address) +// Solidity: function darknodeRegistry() view returns(address) func (_Protocol *ProtocolSession) DarknodeRegistry() (common.Address, error) { return _Protocol.Contract.DarknodeRegistry(&_Protocol.CallOpts) } // DarknodeRegistry is a free data retrieval call binding the contract method 0x9e45e0d0. // -// Solidity: function darknodeRegistry() constant returns(address) +// Solidity: function darknodeRegistry() view returns(address) func (_Protocol *ProtocolCallerSession) DarknodeRegistry() (common.Address, error) { return _Protocol.Contract.DarknodeRegistry(&_Protocol.CallOpts) } // DarknodeRegistryStore is a free data retrieval call binding the contract method 0x981a58e9. // -// Solidity: function darknodeRegistryStore() constant returns(address) +// Solidity: function darknodeRegistryStore() view returns(address) func (_Protocol *ProtocolCaller) DarknodeRegistryStore(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "darknodeRegistryStore") - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "darknodeRegistryStore") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // DarknodeRegistryStore is a free data retrieval call binding the contract method 0x981a58e9. // -// Solidity: function darknodeRegistryStore() constant returns(address) +// Solidity: function darknodeRegistryStore() view returns(address) func (_Protocol *ProtocolSession) DarknodeRegistryStore() (common.Address, error) { return _Protocol.Contract.DarknodeRegistryStore(&_Protocol.CallOpts) } // DarknodeRegistryStore is a free data retrieval call binding the contract method 0x981a58e9. // -// Solidity: function darknodeRegistryStore() constant returns(address) +// Solidity: function darknodeRegistryStore() view returns(address) func (_Protocol *ProtocolCallerSession) DarknodeRegistryStore() (common.Address, error) { return _Protocol.Contract.DarknodeRegistryStore(&_Protocol.CallOpts) } // DarknodeSlasher is a free data retrieval call binding the contract method 0xc4259606. // -// Solidity: function darknodeSlasher() constant returns(address) +// Solidity: function darknodeSlasher() view returns(address) func (_Protocol *ProtocolCaller) DarknodeSlasher(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "darknodeSlasher") - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "darknodeSlasher") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // DarknodeSlasher is a free data retrieval call binding the contract method 0xc4259606. // -// Solidity: function darknodeSlasher() constant returns(address) +// Solidity: function darknodeSlasher() view returns(address) func (_Protocol *ProtocolSession) DarknodeSlasher() (common.Address, error) { return _Protocol.Contract.DarknodeSlasher(&_Protocol.CallOpts) } // DarknodeSlasher is a free data retrieval call binding the contract method 0xc4259606. // -// Solidity: function darknodeSlasher() constant returns(address) +// Solidity: function darknodeSlasher() view returns(address) func (_Protocol *ProtocolCallerSession) DarknodeSlasher() (common.Address, error) { return _Protocol.Contract.DarknodeSlasher(&_Protocol.CallOpts) } // GetShiftedTokens is a free data retrieval call binding the contract method 0xa47c84bd. // -// Solidity: function getShiftedTokens(_start address, _count uint256) constant returns(address[]) +// Solidity: function getShiftedTokens(address _start, uint256 _count) view returns(address[]) func (_Protocol *ProtocolCaller) GetShiftedTokens(opts *bind.CallOpts, _start common.Address, _count *big.Int) ([]common.Address, error) { - var ( - ret0 = new([]common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "getShiftedTokens", _start, _count) - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "getShiftedTokens", _start, _count) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + } // GetShiftedTokens is a free data retrieval call binding the contract method 0xa47c84bd. // -// Solidity: function getShiftedTokens(_start address, _count uint256) constant returns(address[]) +// Solidity: function getShiftedTokens(address _start, uint256 _count) view returns(address[]) func (_Protocol *ProtocolSession) GetShiftedTokens(_start common.Address, _count *big.Int) ([]common.Address, error) { return _Protocol.Contract.GetShiftedTokens(&_Protocol.CallOpts, _start, _count) } // GetShiftedTokens is a free data retrieval call binding the contract method 0xa47c84bd. // -// Solidity: function getShiftedTokens(_start address, _count uint256) constant returns(address[]) +// Solidity: function getShiftedTokens(address _start, uint256 _count) view returns(address[]) func (_Protocol *ProtocolCallerSession) GetShiftedTokens(_start common.Address, _count *big.Int) ([]common.Address, error) { return _Protocol.Contract.GetShiftedTokens(&_Protocol.CallOpts, _start, _count) } // GetShifterBySymbol is a free data retrieval call binding the contract method 0x92a29e30. // -// Solidity: function getShifterBySymbol(_tokenSymbol string) constant returns(address) +// Solidity: function getShifterBySymbol(string _tokenSymbol) view returns(address) func (_Protocol *ProtocolCaller) GetShifterBySymbol(opts *bind.CallOpts, _tokenSymbol string) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "getShifterBySymbol", _tokenSymbol) - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "getShifterBySymbol", _tokenSymbol) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // GetShifterBySymbol is a free data retrieval call binding the contract method 0x92a29e30. // -// Solidity: function getShifterBySymbol(_tokenSymbol string) constant returns(address) +// Solidity: function getShifterBySymbol(string _tokenSymbol) view returns(address) func (_Protocol *ProtocolSession) GetShifterBySymbol(_tokenSymbol string) (common.Address, error) { return _Protocol.Contract.GetShifterBySymbol(&_Protocol.CallOpts, _tokenSymbol) } // GetShifterBySymbol is a free data retrieval call binding the contract method 0x92a29e30. // -// Solidity: function getShifterBySymbol(_tokenSymbol string) constant returns(address) +// Solidity: function getShifterBySymbol(string _tokenSymbol) view returns(address) func (_Protocol *ProtocolCallerSession) GetShifterBySymbol(_tokenSymbol string) (common.Address, error) { return _Protocol.Contract.GetShifterBySymbol(&_Protocol.CallOpts, _tokenSymbol) } // GetShifterByToken is a free data retrieval call binding the contract method 0x28c4f410. // -// Solidity: function getShifterByToken(_tokenAddress address) constant returns(address) +// Solidity: function getShifterByToken(address _tokenAddress) view returns(address) func (_Protocol *ProtocolCaller) GetShifterByToken(opts *bind.CallOpts, _tokenAddress common.Address) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "getShifterByToken", _tokenAddress) - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "getShifterByToken", _tokenAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // GetShifterByToken is a free data retrieval call binding the contract method 0x28c4f410. // -// Solidity: function getShifterByToken(_tokenAddress address) constant returns(address) +// Solidity: function getShifterByToken(address _tokenAddress) view returns(address) func (_Protocol *ProtocolSession) GetShifterByToken(_tokenAddress common.Address) (common.Address, error) { return _Protocol.Contract.GetShifterByToken(&_Protocol.CallOpts, _tokenAddress) } // GetShifterByToken is a free data retrieval call binding the contract method 0x28c4f410. // -// Solidity: function getShifterByToken(_tokenAddress address) constant returns(address) +// Solidity: function getShifterByToken(address _tokenAddress) view returns(address) func (_Protocol *ProtocolCallerSession) GetShifterByToken(_tokenAddress common.Address) (common.Address, error) { return _Protocol.Contract.GetShifterByToken(&_Protocol.CallOpts, _tokenAddress) } // GetShifters is a free data retrieval call binding the contract method 0xdeeb2efe. // -// Solidity: function getShifters(_start address, _count uint256) constant returns(address[]) +// Solidity: function getShifters(address _start, uint256 _count) view returns(address[]) func (_Protocol *ProtocolCaller) GetShifters(opts *bind.CallOpts, _start common.Address, _count *big.Int) ([]common.Address, error) { - var ( - ret0 = new([]common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "getShifters", _start, _count) - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "getShifters", _start, _count) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + } // GetShifters is a free data retrieval call binding the contract method 0xdeeb2efe. // -// Solidity: function getShifters(_start address, _count uint256) constant returns(address[]) +// Solidity: function getShifters(address _start, uint256 _count) view returns(address[]) func (_Protocol *ProtocolSession) GetShifters(_start common.Address, _count *big.Int) ([]common.Address, error) { return _Protocol.Contract.GetShifters(&_Protocol.CallOpts, _start, _count) } // GetShifters is a free data retrieval call binding the contract method 0xdeeb2efe. // -// Solidity: function getShifters(_start address, _count uint256) constant returns(address[]) +// Solidity: function getShifters(address _start, uint256 _count) view returns(address[]) func (_Protocol *ProtocolCallerSession) GetShifters(_start common.Address, _count *big.Int) ([]common.Address, error) { return _Protocol.Contract.GetShifters(&_Protocol.CallOpts, _start, _count) } // GetTokenBySymbol is a free data retrieval call binding the contract method 0xefa74f1f. // -// Solidity: function getTokenBySymbol(_tokenSymbol string) constant returns(address) +// Solidity: function getTokenBySymbol(string _tokenSymbol) view returns(address) func (_Protocol *ProtocolCaller) GetTokenBySymbol(opts *bind.CallOpts, _tokenSymbol string) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "getTokenBySymbol", _tokenSymbol) - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "getTokenBySymbol", _tokenSymbol) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // GetTokenBySymbol is a free data retrieval call binding the contract method 0xefa74f1f. // -// Solidity: function getTokenBySymbol(_tokenSymbol string) constant returns(address) +// Solidity: function getTokenBySymbol(string _tokenSymbol) view returns(address) func (_Protocol *ProtocolSession) GetTokenBySymbol(_tokenSymbol string) (common.Address, error) { return _Protocol.Contract.GetTokenBySymbol(&_Protocol.CallOpts, _tokenSymbol) } // GetTokenBySymbol is a free data retrieval call binding the contract method 0xefa74f1f. // -// Solidity: function getTokenBySymbol(_tokenSymbol string) constant returns(address) +// Solidity: function getTokenBySymbol(string _tokenSymbol) view returns(address) func (_Protocol *ProtocolCallerSession) GetTokenBySymbol(_tokenSymbol string) (common.Address, error) { return _Protocol.Contract.GetTokenBySymbol(&_Protocol.CallOpts, _tokenSymbol) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Protocol *ProtocolCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "owner") - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Protocol *ProtocolSession) Owner() (common.Address, error) { return _Protocol.Contract.Owner(&_Protocol.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Protocol *ProtocolCallerSession) Owner() (common.Address, error) { return _Protocol.Contract.Owner(&_Protocol.CallOpts) } // RenToken is a free data retrieval call binding the contract method 0x34246f9b. // -// Solidity: function renToken() constant returns(address) +// Solidity: function renToken() view returns(address) func (_Protocol *ProtocolCaller) RenToken(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "renToken") - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "renToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // RenToken is a free data retrieval call binding the contract method 0x34246f9b. // -// Solidity: function renToken() constant returns(address) +// Solidity: function renToken() view returns(address) func (_Protocol *ProtocolSession) RenToken() (common.Address, error) { return _Protocol.Contract.RenToken(&_Protocol.CallOpts) } // RenToken is a free data retrieval call binding the contract method 0x34246f9b. // -// Solidity: function renToken() constant returns(address) +// Solidity: function renToken() view returns(address) func (_Protocol *ProtocolCallerSession) RenToken() (common.Address, error) { return _Protocol.Contract.RenToken(&_Protocol.CallOpts) } // ShifterRegistry is a free data retrieval call binding the contract method 0xe6a12ca9. // -// Solidity: function shifterRegistry() constant returns(address) +// Solidity: function shifterRegistry() view returns(address) func (_Protocol *ProtocolCaller) ShifterRegistry(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Protocol.contract.Call(opts, out, "shifterRegistry") - return *ret0, err + var out []interface{} + err := _Protocol.contract.Call(opts, &out, "shifterRegistry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // ShifterRegistry is a free data retrieval call binding the contract method 0xe6a12ca9. // -// Solidity: function shifterRegistry() constant returns(address) +// Solidity: function shifterRegistry() view returns(address) func (_Protocol *ProtocolSession) ShifterRegistry() (common.Address, error) { return _Protocol.Contract.ShifterRegistry(&_Protocol.CallOpts) } // ShifterRegistry is a free data retrieval call binding the contract method 0xe6a12ca9. // -// Solidity: function shifterRegistry() constant returns(address) +// Solidity: function shifterRegistry() view returns(address) func (_Protocol *ProtocolCallerSession) ShifterRegistry() (common.Address, error) { return _Protocol.Contract.ShifterRegistry(&_Protocol.CallOpts) } // UpdateDarknodeRegistry is a paid mutator transaction binding the contract method 0x179091a4. // -// Solidity: function _updateDarknodeRegistry(_newDarknodeRegistry address) returns() +// Solidity: function _updateDarknodeRegistry(address _newDarknodeRegistry) returns() func (_Protocol *ProtocolTransactor) UpdateDarknodeRegistry(opts *bind.TransactOpts, _newDarknodeRegistry common.Address) (*types.Transaction, error) { return _Protocol.contract.Transact(opts, "_updateDarknodeRegistry", _newDarknodeRegistry) } // UpdateDarknodeRegistry is a paid mutator transaction binding the contract method 0x179091a4. // -// Solidity: function _updateDarknodeRegistry(_newDarknodeRegistry address) returns() +// Solidity: function _updateDarknodeRegistry(address _newDarknodeRegistry) returns() func (_Protocol *ProtocolSession) UpdateDarknodeRegistry(_newDarknodeRegistry common.Address) (*types.Transaction, error) { return _Protocol.Contract.UpdateDarknodeRegistry(&_Protocol.TransactOpts, _newDarknodeRegistry) } // UpdateDarknodeRegistry is a paid mutator transaction binding the contract method 0x179091a4. // -// Solidity: function _updateDarknodeRegistry(_newDarknodeRegistry address) returns() +// Solidity: function _updateDarknodeRegistry(address _newDarknodeRegistry) returns() func (_Protocol *ProtocolTransactorSession) UpdateDarknodeRegistry(_newDarknodeRegistry common.Address) (*types.Transaction, error) { return _Protocol.Contract.UpdateDarknodeRegistry(&_Protocol.TransactOpts, _newDarknodeRegistry) } // UpdateShifterRegistry is a paid mutator transaction binding the contract method 0x715a6132. // -// Solidity: function _updateShifterRegistry(_newShifterRegistry address) returns() +// Solidity: function _updateShifterRegistry(address _newShifterRegistry) returns() func (_Protocol *ProtocolTransactor) UpdateShifterRegistry(opts *bind.TransactOpts, _newShifterRegistry common.Address) (*types.Transaction, error) { return _Protocol.contract.Transact(opts, "_updateShifterRegistry", _newShifterRegistry) } // UpdateShifterRegistry is a paid mutator transaction binding the contract method 0x715a6132. // -// Solidity: function _updateShifterRegistry(_newShifterRegistry address) returns() +// Solidity: function _updateShifterRegistry(address _newShifterRegistry) returns() func (_Protocol *ProtocolSession) UpdateShifterRegistry(_newShifterRegistry common.Address) (*types.Transaction, error) { return _Protocol.Contract.UpdateShifterRegistry(&_Protocol.TransactOpts, _newShifterRegistry) } // UpdateShifterRegistry is a paid mutator transaction binding the contract method 0x715a6132. // -// Solidity: function _updateShifterRegistry(_newShifterRegistry address) returns() +// Solidity: function _updateShifterRegistry(address _newShifterRegistry) returns() func (_Protocol *ProtocolTransactorSession) UpdateShifterRegistry(_newShifterRegistry common.Address) (*types.Transaction, error) { return _Protocol.Contract.UpdateShifterRegistry(&_Protocol.TransactOpts, _newShifterRegistry) } // Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. // -// Solidity: function initialize(_owner address) returns() +// Solidity: function initialize(address _owner) returns() func (_Protocol *ProtocolTransactor) Initialize(opts *bind.TransactOpts, _owner common.Address) (*types.Transaction, error) { return _Protocol.contract.Transact(opts, "initialize", _owner) } // Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. // -// Solidity: function initialize(_owner address) returns() +// Solidity: function initialize(address _owner) returns() func (_Protocol *ProtocolSession) Initialize(_owner common.Address) (*types.Transaction, error) { return _Protocol.Contract.Initialize(&_Protocol.TransactOpts, _owner) } // Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. // -// Solidity: function initialize(_owner address) returns() +// Solidity: function initialize(address _owner) returns() func (_Protocol *ProtocolTransactorSession) Initialize(_owner common.Address) (*types.Transaction, error) { return _Protocol.Contract.Initialize(&_Protocol.TransactOpts, _owner) } diff --git a/darknode/config.go b/darknode/config.go index 56073546..aab45c83 100644 --- a/darknode/config.go +++ b/darknode/config.go @@ -2,13 +2,10 @@ package darknode import ( "bytes" - "crypto/ecdsa" "encoding/json" - "math/big" "os" "path/filepath" - "github.com/btcsuite/btcd/btcec" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" @@ -70,9 +67,9 @@ func NewConfig(network Network) (Config, error) { }, nil } -// NewConfigFromJSONFile parses a json file that contains the config +// NewConfigFromFile parses a json file that contains the config // options specified by Config. -func NewConfigFromJSONFile(filename string) (Config, error) { +func NewConfigFromFile(filename string) (Config, error) { path, err := filepath.Abs(filename) if err != nil { return Config{}, err @@ -96,7 +93,7 @@ func ConfigToFile(config Config, path string) error { return err } - file, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600) + file, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0600) if err != nil { return err } @@ -127,6 +124,7 @@ type GeneralConfig struct { // DnrAddr returns the darknode registry contract address from the config. If // only the protocol address is specified, it will try read the dnr address from // the protocol contract. +// TODO : move to bindings or somewhere else func (config GeneralConfig) DnrAddr(client *ethclient.Client) (common.Address, error) { if bytes.Equal(config.DarknodeRegistryAddress.Bytes(), common.Address{}.Bytes()) { protocol, err := bindings.NewProtocol(config.ProtocolAddress, client) @@ -138,71 +136,21 @@ func (config GeneralConfig) DnrAddr(client *ethclient.Client) (common.Address, e return config.DarknodeRegistryAddress, nil } -// NewGeneralConfigFromJSONFile parses a json file that contains the config +// NewGeneralConfigFromFile parses a json file that contains the config // options specified by GeneralConfig. -func NewGeneralConfigFromJSONFile(filename string) (GeneralConfig, error) { - file, err := os.Open(filename) +func NewGeneralConfigFromFile(filename string) (GeneralConfig, error) { + path, err := filepath.Abs(filename) if err != nil { return GeneralConfig{}, err } - defer file.Close() - - var conf GeneralConfig - err = json.NewDecoder(file).Decode(&conf) - return conf, err -} -// The ECDSADistKeyShare is a temporary object used to store a Shamir's secret -// share of a ECDSA distributed key. Such a key is used by RenVM to sign -// transactions and messages as part of shifting tokens in/out of various -// distributed ledgers. In the future, it will be replaced by runtime storage so -// that there can be multiple ECDSA distributed keys that are constantly -// changed. -type ECDSADistKeyShare struct { - PubKey ecdsa.PublicKey `json:"pubKey"` - PrivKeyShare []byte `json:"privKeyShare,omitempty"` -} - -// MarshalJSON implements the `json.Marshaler` interface for the -// ECDSADistKeyShare type. -func (dk ECDSADistKeyShare) MarshalJSON() ([]byte, error) { - pubKey := map[string]interface{}{} - pubKey["x"] = dk.PubKey.X - pubKey["y"] = dk.PubKey.Y - return json.Marshal(map[string]interface{}{ - "pubKey": pubKey, - "privKeyShare": dk.PrivKeyShare, - }) -} - -// UnmarshalJSON implements the `json.Unmarshaler` interface for the -// ECDSADistKeyShare type. -func (dk *ECDSADistKeyShare) UnmarshalJSON(data []byte) (err error) { - m := map[string]json.RawMessage{} - if err = json.Unmarshal(data, &m); err != nil { - return - } - - pubKeyRaw := map[string]json.RawMessage{} - if err = json.Unmarshal(m["pubKey"], &pubKeyRaw); err != nil { - return - } - - // Public key - dk.PubKey.X = big.NewInt(0) - if err = dk.PubKey.X.UnmarshalJSON(pubKeyRaw["x"]); err != nil { - return - } - dk.PubKey.Y = big.NewInt(0) - if err = dk.PubKey.Y.UnmarshalJSON(pubKeyRaw["y"]); err != nil { - return - } - dk.PubKey.Curve = btcec.S256() - - // Private key share - if err = json.Unmarshal(m["privKeyShare"], &dk.PrivKeyShare); err != nil { - return + file, err := os.Open(path) + if err != nil { + return GeneralConfig{}, err } + defer file.Close() - return nil + var opts GeneralConfig + err = json.NewDecoder(file).Decode(&opts) + return opts, err } diff --git a/darknode/network.go b/darknode/network.go index fc0e5fbb..89e40a19 100644 --- a/darknode/network.go +++ b/darknode/network.go @@ -37,6 +37,7 @@ func NewNetwork(network string) (Network, error) { } } +// BootstrapNodes returns the bootstraps addresses of the given network. func (network Network) BootstrapNodes() []addr.MultiAddress { bootstraps := make([]addr.MultiAddress, 0, 16) switch network { @@ -79,12 +80,37 @@ func (network Network) BootstrapNodes() []addr.MultiAddress { return bootstraps } +// GethBootstrapNodes returns the geth bootstraps addresses of the given network. +func (network Network) GethBootstrapNodes() string { + switch network { + case Mainnet: + return "enode://1f6feede142638f7c927fe5a2dcb4ee9e3915f57099879957f5e76407cb8fb941bf4fd94fd82e55f4ea7e888d067063dfdd33af8107139cc109920a08a302210@159.223.46.219:31004" + case Testnet: + return "enode://f64ed2aa0a5ec85bfa6324193b2b5ab6dce366cebd1c58c8742b17f9534d73a3579cab75d8a28bca98f3a0a8e51581941220acca69ca8f1d3f4b2841b3e0b9e3@46.101.207.101:31000" + default: + panic("unknown network") + } +} + +// GethNetworkID returns network ID of the given network. +func (network Network) GethNetworkID() string { + switch network { + case Mainnet: + return "3120" + case Testnet: + return "18414" + default: + panic("unknown network") + } +} + +// ProtocolAddr returns the protocol contract address of the given network. func (network Network) ProtocolAddr() common.Address { switch network { case Mainnet: return common.HexToAddress("0xc25167fFa19B4d9d03c7d5aa4682c7063F345b66") case Testnet: - return common.HexToAddress("0x9e2Ed544eE281FBc4c00f8cE7fC2Ff8AbB4899D1") + return common.HexToAddress("0x59e23c087cA9bd9ce162875811CD6e99134D6d0F") case Devnet: return common.HexToAddress("0x5045E727D9D9AcDe1F6DCae52B078EC30dC95455") default: diff --git a/go.mod b/go.mod index 3875c411..8e17a53d 100644 --- a/go.mod +++ b/go.mod @@ -3,39 +3,38 @@ module github.com/renproject/darknode-cli go 1.13 require ( - cloud.google.com/go v0.51.0 // indirect + github.com/allegro/bigcache v1.2.1 // indirect github.com/aws/aws-sdk-go v1.41.8 - github.com/btcsuite/btcd v0.20.1-beta + github.com/cespare/cp v1.1.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect + github.com/deckarep/golang-set v1.7.1 // indirect + github.com/dgraph-io/badger v1.6.1 // indirect + github.com/dgraph-io/ristretto v0.0.3 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/digitalocean/godo v1.69.1 - github.com/ethereum/go-ethereum v1.9.6 + github.com/ethereum/go-ethereum v1.10.13 github.com/fatih/color v1.7.0 - github.com/golang/protobuf v1.4.3 // indirect - github.com/google/go-github/v39 v39.2.0 - github.com/google/uuid v1.1.5 // indirect - github.com/gorilla/websocket v1.4.2 // indirect + github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect + github.com/go-kit/kit v0.9.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/google/go-github/v44 v44.1.0 + github.com/google/uuid v1.1.5 github.com/hashicorp/go-version v1.2.0 - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect - github.com/huin/goupnp v1.0.2 // indirect + github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-base58 v0.0.0-20150317085156-6237cf65f3a6 - github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559 // indirect - github.com/kr/text v0.2.0 // indirect github.com/multiformats/go-multiaddr v0.1.1 github.com/multiformats/go-multihash v0.0.8 - github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/prometheus/tsdb v0.10.0 // indirect github.com/renproject/aw v0.3.7 - github.com/renproject/mercury v0.3.15 + github.com/renproject/kv v1.1.2 // indirect github.com/renproject/phi v0.1.0 - github.com/sirupsen/logrus v1.4.2 - github.com/stretchr/testify v1.7.0 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/rjeczalik/notify v0.9.2 // indirect + github.com/status-im/keycard-go v0.0.0-20200107115650-f38e9a19958e // indirect + github.com/tyler-smith/go-bip39 v1.0.2 // indirect github.com/urfave/cli v1.22.5 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 - golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 // indirect google.golang.org/api v0.15.0 - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + google.golang.org/grpc v1.27.1 // indirect + google.golang.org/protobuf v1.25.0 // indirect ) diff --git a/go.sum b/go.sum index 8b7f8e5a..7d1ceba1 100644 --- a/go.sum +++ b/go.sum @@ -1,66 +1,99 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM= cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M= github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= +github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/aristanetworks/fsnotify v1.4.2/go.mod h1:D/rtu7LpjYM8tRJphJ0hUBYpjai8SfX+aSNsWDTq/Ks= -github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3/go.mod h1:KASm+qXFKs/xjSoWn30NrWBBvdTTQq+UjkhjEJHfSFA= -github.com/aristanetworks/goarista v0.0.0-20200310212843-2da4c1f5881b h1:VBFuX8nQQ57A6OGYGOLugx/Sc488F0nNIdTtcmNq9qE= -github.com/aristanetworks/goarista v0.0.0-20200310212843-2da4c1f5881b/go.mod h1:QZe5Yh80Hp1b6JxQdpfSEEe8X7hTyTEZSosSrFf/oJE= -github.com/aristanetworks/splunk-hec-go v0.3.3/go.mod h1:1VHO9r17b0K7WmOlLb9nTk/2YanvOEnLMUgsFrxBROc= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/aws/aws-sdk-go v1.41.8 h1:j6imzwVyWQYuQxbkPmg2MdMmLB+Zw+U3Ewi59YF8Rwk= github.com/aws/aws-sdk-go v1.41.8/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= +github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= +github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= +github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= +github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= +github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/btcsuite/btcd v0.0.0-20190807005414-4063feeff79a/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= +github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf/go.mod h1:BO2rLUAZMrpgh6GBVKi0Gjdqw2MgCtJrtmUdDeZRKjY= +github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= +github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= +github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -70,18 +103,25 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= +github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= +github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger v1.6.1 h1:w9pSFNSdq/JPM1N12Fz/F/bzo993Is1W+Q7HjPzi7yg= github.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU= github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI= github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20191112170834-c2139c5d712b/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= @@ -89,33 +129,38 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUn github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/godo v1.69.1 h1:aCyfwth8R3DeOaWB9J9E8v7cjlDIlF19eXTt8R3XhTE= github.com/digitalocean/godo v1.69.1/go.mod h1:epPuOzTOOJujNo0nduDj2D5O1zu8cSpp9R+DdN0W9I0= +github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elastic/gosigar v0.10.5 h1:GzPQ+78RaAb4J63unidA/JavQRKrB6s8IOzN6Ib59jo= -github.com/elastic/gosigar v0.10.5/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.9.2/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= -github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= -github.com/ethereum/go-ethereum v1.9.6 h1:EacwxMGKZezZi+m3in0Tlyk0veDQgnfZ9BjQqHAaQLM= -github.com/ethereum/go-ethereum v1.9.6/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= +github.com/ethereum/go-ethereum v1.10.13 h1:DEYFP9zk+Gruf3ae1JOJVhNmxK28ee+sMELPLgYTXpA= +github.com/ethereum/go-ethereum v1.10.13/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= @@ -123,9 +168,19 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -139,7 +194,6 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -152,61 +206,80 @@ github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github/v39 v39.2.0 h1:rNNM311XtPOz5rDdsJXAp2o8F67X9FnROXTvto3aSnQ= -github.com/google/go-github/v39 v39.2.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-github/v44 v44.1.0 h1:shWPaufgdhr+Ad4eo/pZv9ORTxFpsxPEPEuuXAKIQGA= +github.com/google/go-github/v44 v44.1.0/go.mod h1:iWn00mWcP6PRWHhXm0zuFJ8wbEjE5AGO5D5HXYM4zgw= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.5 h1:kxhtnfFVi+rYdOALN0B3k9UT86zVJKfBimRaciULW4I= github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= +github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= +github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= +github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= +github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= +github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= +github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= +github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= +github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jbenet/go-base58 v0.0.0-20150317085156-6237cf65f3a6 h1:4zOlv2my+vf98jT1nQt4bT/yKWUImevYPJ2H344CloE= github.com/jbenet/go-base58 v0.0.0-20150317085156-6237cf65f3a6/go.mod h1:r/8JmuR0qjuCiEhAolkfvdZgmPiHTnJaG0UXCSeR1Zo= -github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -214,19 +287,21 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/karalabe/usb v0.0.0-20191104083709-911d15fe12a9/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559 h1:0VWDXPNE0brOek1Q8bLfzKkvOzwbQE/snjGojlCr8CY= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.10.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= +github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= @@ -240,38 +315,57 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miguelmota/go-ethereum-hdwallet v0.0.0-20190720004541-5f6b3168e4a0 h1:DmK33IJe81zJOzLmzzBHWf2/fGB0tnvqLnvGu8S5wYY= -github.com/miguelmota/go-ethereum-hdwallet v0.0.0-20190720004541-5f6b3168e4a0/go.mod h1:VVt+rn/itmf+9eZq9CAabVlsfsHveUNUQ0bRv3ChqxY= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771 h1:MHkK1uRtFbVqvAgvWxafZe54+5uBxLluGylDiKgdhwo= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mr-tron/base58 v1.1.2 h1:ZEw4I2EgPKDJ2iEw0cNmLB3ROrEmkOtXIkaG7wZg+78= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/multiformats/go-multiaddr v0.1.1 h1:rVAztJYMhCQ7vEFr8FvxW3mS+HF2eY/oPbOMeS0ZDnE= github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= github.com/multiformats/go-multihash v0.0.8 h1:wrYcW5yxSi3dU07n5jnuS5PrNwyHy0zRHGVoUugWvXg= github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -288,34 +382,35 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c/go.mod h1:t+O9It+LKzfOAhKTT5O0ehDix+MTqbtT0T9t+7zzOvc= -github.com/openconfig/reference v0.0.0-20190727015836-8dfd928c9696/go.mod h1:ym2A+zigScwkSEb/cVQB0/ZMpU3rqiH6X7WRRsxgOGw= -github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pierrec/lz4 v2.4.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.10/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= -github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/renproject/aw v0.3.7 h1:KRqeAs/ALx2EtdCHH5PqVe+tpSTclOxUDexN7O4NndI= github.com/renproject/aw v0.3.7/go.mod h1:CpgAzPcLoCoOEf9HsMMhVtWXuIGTZ1eqAGSPegmj5YI= github.com/renproject/id v0.1.1 h1:KaV31Xp7SSlyUs5O0vHIw9rhhzrJ0lTOkQXVgbgyPEU= @@ -323,11 +418,11 @@ github.com/renproject/id v0.1.1/go.mod h1:i4OJzgjl4XLcU7nfU9UshX7PaBVpnTk3gEVj8d github.com/renproject/kv v1.1.0/go.mod h1:B+LKu5xLj9t65LrbsSyzTcgLcPdWCd0qxFEtNB7NRo8= github.com/renproject/kv v1.1.2 h1:P18yHdDVJTEZ9yeyx6o82ICY1m6f+VdtAt/ouZez+AU= github.com/renproject/kv v1.1.2/go.mod h1:78bvdAtYiYxCoT9ihVhl8qdmjl7s9fST/FkRLnZ6rXY= -github.com/renproject/mercury v0.3.15 h1:qPcId0DZy36fMuBZoXzcrZem2fbUXFJ1E2dBDETZNps= -github.com/renproject/mercury v0.3.15/go.mod h1:dxOQMy6wf+Kf8zLN3LGypCeq7jdKVHQUpMW6fsTvsMc= github.com/renproject/phi v0.0.0-20190713013721-51f586bc4816/go.mod h1:Hrxx2ONVpfByficRjyRd1trecalYr0lo7Z0akx8UXqg= github.com/renproject/phi v0.1.0 h1:ZOn7QeDribk/uV46OhQWcTLxyuLg7P+xR1Hfl5cOQuI= github.com/renproject/phi v0.1.0/go.mod h1:Hrxx2ONVpfByficRjyRd1trecalYr0lo7Z0akx8UXqg= +github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -338,56 +433,69 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/status-im/keycard-go v0.0.0-20200107115650-f38e9a19958e h1:iT/UJdf+SzbgkIPDe/RmlCfLEQ+ab4UMl6toBl9CGZA= github.com/status-im/keycard-go v0.0.0-20200107115650-f38e9a19958e/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 h1:gIlAHnH1vJb5vwEjIp5kBj/eu99p/bl0Ay2goiPe5xE= -github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= -github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM= -github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU= -github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4= -github.com/tjfoc/gmsm v1.3.0/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= +github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= +github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA= +github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU= github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8cVcUy5CeIBYhEESkOB7m6Gmkrk= -github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/xtaci/kcp-go v5.4.20+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE= -github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -396,22 +504,28 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -420,16 +534,18 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -440,15 +556,17 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d h1:20cMwl2fHAzkJMEA+8J4JgqBQcQGzbisXo31MIeenXI= @@ -466,15 +584,18 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -483,43 +604,59 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200219091948-cb0a6d8edb6c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200722175500-76b94024e4b6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 h1:uCLL3g5wH2xjxVREVuAbP9JM5PPKjRbXKRa6IBjkzmU= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -529,18 +666,31 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200221224223-e1da425f72fd/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0 h1:yzlyyDW/J0w8yNFJIhiAJy4kq74S+1DOLdawELNxFMA= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -555,11 +705,15 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200218151345-dad8c97a84f5/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -581,7 +735,6 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -589,33 +742,29 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= -gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= -gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= -gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= -gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/util/github.go b/util/github.go index 29a8e70e..9a22a66d 100644 --- a/util/github.go +++ b/util/github.go @@ -9,13 +9,14 @@ import ( "regexp" "time" - "github.com/google/go-github/v39/github" + "github.com/google/go-github/v44/github" "github.com/hashicorp/go-version" + "github.com/renproject/darknode-cli/darknode" "golang.org/x/oauth2" ) -// GithubClient initialize the github client. If an access token has been set as an environment, -// it will use it for oauth to avoid rate limiting. +// GithubClient initialize the Github client. If an access token has been set +// as an environment, it will use it for oauth to avoid rate limiting. func GithubClient(ctx context.Context) *github.Client { accessToken := os.Getenv("GITHUB_TOKEN") var client *http.Client @@ -29,53 +30,74 @@ func GithubClient(ctx context.Context) *github.Client { return github.NewClient(client) } -// LatestStableRelease checks the darknode release repo and return the version -// of the latest release. -func LatestStableRelease() (string, error) { - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) +// RateLimit checks if we get rate-limited by the Github API. It will return +// how many remaining requests we can make before getting rate-limited +func RateLimit(ctx context.Context, client *github.Client) (int, error) { + rl, response, err := client.RateLimits(ctx) + if err != nil { + return 0, err + } + if response.StatusCode != http.StatusOK { + return 0, fmt.Errorf("cannot get github API rate limit info") + } + return rl.Core.Remaining, nil +} + +// LatestRelease fetches the name of the latest Darknode release of given +// network. +func LatestRelease(network darknode.Network) (string, error) { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() - client := github.NewClient(nil) - opts := &github.ListOptions{ - PerPage: 50, - } - latest, err := version.NewVersion("0.0.0") + // Check the rate limit status of github api + client := GithubClient(ctx) + remaining, err := RateLimit(ctx, client) if err != nil { return "", err } + if remaining < 10 { + return "", fmt.Errorf("rate limited by github API, please set the env `GITHUB_TOKEN` with a personal access token") + } - // Fetch all releases and find the latest stable release tag + // Construct the regex for release name + reg := regexp.MustCompile("^v?[0-9]+\\.[0-9]+\\.[0-9]+$") + latest, _ := version.NewVersion("0.0.0") + + opts := &github.ListOptions{ + Page: 0, + PerPage: 100, // 100 maximum + } for { releases, response, err := client.Repositories.ListReleases(ctx, "renproject", "darknode-release", opts) if err != nil { return "", err } - if response.StatusCode != http.StatusOK { - return "", fmt.Errorf("cannot get latest darknode release from github, error code = %v", response.StatusCode) + // Verify the status code is 200. + if err := VerifyStatusCode(response.Response, http.StatusOK); err != nil { + return "", err } - verReg := "^v?[0-9]+\\.[0-9]+\\.[0-9]+$" + // Find the latest release tag for the given network for _, release := range releases { - match, err := regexp.MatchString(verReg, *release.TagName) + if !reg.MatchString(*release.TagName) { + continue + } + ver, err := version.NewVersion(*release.TagName) if err != nil { return "", err } - if match { - ver, err := version.NewVersion(*release.TagName) - if err != nil { - return "", err - } - if ver.GreaterThan(latest) { - latest = ver - } + if ver.GreaterThan(latest) { + latest = ver } } + if response.NextPage == 0 { break } opts.Page = response.NextPage } + if latest.String() == "0.0.0" { return "", errors.New("cannot find any stable release") } diff --git a/util/key.go b/util/key.go index 54e15ad9..0b9f9479 100644 --- a/util/key.go +++ b/util/key.go @@ -1,13 +1,21 @@ package util import ( + "crypto/ecdsa" "crypto/rand" "crypto/rsa" "crypto/x509" "encoding/pem" + "fmt" "io/ioutil" + "os" "path/filepath" + "strings" + "github.com/ethereum/go-ethereum/accounts/keystore" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/crypto" + "github.com/google/uuid" "golang.org/x/crypto/ssh" ) @@ -54,3 +62,40 @@ func ParseSshPrivateKey(name string) (ssh.Signer, error) { } return ssh.ParsePrivateKey(sshKey) } + +// EcdsaPrivateKeyToFile writes given private key to the target path in hex encoding. +func EcdsaPrivateKeyToFile(key *ecdsa.PrivateKey, path string) error { + privateKeyBytes := crypto.FromECDSA(key) + pkhex := hexutil.Encode(privateKeyBytes) + pkhex = strings.Trim(pkhex, "0x") + if len(pkhex) != 64 { + return fmt.Errorf("invalid ecdsa key, expected 64 characters, got %v characters", len(pkhex)) + } + + path, err := filepath.Abs(path) + if err != nil { + return err + } + + file, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0600) + if err != nil { + return err + } + defer file.Close() + + return ioutil.WriteFile(path, []byte(pkhex), 0600) +} + +// NewKeystoreFromECDSA parses a existing ecdsa key to a keystore. +func NewKeystoreFromECDSA(privateKeyECDSA *ecdsa.PrivateKey) *keystore.Key { + id, err := uuid.NewRandom() + if err != nil { + panic(fmt.Sprintf("Could not create random uuid: %v", err)) + } + key := &keystore.Key{ + Id: id, + Address: crypto.PubkeyToAddress(privateKeyECDSA.PublicKey), + PrivateKey: privateKeyECDSA, + } + return key +} diff --git a/util/node.go b/util/node.go index 10c33802..b538fc9d 100644 --- a/util/node.go +++ b/util/node.go @@ -59,6 +59,14 @@ func ValidateName(name string) error { return nil } +// NodeExistence checks if there exists a node with given name. It returns nil +// if node exists. +func NodeExistence(name string) error { + path := filepath.Join(Directory, "darknodes", name) + _, err := os.Stat(path) + return err +} + // ValidateNodeExistence checks if there exists a node with given name. func ValidateNodeExistence(name string) error { path := filepath.Join(Directory, "darknodes", name) @@ -69,13 +77,13 @@ func ValidateNodeExistence(name string) error { // Config returns the config of the node with given name. func Config(name string) (darknode.GeneralConfig, error) { path := filepath.Join(NodePath(name), "config.json") - return darknode.NewGeneralConfigFromJSONFile(path) + return darknode.NewGeneralConfigFromFile(path) } // ID gets the ID of the node with given name. func ID(name string) (addr.ID, error) { path := filepath.Join(NodePath(name), "config.json") - config, err := darknode.NewConfigFromJSONFile(path) + config, err := darknode.NewConfigFromFile(path) if err != nil { return addr.ID{}, err } @@ -110,7 +118,7 @@ func Version(name string) string { // Network gets the network of the darknode. func Network(name string) (darknode.Network, error) { path := filepath.Join(NodePath(name), "config.json") - config, err := darknode.NewConfigFromJSONFile(path) + config, err := darknode.NewConfigFromFile(path) if err != nil { return "", err } @@ -120,7 +128,7 @@ func Network(name string) (darknode.Network, error) { // RegisterUrl returns the url for registering a particular darknode. func RegisterUrl(name string) (string, error) { path := filepath.Join(NodePath(name), "config.json") - config, err := darknode.NewConfigFromJSONFile(path) + config, err := darknode.NewConfigFromFile(path) if err != nil { return "", err } diff --git a/util/system.go b/util/system.go index d47e83c5..bb74bda4 100644 --- a/util/system.go +++ b/util/system.go @@ -1,6 +1,7 @@ package util import ( + "bufio" "fmt" "io" "io/ioutil" @@ -34,7 +35,7 @@ func BackUpConfig(name string) error { return Run("bash", "-c", backup) } -// run the command and pipe the output to the stdout +// Run the command and pipe the output to the stdout func Run(name string, args ...string) error { cmd := exec.Command(name, args...) cmd.Stdin = os.Stdin @@ -149,3 +150,10 @@ func CheckWSL() bool { } return strings.Contains(string(file), "Microsoft") } + +// Prompt will display the given text and return the string user enters. +func Prompt(display string) (string, error) { + fmt.Println(display) + reader := bufio.NewReader(os.Stdin) + return reader.ReadString('\n') +}