-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add tokenfactory #3491
base: main
Are you sure you want to change the base?
feat: add tokenfactory #3491
Conversation
for _, m := range app.ModuleManager.Modules { | ||
if moduleWithName, ok := m.(module.HasName); ok { | ||
moduleName := moduleWithName.Name() | ||
if appModule, ok := moduleWithName.(appmodule.AppModule); ok { | ||
modules[moduleName] = appModule | ||
} | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for _, key := range app.keys { | ||
keys = append(keys, key) | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for k, v := range maccPerms { | ||
dupMaccPerms[k] = v | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for acc := range GetMaccPerms() { | ||
modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
return paramsKeeper | ||
} | ||
|
||
var seededRand *rand.Rand = rand.New(rand.NewSource(time.Now().UnixNano())) |
Check warning
Code scanning / CodeQL
Calling the system time Warning
// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address. | ||
Bech32PrefixValAddr = Bech32PrefixAccAddr + "valoper" | ||
// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key. | ||
Bech32PrefixValPub = Bech32PrefixAccAddr + "valoperpub" |
Check warning
Code scanning / CodeQL
Directly using the bech32 constants Warning
// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key. | ||
Bech32PrefixValPub = Bech32PrefixAccAddr + "valoperpub" | ||
// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address. | ||
Bech32PrefixConsAddr = Bech32PrefixAccAddr + "valcons" |
Check warning
Code scanning / CodeQL
Directly using the bech32 constants Warning
// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address. | ||
Bech32PrefixConsAddr = Bech32PrefixAccAddr + "valcons" | ||
// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key. | ||
Bech32PrefixConsPub = Bech32PrefixAccAddr + "valconspub" |
Check warning
Code scanning / CodeQL
Directly using the bech32 constants Warning
|
||
func SetAddressPrefixes() { | ||
config := sdk.GetConfig() | ||
config.SetBech32PrefixForAccount(Bech32PrefixAccAddr, Bech32PrefixAccPub) |
Check warning
Code scanning / CodeQL
Directly using the bech32 constants Warning
for name, perms := range maccPerms { | ||
permAddrs[name] = authtypes.NewPermissionsForAddress(name, perms) | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
Thank you for this. CW should never be added to a chain without token factory. |
Please go the
Preview
tab and select the appropriate sub-template:fix
,feat
, andrefactor
.