Skip to content

Commit

Permalink
Fixing name casing for PermissionController.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Chatham committed Dec 20, 2024
1 parent c2daa7a commit af29a05
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 55 deletions.
10 changes: 5 additions & 5 deletions pkg/user/admin/accept.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ func readAndValidateAcceptAdminConfig(
}

chainID := utils.NetworkNameToChainId(network)
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -176,15 +176,15 @@ func readAndValidateAcceptAdminConfig(
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &acceptAdminConfig{
Network: network,
RPCUrl: ethRpcUrl,
AccountAddress: accountAddress,
CallerAddress: callerAddress,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
SignerConfig: *signerConfig,
ChainID: chainID,
Environment: environment,
Expand Down
10 changes: 5 additions & 5 deletions pkg/user/admin/add_pending.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ func readAndValidateAddPendingAdminConfig(
}

chainID := utils.NetworkNameToChainId(network)
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -180,7 +180,7 @@ func readAndValidateAddPendingAdminConfig(
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &addPendingAdminConfig{
Expand All @@ -190,7 +190,7 @@ func readAndValidateAddPendingAdminConfig(
AdminAddress: adminAddress,
CallerAddress: callerAddress,
SignerConfig: *signerConfig,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
ChainID: chainID,
Environment: environment,
OutputFile: outputFile,
Expand Down
10 changes: 5 additions & 5 deletions pkg/user/admin/is_admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ func readAndValidateIsAdminConfig(cliContext *cli.Context, logger logging.Logger
}

chainID := utils.NetworkNameToChainId(network)
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

var err error
if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -88,15 +88,15 @@ func readAndValidateIsAdminConfig(cliContext *cli.Context, logger logging.Logger
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &isAdminConfig{
Network: network,
RPCUrl: ethRpcUrl,
AccountAddress: accountAddress,
AdminAddress: adminAddress,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
ChainID: chainID,
Environment: environment,
}, nil
Expand Down
10 changes: 5 additions & 5 deletions pkg/user/admin/is_pending.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ func readAndValidateIsPendingAdminConfig(
}

chainID := utils.NetworkNameToChainId(network)
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

var err error
if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -96,15 +96,15 @@ func readAndValidateIsPendingAdminConfig(
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &isPendingAdminConfig{
Network: network,
RPCUrl: ethRpcUrl,
AccountAddress: accountAddress,
PendingAdminAddress: pendingAdminAddress,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
ChainID: chainID,
Environment: environment,
}, nil
Expand Down
10 changes: 5 additions & 5 deletions pkg/user/admin/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ func readAndValidateRemoveAdminConfig(
}

chainID := utils.NetworkNameToChainId(network)
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -178,7 +178,7 @@ func readAndValidateRemoveAdminConfig(
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &removeAdminConfig{
Expand All @@ -187,7 +187,7 @@ func readAndValidateRemoveAdminConfig(
AccountAddress: accountAddress,
AdminAddress: adminAddress,
CallerAddress: callerAddress,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
SignerConfig: *signerConfig,
ChainID: chainID,
Environment: environment,
Expand Down
10 changes: 5 additions & 5 deletions pkg/user/admin/remove_pending.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ func readAndValidateRemovePendingAdminConfig(
}

chainID := utils.NetworkNameToChainId(network)
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -178,7 +178,7 @@ func readAndValidateRemovePendingAdminConfig(
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &removePendingAdminConfig{
Expand All @@ -187,7 +187,7 @@ func readAndValidateRemovePendingAdminConfig(
AccountAddress: accountAddress,
AdminAddress: adminAddress,
CallerAddress: callerAddress,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
SignerConfig: *signerConfig,
ChainID: chainID,
Environment: environment,
Expand Down
10 changes: 5 additions & 5 deletions pkg/user/appointee/can_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ func readAndValidateCanCallConfig(cliContext *cli.Context, logger logging.Logger
}

chainID := utils.NetworkNameToChainId(network)
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -98,7 +98,7 @@ func readAndValidateCanCallConfig(cliContext *cli.Context, logger logging.Logger
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &canCallConfig{
Expand All @@ -108,7 +108,7 @@ func readAndValidateCanCallConfig(cliContext *cli.Context, logger logging.Logger
AppointeeAddress: appointeeAddress,
Target: target,
Selector: selectorBytes,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
ChainID: chainID,
Environment: environment,
}, nil
Expand Down
10 changes: 5 additions & 5 deletions pkg/user/appointee/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ func readAndValidateListAppointeesConfig(

chainID := utils.NetworkNameToChainId(network)
cliContext.App.Metadata["network"] = chainID.String()
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -116,7 +116,7 @@ func readAndValidateListAppointeesConfig(
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &listAppointeesConfig{
Expand All @@ -125,7 +125,7 @@ func readAndValidateListAppointeesConfig(
AccountAddress: accountAddress,
Target: target,
Selector: selectorBytes,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
ChainID: chainID,
Environment: environment,
}, nil
Expand Down
10 changes: 5 additions & 5 deletions pkg/user/appointee/list_permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ func readAndValidateListAppointeePermissionsConfig(
}

chainID := utils.NetworkNameToChainId(network)
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

var err error
if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -98,15 +98,15 @@ func readAndValidateListAppointeePermissionsConfig(
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &listAppointeePermissionsConfig{
Network: network,
RPCUrl: ethRpcUrl,
AccountAddress: accountAddress,
AppointeeAddress: appointeeAddress,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
ChainID: chainID,
Environment: environment,
}, nil
Expand Down
10 changes: 5 additions & 5 deletions pkg/user/appointee/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ func readAndValidateRemoveConfig(cliContext *cli.Context, logger logging.Logger)

chainID := utils.NetworkNameToChainId(network)
cliContext.App.Metadata["network"] = chainID.String()
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -210,7 +210,7 @@ func readAndValidateRemoveConfig(cliContext *cli.Context, logger logging.Logger)
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &removeConfig{
Expand All @@ -222,7 +222,7 @@ func readAndValidateRemoveConfig(cliContext *cli.Context, logger logging.Logger)
Target: target,
Selector: selectorBytes,
SignerConfig: *signerConfig,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
ChainID: chainID,
Environment: environment,
Broadcast: broadcast,
Expand Down
10 changes: 5 additions & 5 deletions pkg/user/appointee/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ func readAndValidateSetConfig(cliContext *cli.Context, logger logging.Logger) (*

chainID := utils.NetworkNameToChainId(network)
cliContext.App.Metadata["network"] = chainID.String()
PermissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)
permissionControllerAddress := cliContext.String(PermissionControllerAddressFlag.Name)

if common.IsEmptyString(PermissionControllerAddress) {
PermissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if common.IsEmptyString(permissionControllerAddress) {
permissionControllerAddress, err = common.GetPermissionControllerAddress(utils.NetworkNameToChainId(network))
if err != nil {
return nil, err
}
Expand All @@ -214,7 +214,7 @@ func readAndValidateSetConfig(cliContext *cli.Context, logger logging.Logger) (*
environment,
network,
chainID,
PermissionControllerAddress,
permissionControllerAddress,
)

return &setConfig{
Expand All @@ -226,7 +226,7 @@ func readAndValidateSetConfig(cliContext *cli.Context, logger logging.Logger) (*
Target: target,
Selector: selectorBytes,
SignerConfig: *signerConfig,
PermissionControllerAddress: gethcommon.HexToAddress(PermissionControllerAddress),
PermissionControllerAddress: gethcommon.HexToAddress(permissionControllerAddress),
ChainID: chainID,
Environment: environment,
OutputFile: outputFile,
Expand Down

0 comments on commit af29a05

Please sign in to comment.