diff --git a/x/compute/internal/types/types.go b/x/compute/internal/types/types.go index 784959b68..94d169577 100644 --- a/x/compute/internal/types/types.go +++ b/x/compute/internal/types/types.go @@ -334,6 +334,13 @@ var ZeroSender = sdk.AccAddress{ } func (c ContractInfo) InitialHistory(initMsg []byte) ContractCodeHistoryEntry { + if c.Created == nil { + c.Created = &AbsoluteTxPosition{ + BlockHeight: 0, + TxIndex: 0, + } + } + return ContractCodeHistoryEntry{ Operation: ContractCodeHistoryOperationTypeInit, CodeID: c.CodeID,