diff --git a/.gitignore b/.gitignore index 3d80f46..8ce20e5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,7 @@ dist/ .null* jarvis output.json +approve.sh +migrate_signer_in_multiple_msig.sh +scan_multisig_for_signers.sh +test.json diff --git a/cmd/util/context_manager.go b/cmd/util/context_manager.go index 521515b..983ab43 100644 --- a/cmd/util/context_manager.go +++ b/cmd/util/context_manager.go @@ -85,6 +85,7 @@ func (cm *ContextManager) UnlockAccount(addr common.Address) (*account.Account, if err != nil { return nil, fmt.Errorf( "You don't control wallet %s yet. You might want to add it to jarvis.\n", + addr.Hex(), ) } acc, err := accounts.UnlockAccount(accDesc) diff --git a/cmd/util/prompt_util.go b/cmd/util/prompt_util.go index c27cd35..8c9c3a3 100644 --- a/cmd/util/prompt_util.go +++ b/cmd/util/prompt_util.go @@ -239,7 +239,7 @@ func PromptArray(input abi.Argument, prefill string, network Network) (interface return result, nil case abi.BytesTy: return nil, fmt.Errorf( - "not supported array of type: %s - %s", + "not supported array of type: %s - %x", input.Type.Elem, input.Type.Elem.T, ) @@ -247,7 +247,7 @@ func PromptArray(input abi.Argument, prefill string, network Network) (interface return util.ConvertParamStrToFixedByteType(input.Name, *input.Type.Elem, paramsStr, network) case abi.FunctionTy: return nil, fmt.Errorf( - "not supported array of type: %s - %s", + "not supported array of type: %s - %x", input.Type.Elem, input.Type.Elem.T, ) @@ -267,7 +267,7 @@ func PromptArray(input abi.Argument, prefill string, network Network) (interface return result, nil default: return nil, fmt.Errorf( - "not supported array of type: %s - %s", + "not supported array of type: %s - %x", input.Type.Elem, input.Type.Elem.T, ) diff --git a/networks/supported_networks.go b/networks/supported_networks.go index 9782c60..4098457 100644 --- a/networks/supported_networks.go +++ b/networks/supported_networks.go @@ -47,7 +47,7 @@ func (n *networks) getSupportedNetworkNames() []string { func (n *networks) getNetworkByID(id uint64) (Network, error) { res, found := n.networksByID[id] if !found { - return nil, fmt.Errorf("network id %s is not supported", id) + return nil, fmt.Errorf("network id %d is not supported", id) } return res, nil } @@ -67,7 +67,12 @@ func newSupportedNetworks() *networks { } for _, n := range supportedNetworks { if _, found := result.networks[n.GetName()]; found { - panic(fmt.Errorf("network with name or alternative name of %s already exists", n.GetName())) + panic( + fmt.Errorf( + "network with name or alternative name of %s already exists", + n.GetName(), + ), + ) } result.networks[n.GetName()] = n result.networksByID[n.GetChainID()] = n diff --git a/util/account/ledgereum/ledger_driver.go b/util/account/ledgereum/ledger_driver.go index cfaa9ee..8c20895 100644 --- a/util/account/ledgereum/ledger_driver.go +++ b/util/account/ledgereum/ledger_driver.go @@ -318,7 +318,7 @@ func (w *ledgerDriver) ledgerSign( tx *types.Transaction, chainId *big.Int, ) (common.Address, *types.Transaction, error) { - DebugPrintf("derivation path: %s\n", derivationPath) + DebugPrintf("derivation path: %x\n", derivationPath) // Flatten the derivation path into the Ledger request path := make([]byte, 1+4*len(derivationPath)) path[0] = byte(len(derivationPath)) diff --git a/util/convert_util.go b/util/convert_util.go index 049503d..533c3fa 100644 --- a/util/convert_util.go +++ b/util/convert_util.go @@ -545,7 +545,7 @@ func ConvertParamStrToTupleType( value, err := ConvertParamStrToType(name, *t.TupleElems[i], inputElems[i], network) if err != nil { return nil, fmt.Errorf( - "couldn't parse field %s (%s), index %d with input \"%s\"", + "couldn't parse field %d (%s), index %d with input \"%s\"", i, field.Name, field.Type, inputElems[i]) }