Change protobuf return for store code to return uint64 not string

This commit is contained in:
Ethan Frey
2021-01-08 17:57:04 +01:00
parent 013491aa9d
commit 33333daf97
5 changed files with 260 additions and 278 deletions

View File

@@ -17,6 +17,19 @@
- [StoreCodeProposal](#cosmwasm.wasm.v1beta1.StoreCodeProposal)
- [UpdateAdminProposal](#cosmwasm.wasm.v1beta1.UpdateAdminProposal)
- [x/wasm/internal/types/types.proto](#x/wasm/internal/types/types.proto)
- [AbsoluteTxPosition](#cosmwasm.wasm.v1beta1.AbsoluteTxPosition)
- [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig)
- [AccessTypeParam](#cosmwasm.wasm.v1beta1.AccessTypeParam)
- [CodeInfo](#cosmwasm.wasm.v1beta1.CodeInfo)
- [ContractCodeHistoryEntry](#cosmwasm.wasm.v1beta1.ContractCodeHistoryEntry)
- [ContractInfo](#cosmwasm.wasm.v1beta1.ContractInfo)
- [Model](#cosmwasm.wasm.v1beta1.Model)
- [Params](#cosmwasm.wasm.v1beta1.Params)
- [AccessType](#cosmwasm.wasm.v1beta1.AccessType)
- [ContractCodeHistoryOperationType](#cosmwasm.wasm.v1beta1.ContractCodeHistoryOperationType)
- [x/wasm/internal/types/query.proto](#x/wasm/internal/types/query.proto)
- [CodeInfoResponse](#cosmwasm.wasm.v1beta1.CodeInfoResponse)
- [ContractInfoWithAddress](#cosmwasm.wasm.v1beta1.ContractInfoWithAddress)
@@ -55,19 +68,6 @@
- [Msg](#cosmwasm.wasm.v1beta1.Msg)
- [x/wasm/internal/types/types.proto](#x/wasm/internal/types/types.proto)
- [AbsoluteTxPosition](#cosmwasm.wasm.v1beta1.AbsoluteTxPosition)
- [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig)
- [AccessTypeParam](#cosmwasm.wasm.v1beta1.AccessTypeParam)
- [CodeInfo](#cosmwasm.wasm.v1beta1.CodeInfo)
- [ContractCodeHistoryEntry](#cosmwasm.wasm.v1beta1.ContractCodeHistoryEntry)
- [ContractInfo](#cosmwasm.wasm.v1beta1.ContractInfo)
- [Model](#cosmwasm.wasm.v1beta1.Model)
- [Params](#cosmwasm.wasm.v1beta1.Params)
- [AccessType](#cosmwasm.wasm.v1beta1.AccessType)
- [ContractCodeHistoryOperationType](#cosmwasm.wasm.v1beta1.ContractCodeHistoryOperationType)
- [Scalar Value Types](#scalar-value-types)
@@ -289,6 +289,186 @@ UpdateAdminProposal gov proposal content type to set an admin for a contract.
<a name="x/wasm/internal/types/types.proto"></a>
<p align="right"><a href="#top">Top</a></p>
## x/wasm/internal/types/types.proto
<a name="cosmwasm.wasm.v1beta1.AbsoluteTxPosition"></a>
### AbsoluteTxPosition
AbsoluteTxPosition is a unique transaction position that allows for global ordering of transactions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| block_height | [uint64](#uint64) | | BlockHeight is the block the contract was created at |
| tx_index | [uint64](#uint64) | | TxIndex is a monotonic counter within the block (actual transaction index, or gas consumed) |
<a name="cosmwasm.wasm.v1beta1.AccessConfig"></a>
### AccessConfig
AccessConfig access control type.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| permission | [AccessType](#cosmwasm.wasm.v1beta1.AccessType) | | |
| address | [string](#string) | | |
<a name="cosmwasm.wasm.v1beta1.AccessTypeParam"></a>
### AccessTypeParam
AccessTypeParam
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [AccessType](#cosmwasm.wasm.v1beta1.AccessType) | | |
<a name="cosmwasm.wasm.v1beta1.CodeInfo"></a>
### CodeInfo
CodeInfo is data for the uploaded contract WASM code
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| code_hash | [bytes](#bytes) | | CodeHash is the unique CodeID |
| creator | [string](#string) | | Creator address who initially stored the code |
| source | [string](#string) | | Source is a valid absolute HTTPS URI to the contract&#39;s source code, optional |
| builder | [string](#string) | | Builder is a valid docker image name with tag, optional |
| instantiate_config | [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) | | InstantiateConfig access control to apply on contract creation, optional |
<a name="cosmwasm.wasm.v1beta1.ContractCodeHistoryEntry"></a>
### ContractCodeHistoryEntry
ContractCodeHistoryEntry metadata to a contract.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| operation | [ContractCodeHistoryOperationType](#cosmwasm.wasm.v1beta1.ContractCodeHistoryOperationType) | | |
| code_id | [uint64](#uint64) | | CodeID is the reference to the stored WASM code |
| updated | [AbsoluteTxPosition](#cosmwasm.wasm.v1beta1.AbsoluteTxPosition) | | Updated Tx position when the operation was executed. |
| msg | [bytes](#bytes) | | |
<a name="cosmwasm.wasm.v1beta1.ContractInfo"></a>
### ContractInfo
ContractInfo stores a WASM contract instance
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| code_id | [uint64](#uint64) | | CodeID is the reference to the stored Wasm code |
| creator | [string](#string) | | Creator address who initially instantiated the contract |
| admin | [string](#string) | | Admin is an optional address that can execute migrations |
| label | [string](#string) | | Label is optional metadata to be stored with a contract instance. |
| created | [AbsoluteTxPosition](#cosmwasm.wasm.v1beta1.AbsoluteTxPosition) | | Created Tx position when the contract was instantiated. This data should kept internal and not be exposed via query results. Just use for sorting |
<a name="cosmwasm.wasm.v1beta1.Model"></a>
### Model
Model is a struct that holds a KV pair
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [bytes](#bytes) | | hex-encode key to read it better (this is often ascii) |
| value | [bytes](#bytes) | | base64-encode raw value |
<a name="cosmwasm.wasm.v1beta1.Params"></a>
### Params
Params defines the set of wasm parameters.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| code_upload_access | [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) | | |
| instantiate_default_permission | [AccessType](#cosmwasm.wasm.v1beta1.AccessType) | | |
| max_wasm_code_size | [uint64](#uint64) | | |
<a name="cosmwasm.wasm.v1beta1.AccessType"></a>
### AccessType
AccessType permission types
| Name | Number | Description |
| ---- | ------ | ----------- |
| ACCESS_TYPE_UNSPECIFIED | 0 | AccessTypeUnspecified placeholder for empty value |
| ACCESS_TYPE_NOBODY | 1 | AccessTypeNobody forbidden |
| ACCESS_TYPE_ONLY_ADDRESS | 2 | AccessTypeOnlyAddress restricted to an address |
| ACCESS_TYPE_EVERYBODY | 3 | AccessTypeEverybody unrestricted |
<a name="cosmwasm.wasm.v1beta1.ContractCodeHistoryOperationType"></a>
### ContractCodeHistoryOperationType
ContractCodeHistoryOperationType actions that caused a code change
| Name | Number | Description |
| ---- | ------ | ----------- |
| CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED | 0 | ContractCodeHistoryOperationTypeUnspecified placeholder for empty value |
| CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT | 1 | ContractCodeHistoryOperationTypeInit on chain contract instantiation |
| CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE | 2 | ContractCodeHistoryOperationTypeMigrate code migration |
| CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS | 3 | ContractCodeHistoryOperationTypeGenesis based on genesis data |
<a name="x/wasm/internal/types/query.proto"></a>
<p align="right"><a href="#top">Top</a></p>
@@ -702,7 +882,7 @@ MsgInstantiateContractResponse return instantiation result data
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| address | [string](#string) | | Address is the address of the new contract instance. |
| address | [string](#string) | | Address is the bech32 address of the new contract instance. |
@@ -769,7 +949,7 @@ MsgStoreCodeResponse returns store result data.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| code_id | [string](#string) | | CodeID is the reference to the stored WASM code |
| code_id | [uint64](#uint64) | | CodeID is the reference to the stored WASM code |
@@ -827,186 +1007,6 @@ Msg defines the wasm Msg service.
<a name="x/wasm/internal/types/types.proto"></a>
<p align="right"><a href="#top">Top</a></p>
## x/wasm/internal/types/types.proto
<a name="cosmwasm.wasm.v1beta1.AbsoluteTxPosition"></a>
### AbsoluteTxPosition
AbsoluteTxPosition is a unique transaction position that allows for global ordering of transactions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| block_height | [uint64](#uint64) | | BlockHeight is the block the contract was created at |
| tx_index | [uint64](#uint64) | | TxIndex is a monotonic counter within the block (actual transaction index, or gas consumed) |
<a name="cosmwasm.wasm.v1beta1.AccessConfig"></a>
### AccessConfig
AccessConfig access control type.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| permission | [AccessType](#cosmwasm.wasm.v1beta1.AccessType) | | |
| address | [string](#string) | | |
<a name="cosmwasm.wasm.v1beta1.AccessTypeParam"></a>
### AccessTypeParam
AccessTypeParam
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [AccessType](#cosmwasm.wasm.v1beta1.AccessType) | | |
<a name="cosmwasm.wasm.v1beta1.CodeInfo"></a>
### CodeInfo
CodeInfo is data for the uploaded contract WASM code
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| code_hash | [bytes](#bytes) | | CodeHash is the unique CodeID |
| creator | [string](#string) | | Creator address who initially stored the code |
| source | [string](#string) | | Source is a valid absolute HTTPS URI to the contract&#39;s source code, optional |
| builder | [string](#string) | | Builder is a valid docker image name with tag, optional |
| instantiate_config | [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) | | InstantiateConfig access control to apply on contract creation, optional |
<a name="cosmwasm.wasm.v1beta1.ContractCodeHistoryEntry"></a>
### ContractCodeHistoryEntry
ContractCodeHistoryEntry metadata to a contract.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| operation | [ContractCodeHistoryOperationType](#cosmwasm.wasm.v1beta1.ContractCodeHistoryOperationType) | | |
| code_id | [uint64](#uint64) | | CodeID is the reference to the stored WASM code |
| updated | [AbsoluteTxPosition](#cosmwasm.wasm.v1beta1.AbsoluteTxPosition) | | Updated Tx position when the operation was executed. |
| msg | [bytes](#bytes) | | |
<a name="cosmwasm.wasm.v1beta1.ContractInfo"></a>
### ContractInfo
ContractInfo stores a WASM contract instance
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| code_id | [uint64](#uint64) | | CodeID is the reference to the stored Wasm code |
| creator | [string](#string) | | Creator address who initially instantiated the contract |
| admin | [string](#string) | | Admin is an optional address that can execute migrations |
| label | [string](#string) | | Label is optional metadata to be stored with a contract instance. |
| created | [AbsoluteTxPosition](#cosmwasm.wasm.v1beta1.AbsoluteTxPosition) | | Created Tx position when the contract was instantiated. This data should kept internal and not be exposed via query results. Just use for sorting |
<a name="cosmwasm.wasm.v1beta1.Model"></a>
### Model
Model is a struct that holds a KV pair
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [bytes](#bytes) | | hex-encode key to read it better (this is often ascii) |
| value | [bytes](#bytes) | | base64-encode raw value |
<a name="cosmwasm.wasm.v1beta1.Params"></a>
### Params
Params defines the set of wasm parameters.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| code_upload_access | [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) | | |
| instantiate_default_permission | [AccessType](#cosmwasm.wasm.v1beta1.AccessType) | | |
| max_wasm_code_size | [uint64](#uint64) | | |
<a name="cosmwasm.wasm.v1beta1.AccessType"></a>
### AccessType
AccessType permission types
| Name | Number | Description |
| ---- | ------ | ----------- |
| ACCESS_TYPE_UNSPECIFIED | 0 | AccessTypeUnspecified placeholder for empty value |
| ACCESS_TYPE_NOBODY | 1 | AccessTypeNobody forbidden |
| ACCESS_TYPE_ONLY_ADDRESS | 2 | AccessTypeOnlyAddress restricted to an address |
| ACCESS_TYPE_EVERYBODY | 3 | AccessTypeEverybody unrestricted |
<a name="cosmwasm.wasm.v1beta1.ContractCodeHistoryOperationType"></a>
### ContractCodeHistoryOperationType
ContractCodeHistoryOperationType actions that caused a code change
| Name | Number | Description |
| ---- | ------ | ----------- |
| CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED | 0 | ContractCodeHistoryOperationTypeUnspecified placeholder for empty value |
| CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT | 1 | ContractCodeHistoryOperationTypeInit on chain contract instantiation |
| CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE | 2 | ContractCodeHistoryOperationTypeMigrate code migration |
| CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS | 3 | ContractCodeHistoryOperationTypeGenesis based on genesis data |
## Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |

View File

@@ -3,16 +3,14 @@ package wasm
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
"strconv"
"testing"
)
// ensure store code returns the expected response
func assertStoreCodeResponse(t *testing.T, data []byte, expected int64) {
func assertStoreCodeResponse(t *testing.T, data []byte, expected uint64) {
var pStoreResp MsgStoreCodeResponse
require.NoError(t, pStoreResp.Unmarshal(data))
// TODO: change this when it we store int natively
require.Equal(t, pStoreResp.CodeID, strconv.FormatInt(expected, 10))
require.Equal(t, pStoreResp.CodeID, expected)
}
// ensure execution returns the expected data

View File

@@ -37,7 +37,7 @@ func (m msgServer) StoreCode(goCtx context.Context, msg *types.MsgStoreCode) (*t
))
return &types.MsgStoreCodeResponse{
CodeID: fmt.Sprintf("%d", codeID),
CodeID: codeID,
}, nil
}

View File

@@ -81,7 +81,7 @@ var xxx_messageInfo_MsgStoreCode proto.InternalMessageInfo
// MsgStoreCodeResponse returns store result data.
type MsgStoreCodeResponse struct {
// CodeID is the reference to the stored WASM code
CodeID string `protobuf:"bytes,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"`
CodeID uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"`
}
func (m *MsgStoreCodeResponse) Reset() { *m = MsgStoreCodeResponse{} }
@@ -168,7 +168,7 @@ var xxx_messageInfo_MsgInstantiateContract proto.InternalMessageInfo
// MsgInstantiateContractResponse return instantiation result data
type MsgInstantiateContractResponse struct {
// Address is the address of the new contract instance.
// Address is the bech32 address of the new contract instance.
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}
@@ -550,57 +550,57 @@ func init() { proto.RegisterFile("x/wasm/internal/types/tx.proto", fileDescripto
var fileDescriptor_5129e02f2349864e = []byte{
// 818 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xeb, 0x44,
0x14, 0x8e, 0x6f, 0xfe, 0x9a, 0x93, 0x70, 0x41, 0xa6, 0x2d, 0xc6, 0x20, 0x27, 0xf8, 0x82, 0x14,
0x04, 0xb5, 0xdb, 0x22, 0x40, 0x02, 0xb1, 0x68, 0x02, 0x48, 0x5d, 0x18, 0x21, 0x5f, 0xa1, 0x2b,
0x55, 0x42, 0x61, 0x62, 0x4f, 0xcd, 0x94, 0x78, 0x26, 0xf2, 0x4c, 0x48, 0x2a, 0xde, 0x80, 0x15,
0x4f, 0xc1, 0x02, 0xf1, 0x20, 0x5d, 0x76, 0xc9, 0x2a, 0x40, 0xca, 0x92, 0x27, 0x60, 0x85, 0xc6,
0x76, 0x5c, 0x37, 0xc4, 0x91, 0x11, 0x62, 0x63, 0xcf, 0x19, 0x7f, 0xe7, 0xfb, 0x7c, 0x3e, 0x9d,
0x33, 0x1a, 0x30, 0x16, 0xf6, 0x1c, 0xf1, 0xd0, 0x26, 0x54, 0xe0, 0x88, 0xa2, 0x89, 0x2d, 0xae,
0xa7, 0x98, 0xdb, 0x62, 0x61, 0x4d, 0x23, 0x26, 0x98, 0x7a, 0xe0, 0x31, 0x1e, 0x4a, 0x84, 0x15,
0x3f, 0xbe, 0x3d, 0x19, 0x63, 0x81, 0x4e, 0x74, 0x43, 0x6e, 0x33, 0x6e, 0x8f, 0x11, 0xc7, 0x76,
0xba, 0x69, 0x7b, 0x8c, 0xd0, 0x24, 0x4d, 0xdf, 0x0f, 0x58, 0xc0, 0xe2, 0xa5, 0x2d, 0x57, 0xe9,
0xee, 0x6b, 0x05, 0x62, 0xf2, 0x99, 0x40, 0x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 0x2f, 0xc1, 0xd1, 0x1d, 0x92, 0x35, 0xfb, 0xf9, 0xf7, 0xfb,
0x50, 0x97, 0x43, 0xf8, 0x25, 0xb4, 0x6e, 0x4f, 0xda, 0xb2, 0x73, 0xac, 0x78, 0x40, 0x99, 0x6f,
0x55, 0x00, 0xe5, 0xae, 0x7e, 0x07, 0x2f, 0x6e, 0x3b, 0x9c, 0x4e, 0xca, 0x39, 0xb6, 0xc0, 0xcd,
0x77, 0xff, 0x15, 0x3c, 0x17, 0x67, 0xf0, 0xfc, 0xe6, 0xd0, 0xbe, 0x59, 0xce, 0xb4, 0x01, 0x35,
0xcf, 0x2a, 0x43, 0x8b, 0x82, 0x9b, 0xc3, 0xb0, 0x43, 0x70, 0x03, 0xba, 0x4b, 0xb0, 0xac, 0x69,
0x03, 0x68, 0x17, 0xbb, 0xf3, 0x8d, 0x72, 0x86, 0x02, 0xcc, 0x3c, 0xa9, 0x04, 0xcb, 0x45, 0xbe,
0x02, 0x28, 0x74, 0xe1, 0xeb, 0xe5, 0xc9, 0xb7, 0x28, 0xf3, 0xed, 0x2a, 0xa8, 0xb5, 0xc2, 0xe0,
0xb3, 0xeb, 0xdf, 0xad, 0xda, 0xf5, 0xca, 0xd2, 0x9e, 0xad, 0x2c, 0xed, 0xb7, 0x95, 0xa5, 0xfd,
0x70, 0x63, 0xd5, 0x9e, 0xdd, 0x58, 0xb5, 0x5f, 0x6e, 0xac, 0xda, 0xe3, 0xd3, 0xc2, 0x69, 0x36,
0x64, 0x3c, 0x7e, 0x24, 0x2f, 0x10, 0x92, 0x35, 0x74, 0x17, 0xd9, 0xfb, 0xee, 0x75, 0x62, 0xdc,
0x50, 0x37, 0x89, 0x77, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xda, 0x83, 0x14, 0xdb, 0x08,
0x00, 0x00,
}
@@ -959,12 +959,10 @@ func (m *MsgStoreCodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.CodeID) > 0 {
i -= len(m.CodeID)
copy(dAtA[i:], m.CodeID)
i = encodeVarintTx(dAtA, i, uint64(len(m.CodeID)))
if m.CodeID != 0 {
i = encodeVarintTx(dAtA, i, uint64(m.CodeID))
i--
dAtA[i] = 0xa
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
@@ -1409,9 +1407,8 @@ func (m *MsgStoreCodeResponse) Size() (n int) {
}
var l int
_ = l
l = len(m.CodeID)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
if m.CodeID != 0 {
n += 1 + sovTx(uint64(m.CodeID))
}
return n
}
@@ -1851,10 +1848,10 @@ func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error {
}
switch fieldNum {
case 1:
if wireType != 2 {
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType)
}
var stringLen uint64
m.CodeID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
@@ -1864,24 +1861,11 @@ func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
m.CodeID |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CodeID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])

View File

@@ -41,7 +41,7 @@ message MsgStoreCode {
// MsgStoreCodeResponse returns store result data.
message MsgStoreCodeResponse{
// CodeID is the reference to the stored WASM code
string code_id = 1 [(gogoproto.customname) = "CodeID"];
uint64 code_id = 1 [(gogoproto.customname) = "CodeID"];
}
// MsgInstantiateContract create a new smart contract instance for the given code id.