3
0

types.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import { Accountdata } from '@polkadot/types/interfaces'
  2. export interface AccountBalance {
  3. accountId: string
  4. balance: AccountData
  5. }
  6. export interface ElectionInfo {
  7. durations: number[]
  8. stage: any
  9. round: number
  10. stageEndsAt: number
  11. termEndsAt: number
  12. }
  13. export interface ProposalDetail {
  14. created: number
  15. finalizedAt: number
  16. message: string
  17. parameters: string
  18. stage: any
  19. result: string
  20. exec: any
  21. id: number
  22. title: string
  23. description: any
  24. votes: VotingResults
  25. type: string
  26. votesByAccount?: Vote[]
  27. author?: string
  28. authorId: number
  29. }
  30. export interface Round {
  31. round: number
  32. start: number
  33. end: number
  34. }
  35. export class Bounty {
  36. constructor(
  37. public testnet: string,
  38. public proposalId: number,
  39. public title: string,
  40. public status: string,
  41. public amountAsked: number,
  42. public amountMinted: number
  43. ) {}
  44. }
  45. export class CacheEvent {
  46. constructor(
  47. public section: string,
  48. public method: string,
  49. public data: GenericEventData
  50. ) {}
  51. }
  52. export class MintStatistics {
  53. startMinted: number;
  54. endMinted: number;
  55. diffMinted: number;
  56. percMinted: number;
  57. constructor(
  58. startMinted: number = 0,
  59. endMinted: number = 0,
  60. diffMinted: number = 0,
  61. percMinted: number = 0
  62. ) {
  63. this.startMinted = startMinted;
  64. this.endMinted = endMinted;
  65. this.diffMinted = diffMinted;
  66. this.percMinted = percMinted;
  67. }
  68. }
  69. export interface WorkerReward {
  70. id: number;
  71. memberId: MemberId;
  72. account: AccountId;
  73. handle: string;
  74. stake: Stake;
  75. reward: RewardRelationship;
  76. status: string;
  77. }