diff --git a/cmd/chainbridge/account.go b/cmd/chainbridge/account.go index 85fa5a09a..732ce549f 100644 --- a/cmd/chainbridge/account.go +++ b/cmd/chainbridge/account.go @@ -63,7 +63,7 @@ func handleGenerateCmd(ctx *cli.Context, dHandler *dataHandler) error { password = []byte(pwdflag) } - _, err := generateKeypair(keytype, dHandler.datadir, password, uint8(ctx.Uint(config.SubkeyNetworkFlag.Name))) + _, err := generateKeypair(keytype, dHandler.datadir, password, uint16(ctx.Uint(config.SubkeyNetworkFlag.Name))) if err != nil { return fmt.Errorf("failed to generate key: %w", err) } @@ -159,7 +159,7 @@ func importPrivKey(ctx *cli.Context, keytype, datadir, key string, password []by if keytype == crypto.Sr25519Type { // generate sr25519 keys network := ctx.Uint(config.SubkeyNetworkFlag.Name) - kp, err = sr25519.NewKeypairFromSeed(key, uint8(network)) + kp, err = sr25519.NewKeypairFromSeed(key, uint16(network)) if err != nil { return "", fmt.Errorf("could not generate sr25519 keypair from given string: %w", err) } @@ -335,7 +335,7 @@ func getKeyFiles(datadir string) ([]string, error) { // generateKeypair create a new keypair with the corresponding type and saves it to datadir/keystore/[public key].key // in json format encrypted using the specified password // it returns the resulting filepath of the new key -func generateKeypair(keytype, datadir string, password []byte, subNetwork uint8) (string, error) { +func generateKeypair(keytype, datadir string, password []byte, subNetwork uint16) (string, error) { if password == nil { password = keystore.GetPassword("Enter password to encrypt keystore file:") } diff --git a/go.mod b/go.mod index dbb9bdbb8..34fffdc0e 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/ChainSafe/log15 v1.0.0 github.com/centrifuge/chain-custom-types v0.0.0-20220323235722-1cdf9a3ad7f1 github.com/centrifuge/chainbridge-substrate-events v0.0.0-20220215222726-8c1d3a5cad10 - github.com/centrifuge/chainbridge-utils v1.1.1-0.20221001051926-ecac2af5cb68 + github.com/centrifuge/chainbridge-utils v1.1.1-0.20230713101127-172c1a918855 github.com/ethereum/go-ethereum v1.10.20 github.com/prometheus/client_golang v1.4.1 github.com/stretchr/testify v1.7.2 diff --git a/go.sum b/go.sum index e8522ac99..e21462651 100644 --- a/go.sum +++ b/go.sum @@ -13,17 +13,16 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= +github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= github.com/centrifuge/chain-custom-types v0.0.0-20220323235722-1cdf9a3ad7f1 h1:i72MKnaZ//Nw9T1bJT4PdpfXGfKGckzkHHf97FKyRDI= github.com/centrifuge/chain-custom-types v0.0.0-20220323235722-1cdf9a3ad7f1/go.mod h1:E+MHt0riACBcD/pPctnW6h6BLNa5BRWF49uz31yFUfQ= github.com/centrifuge/chainbridge-substrate-events v0.0.0-20220215222726-8c1d3a5cad10 h1:KNpThzo0t8/jpOiY3b2IWSpvksev0XKIR+8mxbNU0zY= github.com/centrifuge/chainbridge-substrate-events v0.0.0-20220215222726-8c1d3a5cad10/go.mod h1:e5ffvnL405ZXm5n2inQQqDeIWpa6o7FNRwx1QQC8mWo= -github.com/centrifuge/chainbridge-utils v1.1.1-0.20221001051926-ecac2af5cb68 h1:DAm8uyQPQnk8DrV0/BHzzPGiOcK3tL1RRHaX9eqY54U= -github.com/centrifuge/chainbridge-utils v1.1.1-0.20221001051926-ecac2af5cb68/go.mod h1:j5KH69eOiNMy9HCTLj8qABZ4/Lx4SIP29JcPtyA1Neo= +github.com/centrifuge/chainbridge-utils v1.1.1-0.20230713101127-172c1a918855 h1:d1K9UgnQOhjn0nraQ+S0Zkx41OSSjXLSD+b1tB20k6E= +github.com/centrifuge/chainbridge-utils v1.1.1-0.20230713101127-172c1a918855/go.mod h1:/yQYLxYWNl7C/gsBf2pCJRCT6n9K88fdLAse/haCoCI= github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.17-0.20230713095918-d6e1d43a5270 h1:LMY8PtQg+kMt3fAO2vmfx3kUepcpxj4/pV2FWzOnoc8= github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.17-0.20230713095918-d6e1d43a5270/go.mod h1:szA5wf9suAIcNg/1S3rGeFITHqrnqH5TC6b+O0SEQ94= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk=