Constant Table
GET /tables/constant?args
List registered global constants.
- Schema
- Response
- Example
Field | Description |
---|---|
row_id uint64 | Unique row identifier. |
address hash | Constant address expression hash. |
creator_id uint64 | Unique row_id of creator account. |
creator hash | Creator account address. |
value bytes | Micheline encoded value. |
height int64 | Block height when constant was registered. |
storage_size int64 | Storage size allocated in bytes. |
features string | Comma separated list of Michelson features used by this contract. Any of account_factory , contract_factory , set_delegate , lambda , transfer_tokens , chain_id , ticket , sapling ,global_constant , timelock , view |
[
[
28402, // row_id
"exprteofHrmfpTEhdfQrQyt7LjVcYJfTsqgtPEQCT2kneXWm5DkH1m", // address
1234, // creator_id
"tz1gt8TgBeWomA6dpqKeuzo8Umxfc78eS5Z6", // creator
"020...", // value
64862, // height
2822, // storage_size
"" // features
]
]
curl "https://api.tzpro.io/tables/constant?address=exprteofHrmfpTEhdfQrQyt7LjVcYJfTsqgtPEQCT2kneXWm5DkH1m"
import (
"context"
"github.com/trilitech/tzpro-go/tzpro"
)
// create a new query object
q := tzpro.DefaultClient.Contract.NewConstantQuery()
// add filters and configure the query
q.WithFilter(tzpro.FilterModeEqual, "address", "exprteofHrmfpTEhdfQrQyt7LjVcYJfTsqgtPEQCT2kneXWm5DkH1m")
// execute the query
list, err := q.Run(context.Background())
// process contracts
if _, row := range list.Rows {
}