@leofcoin/standards 0.2.5 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,6 +24,7 @@ class Voting extends ContractCreator {
24
24
  get state() {
25
25
  return {
26
26
  ...super.state,
27
+ votes: this.#votes,
27
28
  votingDisabled: this.#votingDisabled,
28
29
  votingDuration: this.#votingDuration
29
30
  };
@@ -17,6 +17,9 @@ export default class TokenReceiver extends PublicVoting implements IPublicVoting
17
17
  tokenToReceive: string;
18
18
  tokenAmountToReceive: import("@ethersproject/bignumber").BigNumber;
19
19
  voteType: "burn" | "transfer";
20
+ votes: {
21
+ [id: string]: import("./voting/types.js").Vote;
22
+ };
20
23
  votingDisabled: boolean;
21
24
  votingDuration: number;
22
25
  contractCreator: string;
@@ -1,5 +1,7 @@
1
- import ContractCreator from '../contract-creator.js';
2
- import { Vote, VoteResult } from './types.js';
1
+ import ContractCreator, { ContractCreatorState } from '../contract-creator.js';
2
+ import { Vote, VoteResult, VotingState } from './types.js';
3
+ export declare interface _VotingState extends VotingState, ContractCreatorState {
4
+ }
3
5
  export default class Voting extends ContractCreator {
4
6
  #private;
5
7
  constructor(state: any);
@@ -8,11 +10,7 @@ export default class Voting extends ContractCreator {
8
10
  };
9
11
  get votingDuration(): number;
10
12
  get votingDisabled(): boolean;
11
- get state(): {
12
- votingDisabled: boolean;
13
- votingDuration: number;
14
- contractCreator: string;
15
- };
13
+ get state(): _VotingState;
16
14
  /**
17
15
  * create vote
18
16
  * @param {string} vote
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/standards",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Contract standards",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,5 +1,6 @@
1
1
  import ContractCreator, { ContractCreatorState } from '../contract-creator.js'
2
2
  import { Vote, VoteResult, VoteView, VotingState } from './types.js'
3
+ export declare interface _VotingState extends VotingState, ContractCreatorState {}
3
4
  export default class Voting extends ContractCreator {
4
5
  #votes: VotingState['votes'] = {}
5
6
  #votingDisabled: boolean = false
@@ -25,9 +26,10 @@ export default class Voting extends ContractCreator {
25
26
  return this.#votingDisabled
26
27
  }
27
28
 
28
- get state() {
29
+ get state(): _VotingState {
29
30
  return {
30
31
  ...super.state,
32
+ votes: this.#votes,
31
33
  votingDisabled: this.#votingDisabled,
32
34
  votingDuration: this.#votingDuration
33
35
  }