Skip to content

Commit

Permalink
expose public getters
Browse files Browse the repository at this point in the history
  • Loading branch information
phn210 committed Jan 24, 2024
1 parent c3e6f31 commit 5bd4aa5
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/contracts/CampaignStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export abstract class CampaignStorage<RawLeaf> {
return this._level1.getRoot();
}

get level1(): Level1MT {
return this._level1;
}

get leafs(): { [key: string]: { raw: RawLeaf | undefined; leaf: Field } } {
return this._leafs;
}
Expand Down
4 changes: 4 additions & 0 deletions src/contracts/FundingStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export abstract class FundingStorage<RawLeaf> {
return this._level1.getRoot();
}

get level1(): Level1MT {
return this._level1;
}

get leafs(): { [key: string]: { raw: RawLeaf | undefined; leaf: Field } } {
return this._leafs;
}
Expand Down
8 changes: 8 additions & 0 deletions src/contracts/ParticipationStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ export abstract class ParticipationCStorage<RawLeaf> {
return this._level1.getRoot();
}

get level1(): Level1CMT {
return this._level1;
}

get leafs(): { [key: string]: { raw: RawLeaf | undefined; leaf: Field } } {
return this._leafs;
}
Expand Down Expand Up @@ -128,6 +132,10 @@ export abstract class ParticipationStorage<RawLeaf> {
return this._level1.getRoot();
}

get level1(): Level1MT {
return this._level1;
}

get leafs(): { [key: string]: { raw: RawLeaf | undefined; leaf: Field } } {
return this._leafs;
}
Expand Down
8 changes: 8 additions & 0 deletions src/contracts/ProjectStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ export abstract class ProjectStorage<RawLeaf> {
return this._level1.getRoot();
}

get level1(): Level1MT {
return this._level1;
}

get level2s(): { [key: string]: Level2MT } {
return this._level2s;
}

get leafs(): { [key: string]: { raw: RawLeaf | undefined; leaf: Field } } {
return this._leafs;
}
Expand Down
8 changes: 8 additions & 0 deletions src/contracts/SharedStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export class AddressStorage {
return this._addressMap.getRoot();
}

get addressMap(): AddressMT {
return this._addressMap;
}

get addresses(): {
[key: string]: { raw: PublicKey | undefined; leaf: Field };
} {
Expand Down Expand Up @@ -142,6 +146,10 @@ export class ReduceStorage {
return this._actionMap.getRoot();
}

get actionMap(): MerkleMap {
return this._actionMap;
}

get actions(): { [key: string]: Field } {
return this._actions;
}
Expand Down
4 changes: 4 additions & 0 deletions src/contracts/TreasuryStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export abstract class TreasuryCStorage<RawLeaf> {
return this._level1.getRoot();
}

get level1(): Level1CMT {
return this._level1;
}

get leafs(): { [key: string]: { raw: RawLeaf | undefined; leaf: Field } } {
return this._leafs;
}
Expand Down

0 comments on commit 5bd4aa5

Please sign in to comment.