Skip to content

Commit 9c8ae09

Browse files
committed
chore: switch from arc32 to arc56
1 parent 35a927c commit 9c8ae09

File tree

7 files changed

+1028
-602
lines changed

7 files changed

+1028
-602
lines changed

lib/ProposalClient.d.ts

Lines changed: 101 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ export type ProposalTypedGlobalState = {
5858
* Converts the ABI tuple representation of a ProposalTypedGlobalState to the struct representation
5959
*/
6060
export declare function ProposalTypedGlobalStateFromTuple(abiTuple: [string, bigint, string, bigint, bigint, bigint, bigint, boolean, bigint, number, bigint, bigint, bigint, Uint8Array, bigint, bigint, bigint, bigint, bigint, bigint]): ProposalTypedGlobalState;
61+
export type VoterBox = {
62+
votes: bigint;
63+
voted: boolean;
64+
};
65+
/**
66+
* Converts the ABI tuple representation of a VoterBox to the struct representation
67+
*/
68+
export declare function VoterBoxFromTuple(abiTuple: [bigint, boolean]): VoterBox;
6169
/**
6270
* The argument types for the Proposal contract
6371
*/
@@ -263,32 +271,40 @@ export type ProposalTypes = {
263271
state: {
264272
global: {
265273
keys: {
266-
approvals: bigint;
267-
assignedVotes: bigint;
268-
committeeId: BinaryState;
269-
committeeMembers: bigint;
270-
committeeVotes: bigint;
274+
proposer: string;
275+
registryAppId: bigint;
276+
title: string;
277+
openTs: bigint;
278+
submissionTs: bigint;
279+
voteOpenTs: bigint;
280+
status: bigint;
271281
finalized: bigint;
272-
focus: bigint;
273282
fundingCategory: bigint;
283+
focus: bigint;
274284
fundingType: bigint;
275-
lockedAmount: bigint;
276-
metadataUploaded: bigint;
277-
nulls: bigint;
278-
openTs: bigint;
279-
proposer: BinaryState;
280-
registryAppId: bigint;
281-
rejections: bigint;
282285
requestedAmount: bigint;
283-
status: bigint;
284-
submissionTs: bigint;
285-
title: BinaryState;
286-
voteOpenTs: bigint;
286+
lockedAmount: bigint;
287+
committeeId: Uint8Array;
288+
committeeMembers: bigint;
289+
committeeVotes: bigint;
287290
votedMembers: bigint;
291+
approvals: bigint;
292+
rejections: bigint;
293+
nulls: bigint;
288294
votersCount: bigint;
295+
assignedVotes: bigint;
296+
metadataUploaded: bigint;
289297
};
290298
maps: {};
291299
};
300+
box: {
301+
keys: {
302+
metadata: BinaryState;
303+
};
304+
maps: {
305+
voters: Map<string, VoterBox>;
306+
};
307+
};
292308
};
293309
};
294310
/**
@@ -318,6 +334,10 @@ export type MethodReturn<TSignature extends ProposalSignatures> = ProposalTypes[
318334
* Defines the shape of the keyed global state of the application.
319335
*/
320336
export type GlobalKeysState = ProposalTypes['state']['global']['keys'];
337+
/**
338+
* Defines the shape of the keyed box state of the application.
339+
*/
340+
export type BoxKeysState = ProposalTypes['state']['box']['keys'];
321341
/**
322342
* Defines supported create method params for this smart contract
323343
*/
@@ -1714,97 +1734,123 @@ export declare class ProposalClient {
17141734
*/
17151735
getAll: () => Promise<Partial<Expand<GlobalKeysState>>>;
17161736
/**
1717-
* Get the current value of the approvals key in global state
1737+
* Get the current value of the proposer key in global state
17181738
*/
1719-
approvals: () => Promise<bigint | undefined>;
1739+
proposer: () => Promise<string | undefined>;
17201740
/**
1721-
* Get the current value of the assigned_votes key in global state
1741+
* Get the current value of the registry_app_id key in global state
17221742
*/
1723-
assignedVotes: () => Promise<bigint | undefined>;
1743+
registryAppId: () => Promise<bigint | undefined>;
17241744
/**
1725-
* Get the current value of the committee_id key in global state
1745+
* Get the current value of the title key in global state
17261746
*/
1727-
committeeId: () => Promise<BinaryState>;
1747+
title: () => Promise<string | undefined>;
17281748
/**
1729-
* Get the current value of the committee_members key in global state
1749+
* Get the current value of the open_ts key in global state
17301750
*/
1731-
committeeMembers: () => Promise<bigint | undefined>;
1751+
openTs: () => Promise<bigint | undefined>;
17321752
/**
1733-
* Get the current value of the committee_votes key in global state
1753+
* Get the current value of the submission_ts key in global state
17341754
*/
1735-
committeeVotes: () => Promise<bigint | undefined>;
1755+
submissionTs: () => Promise<bigint | undefined>;
17361756
/**
1737-
* Get the current value of the finalized key in global state
1757+
* Get the current value of the vote_open_ts key in global state
17381758
*/
1739-
finalized: () => Promise<bigint | undefined>;
1759+
voteOpenTs: () => Promise<bigint | undefined>;
17401760
/**
1741-
* Get the current value of the focus key in global state
1761+
* Get the current value of the status key in global state
17421762
*/
1743-
focus: () => Promise<bigint | undefined>;
1763+
status: () => Promise<bigint | undefined>;
1764+
/**
1765+
* Get the current value of the finalized key in global state
1766+
*/
1767+
finalized: () => Promise<bigint | undefined>;
17441768
/**
17451769
* Get the current value of the funding_category key in global state
17461770
*/
17471771
fundingCategory: () => Promise<bigint | undefined>;
1772+
/**
1773+
* Get the current value of the focus key in global state
1774+
*/
1775+
focus: () => Promise<bigint | undefined>;
17481776
/**
17491777
* Get the current value of the funding_type key in global state
17501778
*/
17511779
fundingType: () => Promise<bigint | undefined>;
1780+
/**
1781+
* Get the current value of the requested_amount key in global state
1782+
*/
1783+
requestedAmount: () => Promise<bigint | undefined>;
17521784
/**
17531785
* Get the current value of the locked_amount key in global state
17541786
*/
17551787
lockedAmount: () => Promise<bigint | undefined>;
17561788
/**
1757-
* Get the current value of the metadata_uploaded key in global state
1789+
* Get the current value of the committee_id key in global state
17581790
*/
1759-
metadataUploaded: () => Promise<bigint | undefined>;
1791+
committeeId: () => Promise<Uint8Array | undefined>;
17601792
/**
1761-
* Get the current value of the nulls key in global state
1793+
* Get the current value of the committee_members key in global state
17621794
*/
1763-
nulls: () => Promise<bigint | undefined>;
1795+
committeeMembers: () => Promise<bigint | undefined>;
17641796
/**
1765-
* Get the current value of the open_ts key in global state
1797+
* Get the current value of the committee_votes key in global state
17661798
*/
1767-
openTs: () => Promise<bigint | undefined>;
1799+
committeeVotes: () => Promise<bigint | undefined>;
17681800
/**
1769-
* Get the current value of the proposer key in global state
1801+
* Get the current value of the voted_members key in global state
17701802
*/
1771-
proposer: () => Promise<BinaryState>;
1803+
votedMembers: () => Promise<bigint | undefined>;
17721804
/**
1773-
* Get the current value of the registry_app_id key in global state
1805+
* Get the current value of the approvals key in global state
17741806
*/
1775-
registryAppId: () => Promise<bigint | undefined>;
1807+
approvals: () => Promise<bigint | undefined>;
17761808
/**
17771809
* Get the current value of the rejections key in global state
17781810
*/
17791811
rejections: () => Promise<bigint | undefined>;
17801812
/**
1781-
* Get the current value of the requested_amount key in global state
1813+
* Get the current value of the nulls key in global state
17821814
*/
1783-
requestedAmount: () => Promise<bigint | undefined>;
1815+
nulls: () => Promise<bigint | undefined>;
17841816
/**
1785-
* Get the current value of the status key in global state
1817+
* Get the current value of the voters_count key in global state
17861818
*/
1787-
status: () => Promise<bigint | undefined>;
1819+
votersCount: () => Promise<bigint | undefined>;
17881820
/**
1789-
* Get the current value of the submission_ts key in global state
1821+
* Get the current value of the assigned_votes key in global state
17901822
*/
1791-
submissionTs: () => Promise<bigint | undefined>;
1823+
assignedVotes: () => Promise<bigint | undefined>;
17921824
/**
1793-
* Get the current value of the title key in global state
1825+
* Get the current value of the metadata_uploaded key in global state
17941826
*/
1795-
title: () => Promise<BinaryState>;
1827+
metadataUploaded: () => Promise<bigint | undefined>;
1828+
};
1829+
/**
1830+
* Methods to access box state for the current Proposal app
1831+
*/
1832+
box: {
17961833
/**
1797-
* Get the current value of the vote_open_ts key in global state
1834+
* Get all current keyed values from box state
17981835
*/
1799-
voteOpenTs: () => Promise<bigint | undefined>;
1836+
getAll: () => Promise<Partial<Expand<BoxKeysState>>>;
18001837
/**
1801-
* Get the current value of the voted_members key in global state
1838+
* Get the current value of the metadata key in box state
18021839
*/
1803-
votedMembers: () => Promise<bigint | undefined>;
1840+
metadata: () => Promise<BinaryState>;
18041841
/**
1805-
* Get the current value of the voters_count key in global state
1842+
* Get values from the voters map in box state
18061843
*/
1807-
votersCount: () => Promise<bigint | undefined>;
1844+
voters: {
1845+
/**
1846+
* Get all current values of the voters map in box state
1847+
*/
1848+
getMap: () => Promise<Map<string, VoterBox>>;
1849+
/**
1850+
* Get a current value of the voters map by key from box state
1851+
*/
1852+
value: (key: string) => Promise<VoterBox | undefined>;
1853+
};
18081854
};
18091855
};
18101856
newGroup(): ProposalComposer;

lib/ProposalClient.js

Lines changed: 93 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)