Types
The provided Solidity code defines several struct types, each serving a specific purpose within a smart contract or a system
1. Dec:
Description: Represents a fixed point decimal value, stored as an integer multiplied by 10^precision to obtain the actual value.
Properties:
value: Unsigned integer storing the value.
precision: Unsigned integer of 8 bits (uint8) representing the precision.
Unsigned integer of 8 bits (uint8) representing the precision.
2. Coin
Description: Represents a token with a denomination and an amount.
Properties:
denom: String representing the denomination of the token.
amount: Unsigned integer storing the token's amount.
3. DecCoin
Description: Represents a token with a denomination, an amount, and a precision.
Properties:
denom: String representing the denomination of the token.
amount: Unsigned integer storing the token's amount.
precision: Unsigned integer of 8 bits (uint8) representing the precision of the token amount.
4. PageResponse
Description: Represents a page response.
Properties:
nextKey: Bytes representing the next key for pagination.
total: Unsigned integer (uint64) representing the total count.
5.Page Request
Description: Represents a page request for pagination purposes.
Properties:
key: Bytes representing the key for pagination.
offset: Unsigned integer (uint64) specifying the offset for pagination.
limit: Unsigned integer (uint64) specifying the limit for pagination.
countTotal: Boolean indicating whether total count should be calculated.
reverse: Boolean indicating whether the pagination should be in reverse order.
6. Height
Description: Represents a monotonically increasing data type used for comparison and updating/freezing clients.
Properties:
revisionNumber: Unsigned integer (uint64) representing the revision the client is currently on.
revisionHeight: Unsigned integer (uint64) representing the height within the given revision.
Last updated