wasm-ast-types 0.26.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE-Apache +201 -0
- package/LICENSE-MIT +21 -0
- package/README.md +1 -1
- package/{types/client → client}/client.d.ts +2 -2
- package/client/client.js +275 -0
- package/client/index.js +17 -0
- package/{types/context → context}/context.d.ts +9 -22
- package/context/context.js +114 -0
- package/{types/context → context}/imports.d.ts +9 -8
- package/context/imports.js +166 -0
- package/context/index.js +18 -0
- package/esm/client/client.js +238 -0
- package/esm/client/index.js +1 -0
- package/esm/context/context.js +104 -0
- package/esm/context/imports.js +136 -0
- package/{module → esm}/context/index.js +1 -1
- package/{src/index.ts → esm/index.js} +0 -1
- package/esm/message-builder/message-builder.js +64 -0
- package/esm/message-composer/message-composer.js +105 -0
- package/esm/provider/provider.js +97 -0
- package/esm/react-query/react-query.js +458 -0
- package/esm/recoil/recoil.js +110 -0
- package/esm/utils/babel.js +231 -0
- package/esm/utils/constants.js +20 -0
- package/esm/utils/ref.js +4 -0
- package/esm/utils/types.js +343 -0
- package/{types/index.d.ts → index.d.ts} +0 -1
- package/index.js +24 -0
- package/message-builder/index.js +17 -0
- package/{types/message-builder → message-builder}/message-builder.d.ts +1 -1
- package/message-builder/message-builder.js +91 -0
- package/message-composer/index.d.ts +1 -0
- package/message-composer/index.js +17 -0
- package/{types/message-composer → message-composer}/message-composer.d.ts +1 -1
- package/message-composer/message-composer.js +133 -0
- package/package.json +19 -68
- package/provider/index.d.ts +1 -0
- package/provider/index.js +17 -0
- package/provider/provider.js +127 -0
- package/react-query/index.d.ts +1 -0
- package/react-query/index.js +17 -0
- package/{types/react-query → react-query}/react-query.d.ts +2 -3
- package/react-query/react-query.js +490 -0
- package/recoil/index.d.ts +1 -0
- package/recoil/index.js +17 -0
- package/{types/recoil → recoil}/recoil.d.ts +1 -1
- package/recoil/recoil.js +140 -0
- package/{types/utils → utils}/babel.d.ts +9 -8
- package/utils/babel.js +285 -0
- package/utils/constants.js +46 -0
- package/utils/index.js +26 -0
- package/{types/utils → utils}/ref.d.ts +1 -1
- package/utils/ref.js +8 -0
- package/{types/utils → utils}/types.d.ts +8 -8
- package/utils/types.js +379 -0
- package/main/client/client.js +0 -196
- package/main/client/index.js +0 -16
- package/main/client/test/ts-client.account-nfts.spec.js +0 -28
- package/main/client/test/ts-client.arrays-ref.spec.js +0 -19
- package/main/client/test/ts-client.arrays.spec.js +0 -26
- package/main/client/test/ts-client.cw-named-groups.test.js +0 -19
- package/main/client/test/ts-client.cw-proposal-single.test.js +0 -23
- package/main/client/test/ts-client.empty-enums.spec.js +0 -13
- package/main/client/test/ts-client.issue-101.spec.js +0 -23
- package/main/client/test/ts-client.issue-103.test.js +0 -44
- package/main/client/test/ts-client.issue-71.test.js +0 -81
- package/main/client/test/ts-client.issue-98.test.js +0 -28
- package/main/client/test/ts-client.issues.test.js +0 -81
- package/main/client/test/ts-client.overrides.spec.js +0 -33
- package/main/client/test/ts-client.sg721.spec.js +0 -19
- package/main/client/test/ts-client.spec.js +0 -87
- package/main/client/test/ts-client.vectis.spec.js +0 -46
- package/main/client/test/ts-client.wager.spec.js +0 -39
- package/main/context/context.js +0 -162
- package/main/context/imports.js +0 -159
- package/main/context/index.js +0 -27
- package/main/index.js +0 -104
- package/main/message-builder/index.js +0 -16
- package/main/message-builder/message-builder.js +0 -62
- package/main/message-builder/message-builder.spec.js +0 -20
- package/main/message-composer/index.js +0 -16
- package/main/message-composer/message-composer.js +0 -86
- package/main/message-composer/message-composer.spec.js +0 -23
- package/main/provider/index.js +0 -16
- package/main/provider/provider.js +0 -71
- package/main/provider/provider.spec.js +0 -60
- package/main/react-query/index.js +0 -16
- package/main/react-query/react-query.js +0 -413
- package/main/react-query/react-query.spec.js +0 -91
- package/main/recoil/index.js +0 -16
- package/main/recoil/recoil.js +0 -61
- package/main/recoil/recoil.spec.js +0 -20
- package/main/types.js +0 -4
- package/main/utils/babel.js +0 -282
- package/main/utils/babel.spec.js +0 -109
- package/main/utils/constants.js +0 -26
- package/main/utils/index.js +0 -65
- package/main/utils/ref.js +0 -12
- package/main/utils/types.js +0 -343
- package/module/client/client.js +0 -166
- package/module/client/index.js +0 -1
- package/module/client/test/ts-client.account-nfts.spec.js +0 -25
- package/module/client/test/ts-client.arrays-ref.spec.js +0 -16
- package/module/client/test/ts-client.arrays.spec.js +0 -23
- package/module/client/test/ts-client.cw-named-groups.test.js +0 -16
- package/module/client/test/ts-client.cw-proposal-single.test.js +0 -20
- package/module/client/test/ts-client.empty-enums.spec.js +0 -10
- package/module/client/test/ts-client.issue-101.spec.js +0 -22
- package/module/client/test/ts-client.issue-103.test.js +0 -41
- package/module/client/test/ts-client.issue-71.test.js +0 -21
- package/module/client/test/ts-client.issue-98.test.js +0 -25
- package/module/client/test/ts-client.issues.test.js +0 -21
- package/module/client/test/ts-client.overrides.spec.js +0 -30
- package/module/client/test/ts-client.sg721.spec.js +0 -16
- package/module/client/test/ts-client.spec.js +0 -84
- package/module/client/test/ts-client.vectis.spec.js +0 -43
- package/module/client/test/ts-client.wager.spec.js +0 -36
- package/module/context/context.js +0 -116
- package/module/context/imports.js +0 -127
- package/module/index.js +0 -9
- package/module/message-builder/index.js +0 -1
- package/module/message-builder/message-builder.js +0 -52
- package/module/message-builder/message-builder.spec.js +0 -17
- package/module/message-composer/index.js +0 -1
- package/module/message-composer/message-composer.js +0 -70
- package/module/message-composer/message-composer.spec.js +0 -20
- package/module/provider/index.js +0 -1
- package/module/provider/provider.js +0 -45
- package/module/provider/provider.spec.js +0 -58
- package/module/react-query/index.js +0 -1
- package/module/react-query/react-query.js +0 -403
- package/module/react-query/react-query.spec.js +0 -85
- package/module/recoil/index.js +0 -1
- package/module/recoil/recoil.js +0 -46
- package/module/recoil/recoil.spec.js +0 -14
- package/module/types.js +0 -3
- package/module/utils/babel.js +0 -203
- package/module/utils/babel.spec.js +0 -70
- package/module/utils/constants.js +0 -12
- package/module/utils/index.js +0 -6
- package/module/utils/ref.js +0 -4
- package/module/utils/types.js +0 -301
- package/src/client/client.ts +0 -584
- package/src/client/index.ts +0 -1
- package/src/client/test/__snapshots__/ts-client.account-nfts.spec.ts.snap +0 -497
- package/src/client/test/__snapshots__/ts-client.arrays-ref.spec.ts.snap +0 -452
- package/src/client/test/__snapshots__/ts-client.arrays.spec.ts.snap +0 -101
- package/src/client/test/__snapshots__/ts-client.cw-named-groups.test.ts.snap +0 -141
- package/src/client/test/__snapshots__/ts-client.cw-proposal-single.test.ts.snap +0 -341
- package/src/client/test/__snapshots__/ts-client.empty-enums.spec.ts.snap +0 -20
- package/src/client/test/__snapshots__/ts-client.issue-101.spec.ts.snap +0 -47
- package/src/client/test/__snapshots__/ts-client.issue-103.test.ts.snap +0 -79
- package/src/client/test/__snapshots__/ts-client.issue-71.test.ts.snap +0 -432
- package/src/client/test/__snapshots__/ts-client.issue-98.test.ts.snap +0 -117
- package/src/client/test/__snapshots__/ts-client.issues.test.ts.snap +0 -984
- package/src/client/test/__snapshots__/ts-client.overrides.spec.ts.snap +0 -709
- package/src/client/test/__snapshots__/ts-client.sg721.spec.ts.snap +0 -350
- package/src/client/test/__snapshots__/ts-client.spec.ts.snap +0 -723
- package/src/client/test/__snapshots__/ts-client.vectis.spec.ts.snap +0 -337
- package/src/client/test/__snapshots__/ts-client.wager.spec.ts.snap +0 -132
- package/src/client/test/ts-client.account-nfts.spec.ts +0 -55
- package/src/client/test/ts-client.arrays-ref.spec.ts +0 -48
- package/src/client/test/ts-client.arrays.spec.ts +0 -58
- package/src/client/test/ts-client.cw-named-groups.test.ts +0 -48
- package/src/client/test/ts-client.cw-proposal-single.test.ts +0 -50
- package/src/client/test/ts-client.empty-enums.spec.ts +0 -28
- package/src/client/test/ts-client.issue-101.spec.ts +0 -37
- package/src/client/test/ts-client.issue-103.test.ts +0 -106
- package/src/client/test/ts-client.issue-71.test.ts +0 -51
- package/src/client/test/ts-client.issue-98.test.ts +0 -55
- package/src/client/test/ts-client.issues.test.ts +0 -52
- package/src/client/test/ts-client.overrides.spec.ts +0 -74
- package/src/client/test/ts-client.sg721.spec.ts +0 -46
- package/src/client/test/ts-client.spec.ts +0 -166
- package/src/client/test/ts-client.vectis.spec.ts +0 -97
- package/src/client/test/ts-client.wager.spec.ts +0 -63
- package/src/context/context.ts +0 -229
- package/src/context/imports.ts +0 -195
- package/src/context/index.ts +0 -2
- package/src/message-builder/__snapshots__/message-builder.spec.ts.snap +0 -270
- package/src/message-builder/message-builder.spec.ts +0 -24
- package/src/message-builder/message-builder.ts +0 -119
- package/src/message-composer/__snapshots__/message-composer.spec.ts.snap +0 -331
- package/src/message-composer/index.ts +0 -1
- package/src/message-composer/message-composer.spec.ts +0 -46
- package/src/message-composer/message-composer.ts +0 -262
- package/src/provider/__snapshots__/provider.spec.ts.snap +0 -49
- package/src/provider/index.ts +0 -1
- package/src/provider/provider.spec.ts +0 -81
- package/src/provider/provider.ts +0 -237
- package/src/react-query/__snapshots__/react-query.spec.ts.snap +0 -1359
- package/src/react-query/index.ts +0 -1
- package/src/react-query/react-query.spec.ts +0 -116
- package/src/react-query/react-query.ts +0 -1072
- package/src/recoil/__snapshots__/recoil.spec.ts.snap +0 -203
- package/src/recoil/index.ts +0 -1
- package/src/recoil/recoil.spec.ts +0 -38
- package/src/recoil/recoil.ts +0 -307
- package/src/types.ts +0 -44
- package/src/utils/__snapshots__/babel.spec.ts.snap +0 -75
- package/src/utils/babel.spec.ts +0 -511
- package/src/utils/babel.ts +0 -352
- package/src/utils/constants.ts +0 -37
- package/src/utils/ref.ts +0 -6
- package/src/utils/types.ts +0 -478
- package/types/types.d.ts +0 -41
- /package/{types/client → client}/index.d.ts +0 -0
- /package/{types/context → context}/index.d.ts +0 -0
- /package/{src/message-builder/index.ts → esm/message-builder/index.js} +0 -0
- /package/{types/message-composer/index.d.ts → esm/message-composer/index.js} +0 -0
- /package/{types/provider/index.d.ts → esm/provider/index.js} +0 -0
- /package/{types/react-query/index.d.ts → esm/react-query/index.js} +0 -0
- /package/{types/recoil/index.d.ts → esm/recoil/index.js} +0 -0
- /package/{src/utils/index.ts → esm/utils/index.js} +0 -0
- /package/{types/message-builder → message-builder}/index.d.ts +0 -0
- /package/{types/provider → provider}/provider.d.ts +0 -0
- /package/{types/utils → utils}/constants.d.ts +0 -0
- /package/{types/utils → utils}/index.d.ts +0 -0
@@ -1,341 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`execute classes array types 1`] = `
|
4
|
-
"export class SG721Client implements SG721Instance {
|
5
|
-
client: SigningCosmWasmClient;
|
6
|
-
sender: string;
|
7
|
-
contractAddress: string;
|
8
|
-
|
9
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
10
|
-
this.client = client;
|
11
|
-
this.sender = sender;
|
12
|
-
this.contractAddress = contractAddress;
|
13
|
-
this.propose = this.propose.bind(this);
|
14
|
-
this.vote = this.vote.bind(this);
|
15
|
-
this.execute = this.execute.bind(this);
|
16
|
-
this.close = this.close.bind(this);
|
17
|
-
this.updateConfig = this.updateConfig.bind(this);
|
18
|
-
this.addProposalHook = this.addProposalHook.bind(this);
|
19
|
-
this.removeProposalHook = this.removeProposalHook.bind(this);
|
20
|
-
this.addVoteHook = this.addVoteHook.bind(this);
|
21
|
-
this.removeVoteHook = this.removeVoteHook.bind(this);
|
22
|
-
}
|
23
|
-
|
24
|
-
propose = async ({
|
25
|
-
description,
|
26
|
-
msgs,
|
27
|
-
title
|
28
|
-
}: {
|
29
|
-
description: string;
|
30
|
-
msgs: CosmosMsg_for_Empty[];
|
31
|
-
title: string;
|
32
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
33
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
34
|
-
propose: {
|
35
|
-
description,
|
36
|
-
msgs,
|
37
|
-
title
|
38
|
-
}
|
39
|
-
}, fee, memo, _funds);
|
40
|
-
};
|
41
|
-
vote = async ({
|
42
|
-
proposalId,
|
43
|
-
vote
|
44
|
-
}: {
|
45
|
-
proposalId: number;
|
46
|
-
vote: Vote;
|
47
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
48
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
49
|
-
vote: {
|
50
|
-
proposal_id: proposalId,
|
51
|
-
vote
|
52
|
-
}
|
53
|
-
}, fee, memo, _funds);
|
54
|
-
};
|
55
|
-
execute = async ({
|
56
|
-
proposalId
|
57
|
-
}: {
|
58
|
-
proposalId: number;
|
59
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
60
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
61
|
-
execute: {
|
62
|
-
proposal_id: proposalId
|
63
|
-
}
|
64
|
-
}, fee, memo, _funds);
|
65
|
-
};
|
66
|
-
close = async ({
|
67
|
-
proposalId
|
68
|
-
}: {
|
69
|
-
proposalId: number;
|
70
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
71
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
72
|
-
close: {
|
73
|
-
proposal_id: proposalId
|
74
|
-
}
|
75
|
-
}, fee, memo, _funds);
|
76
|
-
};
|
77
|
-
updateConfig = async ({
|
78
|
-
allowRevoting,
|
79
|
-
dao,
|
80
|
-
depositInfo,
|
81
|
-
maxVotingPeriod,
|
82
|
-
minVotingPeriod,
|
83
|
-
onlyMembersExecute,
|
84
|
-
threshold
|
85
|
-
}: {
|
86
|
-
allowRevoting: boolean;
|
87
|
-
dao: string;
|
88
|
-
depositInfo?: DepositInfo;
|
89
|
-
maxVotingPeriod: Duration;
|
90
|
-
minVotingPeriod?: Duration;
|
91
|
-
onlyMembersExecute: boolean;
|
92
|
-
threshold: Threshold;
|
93
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
94
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
95
|
-
update_config: {
|
96
|
-
allow_revoting: allowRevoting,
|
97
|
-
dao,
|
98
|
-
deposit_info: depositInfo,
|
99
|
-
max_voting_period: maxVotingPeriod,
|
100
|
-
min_voting_period: minVotingPeriod,
|
101
|
-
only_members_execute: onlyMembersExecute,
|
102
|
-
threshold
|
103
|
-
}
|
104
|
-
}, fee, memo, _funds);
|
105
|
-
};
|
106
|
-
addProposalHook = async ({
|
107
|
-
address
|
108
|
-
}: {
|
109
|
-
address: string;
|
110
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
111
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
112
|
-
add_proposal_hook: {
|
113
|
-
address
|
114
|
-
}
|
115
|
-
}, fee, memo, _funds);
|
116
|
-
};
|
117
|
-
removeProposalHook = async ({
|
118
|
-
address
|
119
|
-
}: {
|
120
|
-
address: string;
|
121
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
122
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
123
|
-
remove_proposal_hook: {
|
124
|
-
address
|
125
|
-
}
|
126
|
-
}, fee, memo, _funds);
|
127
|
-
};
|
128
|
-
addVoteHook = async ({
|
129
|
-
address
|
130
|
-
}: {
|
131
|
-
address: string;
|
132
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
133
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
134
|
-
add_vote_hook: {
|
135
|
-
address
|
136
|
-
}
|
137
|
-
}, fee, memo, _funds);
|
138
|
-
};
|
139
|
-
removeVoteHook = async ({
|
140
|
-
address
|
141
|
-
}: {
|
142
|
-
address: string;
|
143
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
144
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
145
|
-
remove_vote_hook: {
|
146
|
-
address
|
147
|
-
}
|
148
|
-
}, fee, memo, _funds);
|
149
|
-
};
|
150
|
-
}"
|
151
|
-
`;
|
152
|
-
|
153
|
-
exports[`execute interfaces no extends 1`] = `
|
154
|
-
"export interface SG721Instance {
|
155
|
-
contractAddress: string;
|
156
|
-
sender: string;
|
157
|
-
propose: ({
|
158
|
-
description,
|
159
|
-
msgs,
|
160
|
-
title
|
161
|
-
}: {
|
162
|
-
description: string;
|
163
|
-
msgs: CosmosMsg_for_Empty[];
|
164
|
-
title: string;
|
165
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
166
|
-
vote: ({
|
167
|
-
proposalId,
|
168
|
-
vote
|
169
|
-
}: {
|
170
|
-
proposalId: number;
|
171
|
-
vote: Vote;
|
172
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
173
|
-
execute: ({
|
174
|
-
proposalId
|
175
|
-
}: {
|
176
|
-
proposalId: number;
|
177
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
178
|
-
close: ({
|
179
|
-
proposalId
|
180
|
-
}: {
|
181
|
-
proposalId: number;
|
182
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
183
|
-
updateConfig: ({
|
184
|
-
allowRevoting,
|
185
|
-
dao,
|
186
|
-
depositInfo,
|
187
|
-
maxVotingPeriod,
|
188
|
-
minVotingPeriod,
|
189
|
-
onlyMembersExecute,
|
190
|
-
threshold
|
191
|
-
}: {
|
192
|
-
allowRevoting: boolean;
|
193
|
-
dao: string;
|
194
|
-
depositInfo?: DepositInfo;
|
195
|
-
maxVotingPeriod: Duration;
|
196
|
-
minVotingPeriod?: Duration;
|
197
|
-
onlyMembersExecute: boolean;
|
198
|
-
threshold: Threshold;
|
199
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
200
|
-
addProposalHook: ({
|
201
|
-
address
|
202
|
-
}: {
|
203
|
-
address: string;
|
204
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
205
|
-
removeProposalHook: ({
|
206
|
-
address
|
207
|
-
}: {
|
208
|
-
address: string;
|
209
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
210
|
-
addVoteHook: ({
|
211
|
-
address
|
212
|
-
}: {
|
213
|
-
address: string;
|
214
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
215
|
-
removeVoteHook: ({
|
216
|
-
address
|
217
|
-
}: {
|
218
|
-
address: string;
|
219
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
220
|
-
}"
|
221
|
-
`;
|
222
|
-
|
223
|
-
exports[`execute_msg_for 1`] = `"export type ExecuteMsg = ExecuteMsg;"`;
|
224
|
-
|
225
|
-
exports[`query classes 1`] = `
|
226
|
-
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
227
|
-
client: CosmWasmClient;
|
228
|
-
contractAddress: string;
|
229
|
-
|
230
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
231
|
-
this.client = client;
|
232
|
-
this.contractAddress = contractAddress;
|
233
|
-
this.config = this.config.bind(this);
|
234
|
-
this.proposal = this.proposal.bind(this);
|
235
|
-
this.listProposals = this.listProposals.bind(this);
|
236
|
-
this.reverseProposals = this.reverseProposals.bind(this);
|
237
|
-
this.proposalCount = this.proposalCount.bind(this);
|
238
|
-
this.vote = this.vote.bind(this);
|
239
|
-
this.listVotes = this.listVotes.bind(this);
|
240
|
-
this.proposalHooks = this.proposalHooks.bind(this);
|
241
|
-
this.voteHooks = this.voteHooks.bind(this);
|
242
|
-
this.info = this.info.bind(this);
|
243
|
-
}
|
244
|
-
|
245
|
-
config = async (): Promise<ConfigResponse> => {
|
246
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
247
|
-
config: {}
|
248
|
-
});
|
249
|
-
};
|
250
|
-
proposal = async ({
|
251
|
-
proposalId
|
252
|
-
}: {
|
253
|
-
proposalId: number;
|
254
|
-
}): Promise<ProposalResponse> => {
|
255
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
256
|
-
proposal: {
|
257
|
-
proposal_id: proposalId
|
258
|
-
}
|
259
|
-
});
|
260
|
-
};
|
261
|
-
listProposals = async ({
|
262
|
-
limit,
|
263
|
-
startAfter
|
264
|
-
}: {
|
265
|
-
limit?: number;
|
266
|
-
startAfter?: number;
|
267
|
-
}): Promise<ListProposalsResponse> => {
|
268
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
269
|
-
list_proposals: {
|
270
|
-
limit,
|
271
|
-
start_after: startAfter
|
272
|
-
}
|
273
|
-
});
|
274
|
-
};
|
275
|
-
reverseProposals = async ({
|
276
|
-
limit,
|
277
|
-
startBefore
|
278
|
-
}: {
|
279
|
-
limit?: number;
|
280
|
-
startBefore?: number;
|
281
|
-
}): Promise<ReverseProposalsResponse> => {
|
282
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
283
|
-
reverse_proposals: {
|
284
|
-
limit,
|
285
|
-
start_before: startBefore
|
286
|
-
}
|
287
|
-
});
|
288
|
-
};
|
289
|
-
proposalCount = async (): Promise<ProposalCountResponse> => {
|
290
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
291
|
-
proposal_count: {}
|
292
|
-
});
|
293
|
-
};
|
294
|
-
vote = async ({
|
295
|
-
proposalId,
|
296
|
-
voter
|
297
|
-
}: {
|
298
|
-
proposalId: number;
|
299
|
-
voter: string;
|
300
|
-
}): Promise<VoteResponse> => {
|
301
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
302
|
-
vote: {
|
303
|
-
proposal_id: proposalId,
|
304
|
-
voter
|
305
|
-
}
|
306
|
-
});
|
307
|
-
};
|
308
|
-
listVotes = async ({
|
309
|
-
limit,
|
310
|
-
proposalId,
|
311
|
-
startAfter
|
312
|
-
}: {
|
313
|
-
limit?: number;
|
314
|
-
proposalId: number;
|
315
|
-
startAfter?: string;
|
316
|
-
}): Promise<ListVotesResponse> => {
|
317
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
318
|
-
list_votes: {
|
319
|
-
limit,
|
320
|
-
proposal_id: proposalId,
|
321
|
-
start_after: startAfter
|
322
|
-
}
|
323
|
-
});
|
324
|
-
};
|
325
|
-
proposalHooks = async (): Promise<ProposalHooksResponse> => {
|
326
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
327
|
-
proposal_hooks: {}
|
328
|
-
});
|
329
|
-
};
|
330
|
-
voteHooks = async (): Promise<VoteHooksResponse> => {
|
331
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
332
|
-
vote_hooks: {}
|
333
|
-
});
|
334
|
-
};
|
335
|
-
info = async (): Promise<InfoResponse> => {
|
336
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
337
|
-
info: {}
|
338
|
-
});
|
339
|
-
};
|
340
|
-
}"
|
341
|
-
`;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`query classes 1`] = `
|
4
|
-
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
5
|
-
client: CosmWasmClient;
|
6
|
-
contractAddress: string;
|
7
|
-
|
8
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
9
|
-
this.client = client;
|
10
|
-
this.contractAddress = contractAddress;
|
11
|
-
}
|
12
|
-
|
13
|
-
}"
|
14
|
-
`;
|
15
|
-
|
16
|
-
exports[`query interface 1`] = `
|
17
|
-
"export interface ReadOnlyInstance {
|
18
|
-
contractAddress: string;
|
19
|
-
}"
|
20
|
-
`;
|
@@ -1,47 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`execute interfaces no extends 1`] = `
|
4
|
-
"export interface OwnershipInstance {
|
5
|
-
contractAddress: string;
|
6
|
-
sender: string;
|
7
|
-
setFactory: ({
|
8
|
-
newFactory
|
9
|
-
}: {
|
10
|
-
newFactory: string;
|
11
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
12
|
-
updateOwnership: (action: Action, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
13
|
-
}"
|
14
|
-
`;
|
15
|
-
|
16
|
-
exports[`ownership client with tuple 1`] = `
|
17
|
-
"export class OwnershipClient implements OwnershipInstance {
|
18
|
-
client: SigningCosmWasmClient;
|
19
|
-
sender: string;
|
20
|
-
contractAddress: string;
|
21
|
-
|
22
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
23
|
-
this.client = client;
|
24
|
-
this.sender = sender;
|
25
|
-
this.contractAddress = contractAddress;
|
26
|
-
this.setFactory = this.setFactory.bind(this);
|
27
|
-
this.updateOwnership = this.updateOwnership.bind(this);
|
28
|
-
}
|
29
|
-
|
30
|
-
setFactory = async ({
|
31
|
-
newFactory
|
32
|
-
}: {
|
33
|
-
newFactory: string;
|
34
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
35
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
36
|
-
set_factory: {
|
37
|
-
new_factory: newFactory
|
38
|
-
}
|
39
|
-
}, fee, memo, _funds);
|
40
|
-
};
|
41
|
-
updateOwnership = async (action: Action, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
42
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
43
|
-
update_ownership: action
|
44
|
-
}, fee, memo, _funds);
|
45
|
-
};
|
46
|
-
}"
|
47
|
-
`;
|
@@ -1,79 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`execute execute classes array types 1`] = `
|
4
|
-
"export class Client implements Instance {
|
5
|
-
client: SigningCosmWasmClient;
|
6
|
-
sender: string;
|
7
|
-
contractAddress: string;
|
8
|
-
|
9
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
10
|
-
this.client = client;
|
11
|
-
this.sender = sender;
|
12
|
-
this.contractAddress = contractAddress;
|
13
|
-
}
|
14
|
-
|
15
|
-
}"
|
16
|
-
`;
|
17
|
-
|
18
|
-
exports[`execute execute interfaces no extends 1`] = `
|
19
|
-
"export interface SG721Instance {
|
20
|
-
contractAddress: string;
|
21
|
-
sender: string;
|
22
|
-
}"
|
23
|
-
`;
|
24
|
-
|
25
|
-
exports[`execute execute_msg_for__empty 1`] = `"export type ExecuteMsg = ExecuteMsg;"`;
|
26
|
-
|
27
|
-
exports[`execute query classes 1`] = `
|
28
|
-
"export class QueryClient implements ReadOnlyInstance {
|
29
|
-
client: CosmWasmClient;
|
30
|
-
contractAddress: string;
|
31
|
-
|
32
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
33
|
-
this.client = client;
|
34
|
-
this.contractAddress = contractAddress;
|
35
|
-
}
|
36
|
-
|
37
|
-
}"
|
38
|
-
`;
|
39
|
-
|
40
|
-
exports[`execute query classes response 1`] = `"export type QueryMsg = QueryMsg;"`;
|
41
|
-
|
42
|
-
exports[`query execute classes array types 1`] = `
|
43
|
-
"export class Client implements Instance {
|
44
|
-
client: SigningCosmWasmClient;
|
45
|
-
sender: string;
|
46
|
-
contractAddress: string;
|
47
|
-
|
48
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
49
|
-
this.client = client;
|
50
|
-
this.sender = sender;
|
51
|
-
this.contractAddress = contractAddress;
|
52
|
-
}
|
53
|
-
|
54
|
-
}"
|
55
|
-
`;
|
56
|
-
|
57
|
-
exports[`query execute interfaces no extends 1`] = `
|
58
|
-
"export interface SG721Instance {
|
59
|
-
contractAddress: string;
|
60
|
-
sender: string;
|
61
|
-
}"
|
62
|
-
`;
|
63
|
-
|
64
|
-
exports[`query execute_msg_for__empty 1`] = `"export type QueryMsg = QueryMsg;"`;
|
65
|
-
|
66
|
-
exports[`query query classes 1`] = `
|
67
|
-
"export class QueryClient implements ReadOnlyInstance {
|
68
|
-
client: CosmWasmClient;
|
69
|
-
contractAddress: string;
|
70
|
-
|
71
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
72
|
-
this.client = client;
|
73
|
-
this.contractAddress = contractAddress;
|
74
|
-
}
|
75
|
-
|
76
|
-
}"
|
77
|
-
`;
|
78
|
-
|
79
|
-
exports[`query query classes response 1`] = `"export type QueryMsg = QueryMsg;"`;
|