Skip to content

Add derivative hook contract#1741

Merged
cboh4 merged 3 commits into
masterfrom
add-derivative-hook-contract
May 13, 2026
Merged

Add derivative hook contract#1741
cboh4 merged 3 commits into
masterfrom
add-derivative-hook-contract

Conversation

@cboh4
Copy link
Copy Markdown
Contributor

@cboh4 cboh4 commented May 7, 2026

No description provided.

Comment on lines +221 to +247
for contractAddrStr, newAdmin := range hardcodedContractAdmins {
if newAdmin == "" {
continue
}

contractAddress, err := sdk.AccAddressFromBech32(contractAddrStr)
if err != nil {
ctx.Logger().Error("Migrate8to9: invalid contract address in hardcoded admins", "contract", contractAddrStr, "error", err)
continue
}

bz := store.Get(contractAddress)
if bz != nil {
var contractInfo types.ContractInfo
m.keeper.cdc.MustUnmarshal(bz, &contractInfo)

if newAdmin != contractInfo.Admin {
contractInfo.Admin = newAdmin
contractInfo.AdminProof = make([]byte, 32) // Dummy proof, ignored by enclave

updatedBz := m.keeper.cdc.MustMarshal(&contractInfo)
store.Set(contractAddress, updatedBz)

ctx.Logger().Info("Migrate8to9: successfully migrated admin for contract", "contract", contractAddrStr, "new_admin", newAdmin)
}
}
}
@cboh4 cboh4 merged commit d123a83 into master May 13, 2026
8 of 11 checks passed
@cboh4 cboh4 deleted the add-derivative-hook-contract branch May 13, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants