augment-api-consts.ts 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
  2. /* eslint-disable */
  3. import { Vec } from '@polkadot/types/codec';
  4. import { u32, u64 } from '@polkadot/types/primitive';
  5. import { Balance, BalanceOf, BlockNumber, Moment, Perbill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime';
  6. import { SessionIndex } from '@polkadot/types/interfaces/session';
  7. import { EraIndex } from '@polkadot/types/interfaces/staking';
  8. import { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
  9. declare module '@polkadot/metadata/Decorated/consts/types' {
  10. export interface Constants {
  11. babe: {
  12. /**
  13. * The number of **slots** that an epoch takes. We couple sessions to
  14. * epochs, i.e. we start a new session once the new epoch begins.
  15. **/
  16. epochDuration: AugmentedConst<u64>;
  17. /**
  18. * The expected average block time at which BABE should be creating
  19. * blocks. Since BABE is probabilistic it is not trivial to figure out
  20. * what the expected average block time should be based on the slot
  21. * duration and the security parameter `c` (where `1 - c` represents
  22. * the probability of a slot being empty).
  23. **/
  24. expectedBlockTime: AugmentedConst<Moment>;
  25. };
  26. balances: {
  27. /**
  28. * The minimum amount required to keep an account open.
  29. **/
  30. existentialDeposit: AugmentedConst<Balance>;
  31. };
  32. contracts: {
  33. /**
  34. * The maximum nesting level of a call/instantiate stack. A reasonable default
  35. * value is 100.
  36. **/
  37. maxDepth: AugmentedConst<u32>;
  38. /**
  39. * The maximum size of a storage value in bytes. A reasonable default is 16 KiB.
  40. **/
  41. maxValueSize: AugmentedConst<u32>;
  42. /**
  43. * Price of a byte of storage per one block interval. Should be greater than 0.
  44. **/
  45. rentByteFee: AugmentedConst<BalanceOf>;
  46. /**
  47. * The amount of funds a contract should deposit in order to offset
  48. * the cost of one byte.
  49. *
  50. * Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day,
  51. * then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent.
  52. * But if the balance reduced to 500,000 BU and the storage stayed the same at 1,000,
  53. * then it would pay 500 BU/day.
  54. **/
  55. rentDepositOffset: AugmentedConst<BalanceOf>;
  56. /**
  57. * Number of block delay an extrinsic claim surcharge has.
  58. *
  59. * When claim surcharge is called by an extrinsic the rent is checked
  60. * for current_block - delay
  61. **/
  62. signedClaimHandicap: AugmentedConst<BlockNumber>;
  63. /**
  64. * A size offset for an contract. A just created account with untouched storage will have that
  65. * much of storage from the perspective of the state rent.
  66. *
  67. * This is a simple way to ensure that contracts with empty storage eventually get deleted
  68. * by making them pay rent. This creates an incentive to remove them early in order to save
  69. * rent.
  70. **/
  71. storageSizeOffset: AugmentedConst<u32>;
  72. /**
  73. * Reward that is received by the party whose touch has led
  74. * to removal of a contract.
  75. **/
  76. surchargeReward: AugmentedConst<BalanceOf>;
  77. /**
  78. * The minimum amount required to generate a tombstone.
  79. **/
  80. tombstoneDeposit: AugmentedConst<BalanceOf>;
  81. };
  82. dataDirectory: {
  83. /**
  84. * Maximum objects allowed per inject_data_objects() transaction
  85. **/
  86. maxObjectsPerInjection: AugmentedConst<u32>;
  87. };
  88. finalityTracker: {
  89. /**
  90. * The delay after which point things become suspicious. Default is 1000.
  91. **/
  92. reportLatency: AugmentedConst<BlockNumber>;
  93. /**
  94. * The number of recent samples to keep from this chain. Default is 101.
  95. **/
  96. windowSize: AugmentedConst<BlockNumber>;
  97. };
  98. proposalsCodex: {
  99. /**
  100. * Exports max wasm code length of the runtime upgrade proposal const.
  101. **/
  102. runtimeUpgradeWasmProposalMaxLength: AugmentedConst<u32>;
  103. /**
  104. * Exports max allowed text proposal length const.
  105. **/
  106. textProposalMaxLength: AugmentedConst<u32>;
  107. };
  108. proposalsDiscussion: {
  109. /**
  110. * Exports post edition number limit const.
  111. **/
  112. maxPostEditionNumber: AugmentedConst<u32>;
  113. /**
  114. * Exports max thread by same author in a row number limit const.
  115. **/
  116. maxThreadInARowNumber: AugmentedConst<u32>;
  117. /**
  118. * Exports post length limit const.
  119. **/
  120. postLengthLimit: AugmentedConst<u32>;
  121. /**
  122. * Exports thread title length limit const.
  123. **/
  124. threadTitleLengthLimit: AugmentedConst<u32>;
  125. };
  126. proposalsEngine: {
  127. /**
  128. * Exports const - the fee is applied when cancel the proposal. A fee would be slashed (burned).
  129. **/
  130. cancellationFee: AugmentedConst<BalanceOf>;
  131. /**
  132. * Exports const - max allowed proposal description length.
  133. **/
  134. descriptionMaxLength: AugmentedConst<u32>;
  135. /**
  136. * Exports const - max simultaneous active proposals number.
  137. **/
  138. maxActiveProposalLimit: AugmentedConst<u32>;
  139. /**
  140. * Exports const - the fee is applied when the proposal gets rejected. A fee would be slashed (burned).
  141. **/
  142. rejectionFee: AugmentedConst<BalanceOf>;
  143. /**
  144. * Exports const - max allowed proposal title length.
  145. **/
  146. titleMaxLength: AugmentedConst<u32>;
  147. };
  148. staking: {
  149. /**
  150. * Number of eras that staked funds must remain bonded for.
  151. **/
  152. bondingDuration: AugmentedConst<EraIndex>;
  153. /**
  154. * The number of blocks before the end of the era from which election submissions are allowed.
  155. *
  156. * Setting this to zero will disable the offchain compute and only on-chain seq-phragmen will
  157. * be used.
  158. *
  159. * This is bounded by being within the last session. Hence, setting it to a value more than the
  160. * length of a session will be pointless.
  161. **/
  162. electionLookahead: AugmentedConst<BlockNumber>;
  163. /**
  164. * Maximum number of balancing iterations to run in the offchain submission.
  165. *
  166. * If set to 0, balance_solution will not be executed at all.
  167. **/
  168. maxIterations: AugmentedConst<u32>;
  169. /**
  170. * The maximum number of nominators rewarded for each validator.
  171. *
  172. * For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim
  173. * their reward. This used to limit the i/o cost for the nominator payout.
  174. **/
  175. maxNominatorRewardedPerValidator: AugmentedConst<u32>;
  176. /**
  177. * The threshold of improvement that should be provided for a new solution to be accepted.
  178. **/
  179. minSolutionScoreBump: AugmentedConst<Perbill>;
  180. /**
  181. * Number of sessions per era.
  182. **/
  183. sessionsPerEra: AugmentedConst<SessionIndex>;
  184. /**
  185. * Number of eras that slashes are deferred by, after computation.
  186. *
  187. * This should be less than the bonding duration.
  188. * Set to 0 if slashes should be applied immediately, without opportunity for
  189. * intervention.
  190. **/
  191. slashDeferDuration: AugmentedConst<EraIndex>;
  192. };
  193. storageWorkingGroup: {
  194. /**
  195. * Exports const - max simultaneous active worker number.
  196. **/
  197. maxWorkerNumberLimit: AugmentedConst<u32>;
  198. };
  199. system: {
  200. /**
  201. * The base weight of executing a block, independent of the transactions in the block.
  202. **/
  203. blockExecutionWeight: AugmentedConst<Weight>;
  204. /**
  205. * The maximum number of blocks to allow in mortal eras.
  206. **/
  207. blockHashCount: AugmentedConst<BlockNumber>;
  208. /**
  209. * The weight of runtime database operations the runtime can invoke.
  210. **/
  211. dbWeight: AugmentedConst<RuntimeDbWeight>;
  212. /**
  213. * The base weight of an Extrinsic in the block, independent of the of extrinsic being executed.
  214. **/
  215. extrinsicBaseWeight: AugmentedConst<Weight>;
  216. /**
  217. * The maximum length of a block (in bytes).
  218. **/
  219. maximumBlockLength: AugmentedConst<u32>;
  220. /**
  221. * The maximum weight of a block.
  222. **/
  223. maximumBlockWeight: AugmentedConst<Weight>;
  224. };
  225. timestamp: {
  226. /**
  227. * The minimum period between blocks. Beware that this is different to the *expected* period
  228. * that the block production apparatus provides. Your chosen consensus system will generally
  229. * work with this to determine a sensible block time. e.g. For Aura, it will be double this
  230. * period on default settings.
  231. **/
  232. minimumPeriod: AugmentedConst<Moment>;
  233. };
  234. transactionPayment: {
  235. /**
  236. * The fee to be paid for making a transaction; the per-byte portion.
  237. **/
  238. transactionByteFee: AugmentedConst<BalanceOf>;
  239. /**
  240. * The polynomial that is applied in order to derive fee from weight.
  241. **/
  242. weightToFee: AugmentedConst<Vec<WeightToFeeCoefficient>>;
  243. };
  244. }
  245. }