@alephium/powfi-sdk 0.0.1-rc.1
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.
- package/README.md +4 -0
- package/clmm/artifacts/BitmapWord.ral.json +125 -0
- package/clmm/artifacts/BitmapWordDeployer.ral.json +31 -0
- package/clmm/artifacts/CreateConfig.ral.json +37 -0
- package/clmm/artifacts/CreateLiquidPool.ral.json +55 -0
- package/clmm/artifacts/DexAccount.ral.json +110 -0
- package/clmm/artifacts/LiquidityAmountsTest.ral.json +161 -0
- package/clmm/artifacts/LiquidityManagmentTest.ral.json +384 -0
- package/clmm/artifacts/Pool.ral.json +1530 -0
- package/clmm/artifacts/PoolConfig.ral.json +31 -0
- package/clmm/artifacts/PoolFactory.ral.json +300 -0
- package/clmm/artifacts/PoolRouterDemo.ral.json +49 -0
- package/clmm/artifacts/PoolUser.ral.json +89 -0
- package/clmm/artifacts/Position.ral.json +183 -0
- package/clmm/artifacts/PositionManager.ral.json +416 -0
- package/clmm/artifacts/SwapWithoutAccount.ral.json +46 -0
- package/clmm/artifacts/TestToken.ral.json +68 -0
- package/clmm/artifacts/Tick.ral.json +161 -0
- package/clmm/artifacts/TickBitmapTest.ral.json +220 -0
- package/clmm/artifacts/constants.ral.json +81 -0
- package/clmm/artifacts/structs.ral.json +335 -0
- package/clmm/artifacts/ts/BitmapWord.ts +337 -0
- package/clmm/artifacts/ts/BitmapWordDeployer.ts +164 -0
- package/clmm/artifacts/ts/DexAccount.ts +330 -0
- package/clmm/artifacts/ts/LiquidityAmountsTest.ts +464 -0
- package/clmm/artifacts/ts/LiquidityManagmentTest.ts +859 -0
- package/clmm/artifacts/ts/Pool.ts +2535 -0
- package/clmm/artifacts/ts/PoolConfig.ts +179 -0
- package/clmm/artifacts/ts/PoolFactory.ts +640 -0
- package/clmm/artifacts/ts/PoolUser.ts +237 -0
- package/clmm/artifacts/ts/Position.ts +440 -0
- package/clmm/artifacts/ts/PositionManager.ts +929 -0
- package/clmm/artifacts/ts/TestToken.ts +277 -0
- package/clmm/artifacts/ts/Tick.ts +351 -0
- package/clmm/artifacts/ts/TickBitmapTest.ts +512 -0
- package/clmm/artifacts/ts/constants.ts +17 -0
- package/clmm/artifacts/ts/contracts.ts +26 -0
- package/clmm/artifacts/ts/deployments.ts +160 -0
- package/clmm/artifacts/ts/index.ts +20 -0
- package/clmm/artifacts/ts/scripts.ts +76 -0
- package/clmm/artifacts/ts/types.ts +105 -0
- package/clmm/deployments/.deployments.devnet.json +350 -0
- package/clmm/deployments/.deployments.testnet.json +350 -0
- package/cpmm/artifacts/dex/DexAccount.ral.json +110 -0
- package/cpmm/artifacts/dex/Router.ral.json +361 -0
- package/cpmm/artifacts/dex/TokenPair.ral.json +512 -0
- package/cpmm/artifacts/dex/TokenPairFactory.ral.json +297 -0
- package/cpmm/artifacts/examples/ExampleOracleSimple.ral.json +192 -0
- package/cpmm/artifacts/examples/FeeCollectorFactoryImpl.ral.json +185 -0
- package/cpmm/artifacts/examples/FeeCollectorPerTokenPairImpl.ral.json +216 -0
- package/cpmm/artifacts/examples/FullMathTest.ral.json +123 -0
- package/cpmm/artifacts/scripts/AddLiquidity.ral.json +46 -0
- package/cpmm/artifacts/scripts/Burn.ral.json +31 -0
- package/cpmm/artifacts/scripts/CollectFee.ral.json +25 -0
- package/cpmm/artifacts/scripts/CreatePair.ral.json +37 -0
- package/cpmm/artifacts/scripts/CreatePairAndAddLiquidity.ral.json +43 -0
- package/cpmm/artifacts/scripts/EnableFeeCollector.ral.json +28 -0
- package/cpmm/artifacts/scripts/Mint.ral.json +34 -0
- package/cpmm/artifacts/scripts/RemoveLiquidity.ral.json +43 -0
- package/cpmm/artifacts/scripts/SetFeeCollectorFactory.ral.json +28 -0
- package/cpmm/artifacts/scripts/Swap.ral.json +46 -0
- package/cpmm/artifacts/scripts/SwapMaxIn.ral.json +46 -0
- package/cpmm/artifacts/scripts/SwapMinOut.ral.json +46 -0
- package/cpmm/artifacts/test/GetToken.ral.json +31 -0
- package/cpmm/artifacts/test/MathTest.ral.json +49 -0
- package/cpmm/artifacts/test/TestToken.ral.json +87 -0
- package/cpmm/artifacts/ts/DexAccount.ts +329 -0
- package/cpmm/artifacts/ts/ExampleOracleSimple.ts +383 -0
- package/cpmm/artifacts/ts/FeeCollectorFactoryImpl.ts +227 -0
- package/cpmm/artifacts/ts/FeeCollectorPerTokenPairImpl.ts +327 -0
- package/cpmm/artifacts/ts/FullMathTest.ts +251 -0
- package/cpmm/artifacts/ts/MathTest.ts +183 -0
- package/cpmm/artifacts/ts/Router.ts +554 -0
- package/cpmm/artifacts/ts/TestToken.ts +312 -0
- package/cpmm/artifacts/ts/TokenPair.ts +947 -0
- package/cpmm/artifacts/ts/TokenPairFactory.ts +501 -0
- package/cpmm/artifacts/ts/contracts.ts +26 -0
- package/cpmm/artifacts/ts/deployments.ts +109 -0
- package/cpmm/artifacts/ts/index.ts +16 -0
- package/cpmm/artifacts/ts/scripts.ts +142 -0
- package/cpmm/deployments/.deployments.devnet.json +77 -0
- package/cpmm/deployments/.deployments.testnet.json +79 -0
- package/lib/index.d.mts +8800 -0
- package/lib/index.d.ts +8800 -0
- package/lib/index.js +21769 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +22118 -0
- package/lib/index.mjs.map +1 -0
- package/package.json +80 -0
- package/src/clmm/clmm.ts +607 -0
- package/src/clmm/constants.ts +7 -0
- package/src/clmm/index.ts +6 -0
- package/src/clmm/liquidity.ts +163 -0
- package/src/clmm/pool.ts +154 -0
- package/src/clmm/tick.ts +335 -0
- package/src/clmm/types.ts +155 -0
- package/src/common/constants.ts +1 -0
- package/src/common/error.ts +46 -0
- package/src/common/index.ts +7 -0
- package/src/common/logger.ts +82 -0
- package/src/common/math.ts +88 -0
- package/src/common/numeric.ts +64 -0
- package/src/common/types.ts +49 -0
- package/src/common/utils.ts +3 -0
- package/src/cpmm/constants.ts +2 -0
- package/src/cpmm/cpmm.ts +631 -0
- package/src/cpmm/index.ts +3 -0
- package/src/cpmm/types.ts +113 -0
- package/src/index.ts +25 -0
- package/src/moduleBase.ts +64 -0
- package/src/staking/index.ts +4 -0
- package/src/staking/settings.ts +38 -0
- package/src/staking/staking.ts +277 -0
- package/src/staking/types.ts +15 -0
- package/src/staking/utils.ts +25 -0
- package/src/token/index.ts +1 -0
- package/src/token/token.ts +163 -0
- package/src/zeta.ts +105 -0
- package/staking/artifacts/AlphStakeAndLock.ral.json +31 -0
- package/staking/artifacts/AlphUnstakeVault.ral.json +151 -0
- package/staking/artifacts/XAlphStakeVault.ral.json +559 -0
- package/staking/artifacts/XAlphToken.ral.json +404 -0
- package/staking/artifacts/XAlphUnlockAndStartUnstake.ral.json +31 -0
- package/staking/artifacts/examples/GovernanceDemo.ral.json +282 -0
- package/staking/artifacts/examples/RewardSharingVault.ral.json +253 -0
- package/staking/artifacts/structs.ral.json +47 -0
- package/staking/artifacts/ts/AlphUnstakeVault.ts +354 -0
- package/staking/artifacts/ts/FullMathTest.ts +175 -0
- package/staking/artifacts/ts/GovernanceDemo.ts +726 -0
- package/staking/artifacts/ts/RewardSharingVault.ts +559 -0
- package/staking/artifacts/ts/TestDynamicArrayByteVec32.ts +431 -0
- package/staking/artifacts/ts/TestDynamicSortedArrayForU256.ts +516 -0
- package/staking/artifacts/ts/TestMerkleProof.ts +343 -0
- package/staking/artifacts/ts/XAlphStakeVault.ts +1120 -0
- package/staking/artifacts/ts/XAlphToken.ts +835 -0
- package/staking/artifacts/ts/contracts.ts +26 -0
- package/staking/artifacts/ts/deployments.ts +109 -0
- package/staking/artifacts/ts/index.ts +15 -0
- package/staking/artifacts/ts/scripts.ts +35 -0
- package/staking/artifacts/ts/types.ts +19 -0
- package/staking/artifacts/utils/FullMathTest.ral.json +57 -0
- package/staking/artifacts/utils/TestDynamicArrayByteVec32.ral.json +165 -0
- package/staking/artifacts/utils/TestDynamicSortedArrayForU256.ral.json +189 -0
- package/staking/artifacts/utils/TestMerkleProof.ral.json +134 -0
- package/staking/deployments/.deployments.devnet.json +77 -0
- package/staking/deployments/.deployments.testnet.json +78 -0
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Address,
|
|
7
|
+
Contract,
|
|
8
|
+
ContractState,
|
|
9
|
+
TestContractResult,
|
|
10
|
+
HexString,
|
|
11
|
+
ContractFactory,
|
|
12
|
+
EventSubscribeOptions,
|
|
13
|
+
EventSubscription,
|
|
14
|
+
CallContractParams,
|
|
15
|
+
CallContractResult,
|
|
16
|
+
TestContractParams,
|
|
17
|
+
ContractEvent,
|
|
18
|
+
subscribeContractEvent,
|
|
19
|
+
subscribeContractEvents,
|
|
20
|
+
testMethod,
|
|
21
|
+
callMethod,
|
|
22
|
+
multicallMethods,
|
|
23
|
+
fetchContractState,
|
|
24
|
+
Asset,
|
|
25
|
+
ContractInstance,
|
|
26
|
+
getContractEventsCurrentCount,
|
|
27
|
+
TestContractParamsWithoutMaps,
|
|
28
|
+
TestContractResultWithoutMaps,
|
|
29
|
+
SignExecuteContractMethodParams,
|
|
30
|
+
SignExecuteScriptTxResult,
|
|
31
|
+
signExecuteMethod,
|
|
32
|
+
addStdIdToFields,
|
|
33
|
+
encodeContractFields,
|
|
34
|
+
Narrow,
|
|
35
|
+
} from "@alephium/web3";
|
|
36
|
+
import { default as TestDynamicSortedArrayForU256ContractJson } from "../utils/TestDynamicSortedArrayForU256.ral.json";
|
|
37
|
+
import { getContractByCodeHash, registerContract } from "./contracts";
|
|
38
|
+
import * as types from "./types";
|
|
39
|
+
|
|
40
|
+
// Custom types for the contract
|
|
41
|
+
export namespace TestDynamicSortedArrayForU256Types {
|
|
42
|
+
export type State = Omit<ContractState<any>, "fields">;
|
|
43
|
+
|
|
44
|
+
export interface CallMethodTable {
|
|
45
|
+
get: {
|
|
46
|
+
params: CallContractParams<{ array: HexString; index: bigint }>;
|
|
47
|
+
result: CallContractResult<bigint>;
|
|
48
|
+
};
|
|
49
|
+
find: {
|
|
50
|
+
params: CallContractParams<{ array: HexString; value: bigint }>;
|
|
51
|
+
result: CallContractResult<bigint>;
|
|
52
|
+
};
|
|
53
|
+
remove: {
|
|
54
|
+
params: CallContractParams<{ array: HexString; value: bigint }>;
|
|
55
|
+
result: CallContractResult<HexString>;
|
|
56
|
+
};
|
|
57
|
+
push: {
|
|
58
|
+
params: CallContractParams<{ array: HexString; value: bigint }>;
|
|
59
|
+
result: CallContractResult<HexString>;
|
|
60
|
+
};
|
|
61
|
+
binarySearch: {
|
|
62
|
+
params: CallContractParams<{
|
|
63
|
+
array: HexString;
|
|
64
|
+
value: bigint;
|
|
65
|
+
left: bigint;
|
|
66
|
+
right: bigint;
|
|
67
|
+
}>;
|
|
68
|
+
result: CallContractResult<bigint>;
|
|
69
|
+
};
|
|
70
|
+
removeAt: {
|
|
71
|
+
params: CallContractParams<{ array: HexString; index: bigint }>;
|
|
72
|
+
result: CallContractResult<HexString>;
|
|
73
|
+
};
|
|
74
|
+
size: {
|
|
75
|
+
params: CallContractParams<{ array: HexString }>;
|
|
76
|
+
result: CallContractResult<bigint>;
|
|
77
|
+
};
|
|
78
|
+
empty: {
|
|
79
|
+
params: Omit<CallContractParams<{}>, "args">;
|
|
80
|
+
result: CallContractResult<HexString>;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export type CallMethodParams<T extends keyof CallMethodTable> =
|
|
84
|
+
CallMethodTable[T]["params"];
|
|
85
|
+
export type CallMethodResult<T extends keyof CallMethodTable> =
|
|
86
|
+
CallMethodTable[T]["result"];
|
|
87
|
+
export type MultiCallParams = Partial<{
|
|
88
|
+
[Name in keyof CallMethodTable]: CallMethodTable[Name]["params"];
|
|
89
|
+
}>;
|
|
90
|
+
export type MultiCallResults<T extends MultiCallParams> = {
|
|
91
|
+
[MaybeName in keyof T]: MaybeName extends keyof CallMethodTable
|
|
92
|
+
? CallMethodTable[MaybeName]["result"]
|
|
93
|
+
: undefined;
|
|
94
|
+
};
|
|
95
|
+
export type MulticallReturnType<Callss extends MultiCallParams[]> = {
|
|
96
|
+
[index in keyof Callss]: MultiCallResults<Callss[index]>;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export interface SignExecuteMethodTable {
|
|
100
|
+
get: {
|
|
101
|
+
params: SignExecuteContractMethodParams<{
|
|
102
|
+
array: HexString;
|
|
103
|
+
index: bigint;
|
|
104
|
+
}>;
|
|
105
|
+
result: SignExecuteScriptTxResult;
|
|
106
|
+
};
|
|
107
|
+
find: {
|
|
108
|
+
params: SignExecuteContractMethodParams<{
|
|
109
|
+
array: HexString;
|
|
110
|
+
value: bigint;
|
|
111
|
+
}>;
|
|
112
|
+
result: SignExecuteScriptTxResult;
|
|
113
|
+
};
|
|
114
|
+
remove: {
|
|
115
|
+
params: SignExecuteContractMethodParams<{
|
|
116
|
+
array: HexString;
|
|
117
|
+
value: bigint;
|
|
118
|
+
}>;
|
|
119
|
+
result: SignExecuteScriptTxResult;
|
|
120
|
+
};
|
|
121
|
+
push: {
|
|
122
|
+
params: SignExecuteContractMethodParams<{
|
|
123
|
+
array: HexString;
|
|
124
|
+
value: bigint;
|
|
125
|
+
}>;
|
|
126
|
+
result: SignExecuteScriptTxResult;
|
|
127
|
+
};
|
|
128
|
+
binarySearch: {
|
|
129
|
+
params: SignExecuteContractMethodParams<{
|
|
130
|
+
array: HexString;
|
|
131
|
+
value: bigint;
|
|
132
|
+
left: bigint;
|
|
133
|
+
right: bigint;
|
|
134
|
+
}>;
|
|
135
|
+
result: SignExecuteScriptTxResult;
|
|
136
|
+
};
|
|
137
|
+
removeAt: {
|
|
138
|
+
params: SignExecuteContractMethodParams<{
|
|
139
|
+
array: HexString;
|
|
140
|
+
index: bigint;
|
|
141
|
+
}>;
|
|
142
|
+
result: SignExecuteScriptTxResult;
|
|
143
|
+
};
|
|
144
|
+
size: {
|
|
145
|
+
params: SignExecuteContractMethodParams<{ array: HexString }>;
|
|
146
|
+
result: SignExecuteScriptTxResult;
|
|
147
|
+
};
|
|
148
|
+
empty: {
|
|
149
|
+
params: Omit<SignExecuteContractMethodParams<{}>, "args">;
|
|
150
|
+
result: SignExecuteScriptTxResult;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
export type SignExecuteMethodParams<T extends keyof SignExecuteMethodTable> =
|
|
154
|
+
SignExecuteMethodTable[T]["params"];
|
|
155
|
+
export type SignExecuteMethodResult<T extends keyof SignExecuteMethodTable> =
|
|
156
|
+
SignExecuteMethodTable[T]["result"];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
class Factory extends ContractFactory<
|
|
160
|
+
TestDynamicSortedArrayForU256Instance,
|
|
161
|
+
{}
|
|
162
|
+
> {
|
|
163
|
+
encodeFields() {
|
|
164
|
+
return encodeContractFields({}, this.contract.fieldsSig, types.AllStructs);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
consts = {
|
|
168
|
+
IntByteLength: BigInt("32"),
|
|
169
|
+
ErrorCode: {
|
|
170
|
+
InvalidArrayLength: BigInt("550"),
|
|
171
|
+
IndexOutOfBound: BigInt("551"),
|
|
172
|
+
InvalidByteVecLength: BigInt("552"),
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
at(address: string): TestDynamicSortedArrayForU256Instance {
|
|
177
|
+
return new TestDynamicSortedArrayForU256Instance(address);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
tests = {
|
|
181
|
+
get: async (
|
|
182
|
+
params: Omit<
|
|
183
|
+
TestContractParamsWithoutMaps<
|
|
184
|
+
never,
|
|
185
|
+
{ array: HexString; index: bigint }
|
|
186
|
+
>,
|
|
187
|
+
"initialFields"
|
|
188
|
+
>
|
|
189
|
+
): Promise<TestContractResultWithoutMaps<bigint>> => {
|
|
190
|
+
return testMethod(this, "get", params, getContractByCodeHash);
|
|
191
|
+
},
|
|
192
|
+
find: async (
|
|
193
|
+
params: Omit<
|
|
194
|
+
TestContractParamsWithoutMaps<
|
|
195
|
+
never,
|
|
196
|
+
{ array: HexString; value: bigint }
|
|
197
|
+
>,
|
|
198
|
+
"initialFields"
|
|
199
|
+
>
|
|
200
|
+
): Promise<TestContractResultWithoutMaps<bigint>> => {
|
|
201
|
+
return testMethod(this, "find", params, getContractByCodeHash);
|
|
202
|
+
},
|
|
203
|
+
remove: async (
|
|
204
|
+
params: Omit<
|
|
205
|
+
TestContractParamsWithoutMaps<
|
|
206
|
+
never,
|
|
207
|
+
{ array: HexString; value: bigint }
|
|
208
|
+
>,
|
|
209
|
+
"initialFields"
|
|
210
|
+
>
|
|
211
|
+
): Promise<TestContractResultWithoutMaps<HexString>> => {
|
|
212
|
+
return testMethod(this, "remove", params, getContractByCodeHash);
|
|
213
|
+
},
|
|
214
|
+
push: async (
|
|
215
|
+
params: Omit<
|
|
216
|
+
TestContractParamsWithoutMaps<
|
|
217
|
+
never,
|
|
218
|
+
{ array: HexString; value: bigint }
|
|
219
|
+
>,
|
|
220
|
+
"initialFields"
|
|
221
|
+
>
|
|
222
|
+
): Promise<TestContractResultWithoutMaps<HexString>> => {
|
|
223
|
+
return testMethod(this, "push", params, getContractByCodeHash);
|
|
224
|
+
},
|
|
225
|
+
binarySearch: async (
|
|
226
|
+
params: Omit<
|
|
227
|
+
TestContractParamsWithoutMaps<
|
|
228
|
+
never,
|
|
229
|
+
{ array: HexString; value: bigint; left: bigint; right: bigint }
|
|
230
|
+
>,
|
|
231
|
+
"initialFields"
|
|
232
|
+
>
|
|
233
|
+
): Promise<TestContractResultWithoutMaps<bigint>> => {
|
|
234
|
+
return testMethod(this, "binarySearch", params, getContractByCodeHash);
|
|
235
|
+
},
|
|
236
|
+
removeAt: async (
|
|
237
|
+
params: Omit<
|
|
238
|
+
TestContractParamsWithoutMaps<
|
|
239
|
+
never,
|
|
240
|
+
{ array: HexString; index: bigint }
|
|
241
|
+
>,
|
|
242
|
+
"initialFields"
|
|
243
|
+
>
|
|
244
|
+
): Promise<TestContractResultWithoutMaps<HexString>> => {
|
|
245
|
+
return testMethod(this, "removeAt", params, getContractByCodeHash);
|
|
246
|
+
},
|
|
247
|
+
size: async (
|
|
248
|
+
params: Omit<
|
|
249
|
+
TestContractParamsWithoutMaps<never, { array: HexString }>,
|
|
250
|
+
"initialFields"
|
|
251
|
+
>
|
|
252
|
+
): Promise<TestContractResultWithoutMaps<bigint>> => {
|
|
253
|
+
return testMethod(this, "size", params, getContractByCodeHash);
|
|
254
|
+
},
|
|
255
|
+
empty: async (
|
|
256
|
+
params?: Omit<
|
|
257
|
+
TestContractParamsWithoutMaps<never, never>,
|
|
258
|
+
"args" | "initialFields"
|
|
259
|
+
>
|
|
260
|
+
): Promise<TestContractResultWithoutMaps<HexString>> => {
|
|
261
|
+
return testMethod(
|
|
262
|
+
this,
|
|
263
|
+
"empty",
|
|
264
|
+
params === undefined ? {} : params,
|
|
265
|
+
getContractByCodeHash
|
|
266
|
+
);
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
stateForTest(initFields: {}, asset?: Asset, address?: string) {
|
|
271
|
+
return this.stateForTest_(initFields, asset, address, undefined);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Use this object to test and deploy the contract
|
|
276
|
+
export const TestDynamicSortedArrayForU256 = new Factory(
|
|
277
|
+
Contract.fromJson(
|
|
278
|
+
TestDynamicSortedArrayForU256ContractJson,
|
|
279
|
+
"",
|
|
280
|
+
"86f2584a16af632c63b6c1ead625d4d53f11b9a3f2d465010085bd740be281d3",
|
|
281
|
+
types.AllStructs
|
|
282
|
+
)
|
|
283
|
+
);
|
|
284
|
+
registerContract(TestDynamicSortedArrayForU256);
|
|
285
|
+
|
|
286
|
+
// Use this class to interact with the blockchain
|
|
287
|
+
export class TestDynamicSortedArrayForU256Instance extends ContractInstance {
|
|
288
|
+
constructor(address: Address) {
|
|
289
|
+
super(address);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
async fetchState(): Promise<TestDynamicSortedArrayForU256Types.State> {
|
|
293
|
+
return fetchContractState(TestDynamicSortedArrayForU256, this);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
view = {
|
|
297
|
+
get: async (
|
|
298
|
+
params: TestDynamicSortedArrayForU256Types.CallMethodParams<"get">
|
|
299
|
+
): Promise<TestDynamicSortedArrayForU256Types.CallMethodResult<"get">> => {
|
|
300
|
+
return callMethod(
|
|
301
|
+
TestDynamicSortedArrayForU256,
|
|
302
|
+
this,
|
|
303
|
+
"get",
|
|
304
|
+
params,
|
|
305
|
+
getContractByCodeHash
|
|
306
|
+
);
|
|
307
|
+
},
|
|
308
|
+
find: async (
|
|
309
|
+
params: TestDynamicSortedArrayForU256Types.CallMethodParams<"find">
|
|
310
|
+
): Promise<TestDynamicSortedArrayForU256Types.CallMethodResult<"find">> => {
|
|
311
|
+
return callMethod(
|
|
312
|
+
TestDynamicSortedArrayForU256,
|
|
313
|
+
this,
|
|
314
|
+
"find",
|
|
315
|
+
params,
|
|
316
|
+
getContractByCodeHash
|
|
317
|
+
);
|
|
318
|
+
},
|
|
319
|
+
remove: async (
|
|
320
|
+
params: TestDynamicSortedArrayForU256Types.CallMethodParams<"remove">
|
|
321
|
+
): Promise<
|
|
322
|
+
TestDynamicSortedArrayForU256Types.CallMethodResult<"remove">
|
|
323
|
+
> => {
|
|
324
|
+
return callMethod(
|
|
325
|
+
TestDynamicSortedArrayForU256,
|
|
326
|
+
this,
|
|
327
|
+
"remove",
|
|
328
|
+
params,
|
|
329
|
+
getContractByCodeHash
|
|
330
|
+
);
|
|
331
|
+
},
|
|
332
|
+
push: async (
|
|
333
|
+
params: TestDynamicSortedArrayForU256Types.CallMethodParams<"push">
|
|
334
|
+
): Promise<TestDynamicSortedArrayForU256Types.CallMethodResult<"push">> => {
|
|
335
|
+
return callMethod(
|
|
336
|
+
TestDynamicSortedArrayForU256,
|
|
337
|
+
this,
|
|
338
|
+
"push",
|
|
339
|
+
params,
|
|
340
|
+
getContractByCodeHash
|
|
341
|
+
);
|
|
342
|
+
},
|
|
343
|
+
binarySearch: async (
|
|
344
|
+
params: TestDynamicSortedArrayForU256Types.CallMethodParams<"binarySearch">
|
|
345
|
+
): Promise<
|
|
346
|
+
TestDynamicSortedArrayForU256Types.CallMethodResult<"binarySearch">
|
|
347
|
+
> => {
|
|
348
|
+
return callMethod(
|
|
349
|
+
TestDynamicSortedArrayForU256,
|
|
350
|
+
this,
|
|
351
|
+
"binarySearch",
|
|
352
|
+
params,
|
|
353
|
+
getContractByCodeHash
|
|
354
|
+
);
|
|
355
|
+
},
|
|
356
|
+
removeAt: async (
|
|
357
|
+
params: TestDynamicSortedArrayForU256Types.CallMethodParams<"removeAt">
|
|
358
|
+
): Promise<
|
|
359
|
+
TestDynamicSortedArrayForU256Types.CallMethodResult<"removeAt">
|
|
360
|
+
> => {
|
|
361
|
+
return callMethod(
|
|
362
|
+
TestDynamicSortedArrayForU256,
|
|
363
|
+
this,
|
|
364
|
+
"removeAt",
|
|
365
|
+
params,
|
|
366
|
+
getContractByCodeHash
|
|
367
|
+
);
|
|
368
|
+
},
|
|
369
|
+
size: async (
|
|
370
|
+
params: TestDynamicSortedArrayForU256Types.CallMethodParams<"size">
|
|
371
|
+
): Promise<TestDynamicSortedArrayForU256Types.CallMethodResult<"size">> => {
|
|
372
|
+
return callMethod(
|
|
373
|
+
TestDynamicSortedArrayForU256,
|
|
374
|
+
this,
|
|
375
|
+
"size",
|
|
376
|
+
params,
|
|
377
|
+
getContractByCodeHash
|
|
378
|
+
);
|
|
379
|
+
},
|
|
380
|
+
empty: async (
|
|
381
|
+
params?: TestDynamicSortedArrayForU256Types.CallMethodParams<"empty">
|
|
382
|
+
): Promise<
|
|
383
|
+
TestDynamicSortedArrayForU256Types.CallMethodResult<"empty">
|
|
384
|
+
> => {
|
|
385
|
+
return callMethod(
|
|
386
|
+
TestDynamicSortedArrayForU256,
|
|
387
|
+
this,
|
|
388
|
+
"empty",
|
|
389
|
+
params === undefined ? {} : params,
|
|
390
|
+
getContractByCodeHash
|
|
391
|
+
);
|
|
392
|
+
},
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
transact = {
|
|
396
|
+
get: async (
|
|
397
|
+
params: TestDynamicSortedArrayForU256Types.SignExecuteMethodParams<"get">
|
|
398
|
+
): Promise<
|
|
399
|
+
TestDynamicSortedArrayForU256Types.SignExecuteMethodResult<"get">
|
|
400
|
+
> => {
|
|
401
|
+
return signExecuteMethod(
|
|
402
|
+
TestDynamicSortedArrayForU256,
|
|
403
|
+
this,
|
|
404
|
+
"get",
|
|
405
|
+
params
|
|
406
|
+
);
|
|
407
|
+
},
|
|
408
|
+
find: async (
|
|
409
|
+
params: TestDynamicSortedArrayForU256Types.SignExecuteMethodParams<"find">
|
|
410
|
+
): Promise<
|
|
411
|
+
TestDynamicSortedArrayForU256Types.SignExecuteMethodResult<"find">
|
|
412
|
+
> => {
|
|
413
|
+
return signExecuteMethod(
|
|
414
|
+
TestDynamicSortedArrayForU256,
|
|
415
|
+
this,
|
|
416
|
+
"find",
|
|
417
|
+
params
|
|
418
|
+
);
|
|
419
|
+
},
|
|
420
|
+
remove: async (
|
|
421
|
+
params: TestDynamicSortedArrayForU256Types.SignExecuteMethodParams<"remove">
|
|
422
|
+
): Promise<
|
|
423
|
+
TestDynamicSortedArrayForU256Types.SignExecuteMethodResult<"remove">
|
|
424
|
+
> => {
|
|
425
|
+
return signExecuteMethod(
|
|
426
|
+
TestDynamicSortedArrayForU256,
|
|
427
|
+
this,
|
|
428
|
+
"remove",
|
|
429
|
+
params
|
|
430
|
+
);
|
|
431
|
+
},
|
|
432
|
+
push: async (
|
|
433
|
+
params: TestDynamicSortedArrayForU256Types.SignExecuteMethodParams<"push">
|
|
434
|
+
): Promise<
|
|
435
|
+
TestDynamicSortedArrayForU256Types.SignExecuteMethodResult<"push">
|
|
436
|
+
> => {
|
|
437
|
+
return signExecuteMethod(
|
|
438
|
+
TestDynamicSortedArrayForU256,
|
|
439
|
+
this,
|
|
440
|
+
"push",
|
|
441
|
+
params
|
|
442
|
+
);
|
|
443
|
+
},
|
|
444
|
+
binarySearch: async (
|
|
445
|
+
params: TestDynamicSortedArrayForU256Types.SignExecuteMethodParams<"binarySearch">
|
|
446
|
+
): Promise<
|
|
447
|
+
TestDynamicSortedArrayForU256Types.SignExecuteMethodResult<"binarySearch">
|
|
448
|
+
> => {
|
|
449
|
+
return signExecuteMethod(
|
|
450
|
+
TestDynamicSortedArrayForU256,
|
|
451
|
+
this,
|
|
452
|
+
"binarySearch",
|
|
453
|
+
params
|
|
454
|
+
);
|
|
455
|
+
},
|
|
456
|
+
removeAt: async (
|
|
457
|
+
params: TestDynamicSortedArrayForU256Types.SignExecuteMethodParams<"removeAt">
|
|
458
|
+
): Promise<
|
|
459
|
+
TestDynamicSortedArrayForU256Types.SignExecuteMethodResult<"removeAt">
|
|
460
|
+
> => {
|
|
461
|
+
return signExecuteMethod(
|
|
462
|
+
TestDynamicSortedArrayForU256,
|
|
463
|
+
this,
|
|
464
|
+
"removeAt",
|
|
465
|
+
params
|
|
466
|
+
);
|
|
467
|
+
},
|
|
468
|
+
size: async (
|
|
469
|
+
params: TestDynamicSortedArrayForU256Types.SignExecuteMethodParams<"size">
|
|
470
|
+
): Promise<
|
|
471
|
+
TestDynamicSortedArrayForU256Types.SignExecuteMethodResult<"size">
|
|
472
|
+
> => {
|
|
473
|
+
return signExecuteMethod(
|
|
474
|
+
TestDynamicSortedArrayForU256,
|
|
475
|
+
this,
|
|
476
|
+
"size",
|
|
477
|
+
params
|
|
478
|
+
);
|
|
479
|
+
},
|
|
480
|
+
empty: async (
|
|
481
|
+
params: TestDynamicSortedArrayForU256Types.SignExecuteMethodParams<"empty">
|
|
482
|
+
): Promise<
|
|
483
|
+
TestDynamicSortedArrayForU256Types.SignExecuteMethodResult<"empty">
|
|
484
|
+
> => {
|
|
485
|
+
return signExecuteMethod(
|
|
486
|
+
TestDynamicSortedArrayForU256,
|
|
487
|
+
this,
|
|
488
|
+
"empty",
|
|
489
|
+
params
|
|
490
|
+
);
|
|
491
|
+
},
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
async multicall<
|
|
495
|
+
Calls extends TestDynamicSortedArrayForU256Types.MultiCallParams
|
|
496
|
+
>(
|
|
497
|
+
calls: Calls
|
|
498
|
+
): Promise<TestDynamicSortedArrayForU256Types.MultiCallResults<Calls>>;
|
|
499
|
+
async multicall<
|
|
500
|
+
Callss extends TestDynamicSortedArrayForU256Types.MultiCallParams[]
|
|
501
|
+
>(
|
|
502
|
+
callss: Narrow<Callss>
|
|
503
|
+
): Promise<TestDynamicSortedArrayForU256Types.MulticallReturnType<Callss>>;
|
|
504
|
+
async multicall<
|
|
505
|
+
Callss extends
|
|
506
|
+
| TestDynamicSortedArrayForU256Types.MultiCallParams
|
|
507
|
+
| TestDynamicSortedArrayForU256Types.MultiCallParams[]
|
|
508
|
+
>(callss: Callss): Promise<unknown> {
|
|
509
|
+
return await multicallMethods(
|
|
510
|
+
TestDynamicSortedArrayForU256,
|
|
511
|
+
this,
|
|
512
|
+
callss,
|
|
513
|
+
getContractByCodeHash
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
}
|