@galacticcouncil/descriptors 1.9.0 → 1.10.0
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/build/common-types.d.ts +5182 -5036
- package/build/descriptors-IW6WQTTP.mjs +29 -0
- package/build/hydration.d.ts +2577 -219
- package/build/index.d.ts +1 -1
- package/build/index.js +8 -6
- package/build/index.mjs +10 -8
- package/build/metadataTypes-RIF3Y4T4.mjs +6 -0
- package/build/metadataTypes.d.ts +1 -1
- package/package.json +1 -1
- package/build/descriptors-XM6FUHC6.mjs +0 -29
- package/build/metadataTypes-FWGCMXKE.mjs +0 -6
package/build/hydration.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StorageDescriptor, PlainDescriptor, TxDescriptor, RuntimeDescriptor, Enum, ApisFromDef, QueryFromPalletsDef, TxFromPalletsDef, EventsFromPalletsDef, ErrorsFromPalletsDef, ConstFromPalletsDef, ViewFnsFromPalletsDef, SS58String, FixedSizeBinary, Binary, FixedSizeArray } from "polkadot-api";
|
|
2
|
-
import { I5sesotjlssv2d, Iffmde3ekjedi9, I4mddgoa69c0a2,
|
|
2
|
+
import { I5sesotjlssv2d, Iffmde3ekjedi9, I4mddgoa69c0a2, Icp1nm1iiguk6d, I95g6i7ilua7lq, Ieniouoqkq4icf, Phase, Ibgl04rn6nbfm6, I1q8tnt1cluu5j, I8ds64oj6581v0, Ia7pdug7cdsg8g, I3oiqtmlj7klbr, I9bin2jc70qt6q, I6mhebgj62g585, I3vhcedhm4hpvm, I526daka7j7b17, Ifanv2kvm586s4, I5rsgtofmn5lli, Idned7t7knml6b, I2itl2k1j2q8nf, Ic3orq32is6lrl, ConvictionVotingVoteVoting, I6ouflveob4eli, If9jidduiuq7vv, Ibonvg03jegqd2, Ifj0li5nn5unet, I4c0s5cioidn76, I8ikpj86u2na1q, Icbsch55a85u5u, I5ugnv0dol8v8t, I1ksaufim9dq1c, Ielgh4t8o7rcvt, I3rvqhkck00laj, I9jd27rnpm8ttv, I7bcpl5g2rcql5, Ibn3i0ad6beo5l, I5aq7tv9lofc3v, I10uqvdcdcld3o, I3fgr93o42d9hi, Ihjc2vmjfhsmq, I663kh18bno0fo, I1p5pqg6bllgtl, Ibvb0fi020hjcf, If87m5gtpa546f, I4ojmnsk1dchql, Iesq88051ch8ht, I9qpa0evftgoo5, I4qc61lpfqml75, I1stghsu756nk9, Idqn78enhf4jrq, Ic02kut0350gb0, Ifitc0q6ckjb3j, Idi27giun0mb9q, Idud3fdh64aqp9, Ie7atdsih6q14b, I4totqt881mlti, Id32h28hjj1tch, I66gvo4ilpv28i, Ifn6q3equiq9qi, I8kbiofpboejrm, I9ae1049tiuvhb, I1os9h4ivict7u, Isa48262v9oqu, In7a38730s6qs, If15el53dd76v9, I9s0ave7t0vnrk, Ic6nglu2db2c36, Ibafpkl9hhno69, I9m0752cdvui5o, Iep7au1720bm0e, Ie5fbn0f5capo3, Ia9ai1mp1viqjd, Ic1e6uvbf8ado3, Ie7oqvfdar8r2, I6v8sm60vvkmk7, I92pum5p0t4pat, I909ad06li5mlt, Id2vcln8l5js7v, Iapma14uhor1hk, I3j76tu6k1ksql, I1moso5oagpiea, Ibeb4n9vpjefp3, Id7murq9s9fg6h, Ied9mja4bq7va8, I4f7jul8ljs54r, I5agg650597e49, I2ev73t79f46tb, Iab64mce6q91i, I14p0q0qs0fqbj, I666bl2fqjkejo, I7ji3jng252el9, I3v9h9f3mpm1l8, I9mnj4k4u8ls2c, I2kt2u1flctk2q, Idnsr2pndm36h0, Itcpv4hqecjfj, I8steo882k7qns, I9qtj66dgng975, I5f178ab6b89t3, Iduerupfbc8ruc, I3btog7m617l6b, Icbccs0ug47ilf, Ivm3oem3tagcb, Ida2ijjar0n0j3, Ing3etrevsfg0, Ietsl92b11kilg, Icqdi7b9m95ug3, Ieuqv44kptstcs, I6vhvcln14dp4d, Ievca65alkkho9, I2qkf9i0e8mf1f, Iefviakco48cs2, Iakb7idgif10m8, Id7aqsj1u6b2r2, Icah19jgge5j3e, I2bi2kbaaunr13, I3iojc1k1m6nu7, I9q8qmop6bko5m, Ial2ta95n8ff3b, Iammrvujtc5lnk, I87j02rt3f17j8, Iasmn3c065hq91, Ia5kd7m19ap7ge, Ieq7brqoubndin, Ie8ft8rd6cil27, I2k37dcoppgins, Ia05t9pjenemsb, I4rm8rabbdt645, I9sh4kg79d0vn, I5k5ne4orot4oe, Idtg418thlu95, I8utns9aeu3t6o, I35cf63e7kg5on, Ibq6b0nsk23kj8, Ifc3gfgolmaqf7, I651losl68jmo5, I5dlvf0cogf3c3, Ie6nueo20p04gk, I3qt1hgg4djhgb, I77a9b6eik0rui, Ics8sn0t3vlpat, I6p5nbogrodkcc, I7pgj3rnfo83eg, Ic11mlh16sngai, I4vbsn8c7ui70f, I60m5cjc6e18ab, Iauknf9up388mv, Ieh252ua9757u1, Iest0fomljvrb6, I2d6orhhgh5et2, I8ij5e2p0aqu6i, Ijqmlm7h71nc1, Ibmmi1tbvqjkf9, I4f24vd3pvt9k, Icjk91npopm3h9, Ie03o0h06lol9p, I1ko6jcqv0sqm4, I6a1eig522s2p0, I7mcjnqos9shs1, I6ap0qjh5n5817, I6pjjpfvhvcfru, Ia5le7udkgbaq9, Ionfhf9va2t31, Ibbvcet1pv1l61, I67bpqa7o2ocua, I2holodggoluon, Ib5umq5uf644jr, I9r83fr4b3rmmj, I24s4g6gkj5oec, Idcabvplu05lea, I2ncccle6pmhd9, I92bnd3pe0civj, Ic84i538n8bl8j, Itmchvgqfl28g, I10hmgseei3j6r, I8p4numg1r4ojm, Idtucog650c7f8, I4kvfua9fqrpi2, I7t5blhj97u8r7, I21qpgggberqt3, Id7r4m9aulb7sn, Ielqbuofrsq2ri, I3hno1r9147mro, Iaihikf7d0fpt7, Iaehj4ajaudum7, Id83ilm95if0sl, I82r4tvnf2s05i, Icojrb9unj3i10, Ib9aiguc778ujf, If4ebvclj2ugvi, I9paqujeb1fpv6, Iakevv83i18n4r, If2ssl12kcglhg, Iabk8ljl5g8c86, Ic76kfh5ebqkpl, Icrujen33bbibf, I5gi8h3e5lkbeq, Ibgm4rnf22lal1, I8mmaab8je28oo, I6r0pr82pbiftt, If1007933akv96, I59jkmlks7g3ck, I88qo502j1hm6r, I44sqbdseede38, I203slt75ll6b5, I9buamva6m987d, I931cottvong90, Ifmc9boeeia623, Ibplkiqg5rvr3e, Icnmrtlo128skq, Icojqvn3afk41n, Iabpgqcjikia83, Icgljjb6j82uhn, I4g15ko4u63fja, If08sfhqn8ujfr, Ic4rgfgksgmm3e, I3dj14b7k3rkm5, I36ted2rh1tok8, Ie624eo5lliskr, Ifogockjiq4b3, I2r0n4gcrs974b, Ie6kgk6f04rsvk, Ibkook56hopvp8, Itom7fk49o0c9, I1fl9qh2r1hf29, I4arjljr6dpflb, I45rl58hfs7m0h, Ic952bubvq4k7d, Ihfphjolmsqq1, I1p1369d52j8jd, HydrationXcmVersionedXcm, Ic0c3req3mlc1l, I4q39t5hn830vp, HydrationXcmVersionedAssetId, I7ocn4njqde3v5, HydrationXcmVersionedLocation, I5rlt6h8ph553n, Iathhdqc4u75dj, Iadi05terfo8g5, I38sq2abrntuaf, Ifi30q3af4jdm9, I35p85j063s0il, Id5qsstfl1fkb3, I3ii6nera7pkr8 } from "./common-types";
|
|
3
3
|
type AnonymousEnum<T extends {}> = T & {
|
|
4
4
|
__anonymous: true;
|
|
5
5
|
};
|
|
@@ -61,7 +61,7 @@ type IStorage = {
|
|
|
61
61
|
* Events have a large in-memory size. Box the events to not go out-of-memory
|
|
62
62
|
* just in case someone still reads them from within the runtime.
|
|
63
63
|
*/
|
|
64
|
-
Events: StorageDescriptor<[], Anonymize<
|
|
64
|
+
Events: StorageDescriptor<[], Anonymize<Icp1nm1iiguk6d>, false, never>;
|
|
65
65
|
/**
|
|
66
66
|
* The number of events in the `Events<T>` list.
|
|
67
67
|
*/
|
|
@@ -101,6 +101,77 @@ type IStorage = {
|
|
|
101
101
|
*/
|
|
102
102
|
AuthorizedUpgrade: StorageDescriptor<[], Anonymize<Ibgl04rn6nbfm6>, true, never>;
|
|
103
103
|
};
|
|
104
|
+
Timestamp: {
|
|
105
|
+
/**
|
|
106
|
+
* The current time for the current block.
|
|
107
|
+
*/
|
|
108
|
+
Now: StorageDescriptor<[], bigint, false, never>;
|
|
109
|
+
/**
|
|
110
|
+
* Whether the timestamp has been updated in this block.
|
|
111
|
+
*
|
|
112
|
+
* This value is updated to `true` upon successful submission of a timestamp by a node.
|
|
113
|
+
* It is then checked at the end of each block execution in the `on_finalize` hook.
|
|
114
|
+
*/
|
|
115
|
+
DidUpdate: StorageDescriptor<[], boolean, false, never>;
|
|
116
|
+
};
|
|
117
|
+
Balances: {
|
|
118
|
+
/**
|
|
119
|
+
* The total units issued in the system.
|
|
120
|
+
*/
|
|
121
|
+
TotalIssuance: StorageDescriptor<[], bigint, false, never>;
|
|
122
|
+
/**
|
|
123
|
+
* The total units of outstanding deactivated balance in the system.
|
|
124
|
+
*/
|
|
125
|
+
InactiveIssuance: StorageDescriptor<[], bigint, false, never>;
|
|
126
|
+
/**
|
|
127
|
+
* The Balances pallet example of storing the balance of an account.
|
|
128
|
+
*
|
|
129
|
+
* # Example
|
|
130
|
+
*
|
|
131
|
+
* ```nocompile
|
|
132
|
+
* impl pallet_balances::Config for Runtime {
|
|
133
|
+
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
|
|
134
|
+
* }
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* You can also store the balance of an account in the `System` pallet.
|
|
138
|
+
*
|
|
139
|
+
* # Example
|
|
140
|
+
*
|
|
141
|
+
* ```nocompile
|
|
142
|
+
* impl pallet_balances::Config for Runtime {
|
|
143
|
+
* type AccountStore = System
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* But this comes with tradeoffs, storing account balances in the system pallet stores
|
|
148
|
+
* `frame_system` data alongside the account data contrary to storing account balances in the
|
|
149
|
+
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
|
|
150
|
+
* NOTE: This is only used in the case that this pallet is used to store balances.
|
|
151
|
+
*/
|
|
152
|
+
Account: StorageDescriptor<[Key: SS58String], Anonymize<I1q8tnt1cluu5j>, false, never>;
|
|
153
|
+
/**
|
|
154
|
+
* Any liquidity locks on some account balances.
|
|
155
|
+
* NOTE: Should only be accessed when setting, changing and freeing a lock.
|
|
156
|
+
*
|
|
157
|
+
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
|
|
158
|
+
*/
|
|
159
|
+
Locks: StorageDescriptor<[Key: SS58String], Anonymize<I8ds64oj6581v0>, false, never>;
|
|
160
|
+
/**
|
|
161
|
+
* Named reserves on some account balances.
|
|
162
|
+
*
|
|
163
|
+
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
|
|
164
|
+
*/
|
|
165
|
+
Reserves: StorageDescriptor<[Key: SS58String], Anonymize<Ia7pdug7cdsg8g>, false, never>;
|
|
166
|
+
/**
|
|
167
|
+
* Holds on account balances.
|
|
168
|
+
*/
|
|
169
|
+
Holds: StorageDescriptor<[Key: SS58String], Anonymize<I3oiqtmlj7klbr>, false, never>;
|
|
170
|
+
/**
|
|
171
|
+
* Freeze locks on account balances.
|
|
172
|
+
*/
|
|
173
|
+
Freezes: StorageDescriptor<[Key: SS58String], Anonymize<I9bin2jc70qt6q>, false, never>;
|
|
174
|
+
};
|
|
104
175
|
MultiTransactionPayment: {
|
|
105
176
|
/**
|
|
106
177
|
* Account currency map
|
|
@@ -119,6 +190,74 @@ type IStorage = {
|
|
|
119
190
|
*/
|
|
120
191
|
TransactionCurrencyOverride: StorageDescriptor<[Key: SS58String], number, true, never>;
|
|
121
192
|
};
|
|
193
|
+
Democracy: {
|
|
194
|
+
/**
|
|
195
|
+
* The number of (public) proposals that have been made so far.
|
|
196
|
+
*/
|
|
197
|
+
PublicPropCount: StorageDescriptor<[], number, false, never>;
|
|
198
|
+
/**
|
|
199
|
+
* The public proposals. Unsorted. The second item is the proposal.
|
|
200
|
+
*/
|
|
201
|
+
PublicProps: StorageDescriptor<[], Anonymize<I6mhebgj62g585>, false, never>;
|
|
202
|
+
/**
|
|
203
|
+
* Those who have locked a deposit.
|
|
204
|
+
*
|
|
205
|
+
* TWOX-NOTE: Safe, as increasing integer keys are safe.
|
|
206
|
+
*/
|
|
207
|
+
DepositOf: StorageDescriptor<[Key: number], Anonymize<I3vhcedhm4hpvm>, true, never>;
|
|
208
|
+
/**
|
|
209
|
+
* The next free referendum index, aka the number of referenda started so far.
|
|
210
|
+
*/
|
|
211
|
+
ReferendumCount: StorageDescriptor<[], number, false, never>;
|
|
212
|
+
/**
|
|
213
|
+
* The lowest referendum index representing an unbaked referendum. Equal to
|
|
214
|
+
* `ReferendumCount` if there isn't a unbaked referendum.
|
|
215
|
+
*/
|
|
216
|
+
LowestUnbaked: StorageDescriptor<[], number, false, never>;
|
|
217
|
+
/**
|
|
218
|
+
* Information concerning any given referendum.
|
|
219
|
+
*
|
|
220
|
+
* TWOX-NOTE: SAFE as indexes are not under an attacker’s control.
|
|
221
|
+
*/
|
|
222
|
+
ReferendumInfoOf: StorageDescriptor<[Key: number], Anonymize<I526daka7j7b17>, true, never>;
|
|
223
|
+
/**
|
|
224
|
+
* All votes for a particular voter. We store the balance for the number of votes that we
|
|
225
|
+
* have recorded. The second item is the total amount of delegations, that will be added.
|
|
226
|
+
*
|
|
227
|
+
* TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway.
|
|
228
|
+
*/
|
|
229
|
+
VotingOf: StorageDescriptor<[Key: SS58String], Anonymize<Ifanv2kvm586s4>, false, never>;
|
|
230
|
+
/**
|
|
231
|
+
* True if the last referendum tabled was submitted externally. False if it was a public
|
|
232
|
+
* proposal.
|
|
233
|
+
*/
|
|
234
|
+
LastTabledWasExternal: StorageDescriptor<[], boolean, false, never>;
|
|
235
|
+
/**
|
|
236
|
+
* The referendum to be tabled whenever it would be valid to table an external proposal.
|
|
237
|
+
* This happens when a referendum needs to be tabled and one of two conditions are met:
|
|
238
|
+
* - `LastTabledWasExternal` is `false`; or
|
|
239
|
+
* - `PublicProps` is empty.
|
|
240
|
+
*/
|
|
241
|
+
NextExternal: StorageDescriptor<[], Anonymize<I5rsgtofmn5lli>, true, never>;
|
|
242
|
+
/**
|
|
243
|
+
* A record of who vetoed what. Maps proposal hash to a possible existent block number
|
|
244
|
+
* (until when it may not be resubmitted) and who vetoed it.
|
|
245
|
+
*/
|
|
246
|
+
Blacklist: StorageDescriptor<[Key: FixedSizeBinary<32>], Anonymize<Idned7t7knml6b>, true, never>;
|
|
247
|
+
/**
|
|
248
|
+
* Record of all proposals that have been subject to emergency cancellation.
|
|
249
|
+
*/
|
|
250
|
+
Cancellations: StorageDescriptor<[Key: FixedSizeBinary<32>], boolean, false, never>;
|
|
251
|
+
/**
|
|
252
|
+
* General information concerning any proposal or referendum.
|
|
253
|
+
* The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON
|
|
254
|
+
* dump or IPFS hash of a JSON file.
|
|
255
|
+
*
|
|
256
|
+
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
|
|
257
|
+
* large preimages.
|
|
258
|
+
*/
|
|
259
|
+
MetadataOf: StorageDescriptor<[Key: Anonymize<I2itl2k1j2q8nf>], FixedSizeBinary<32>, true, never>;
|
|
260
|
+
};
|
|
122
261
|
Uniques: {
|
|
123
262
|
/**
|
|
124
263
|
* The items held by any given account; set out this way so that items owned by a single
|
|
@@ -126,6 +265,19 @@ type IStorage = {
|
|
|
126
265
|
*/
|
|
127
266
|
Account: StorageDescriptor<Anonymize<Ic3orq32is6lrl>, null, true, never>;
|
|
128
267
|
};
|
|
268
|
+
ConvictionVoting: {
|
|
269
|
+
/**
|
|
270
|
+
* All voting for a particular voter in a particular voting class. We store the balance for the
|
|
271
|
+
* number of votes that we have recorded.
|
|
272
|
+
*/
|
|
273
|
+
VotingFor: StorageDescriptor<Anonymize<I6ouflveob4eli>, ConvictionVotingVoteVoting, false, never>;
|
|
274
|
+
/**
|
|
275
|
+
* The voting classes which have a non-zero lock requirement and the lock amounts which they
|
|
276
|
+
* require. The actual amount locked on behalf of this pallet should always be the maximum of
|
|
277
|
+
* this list.
|
|
278
|
+
*/
|
|
279
|
+
ClassLocksFor: StorageDescriptor<[Key: SS58String], Anonymize<If9jidduiuq7vv>, false, never>;
|
|
280
|
+
};
|
|
129
281
|
Referenda: {
|
|
130
282
|
/**
|
|
131
283
|
* The next free referendum index, aka the number of referenda started so far.
|
|
@@ -231,6 +383,22 @@ type IStorage = {
|
|
|
231
383
|
*/
|
|
232
384
|
ActiveYieldFarm: StorageDescriptor<Anonymize<I9jd27rnpm8ttv>, number, true, never>;
|
|
233
385
|
};
|
|
386
|
+
OmnipoolLiquidityMining: {
|
|
387
|
+
/**
|
|
388
|
+
* Map of omnipool position's ids to LM's deposit ids.
|
|
389
|
+
*/
|
|
390
|
+
OmniPositionId: StorageDescriptor<[Key: bigint], bigint, true, never>;
|
|
391
|
+
};
|
|
392
|
+
OTC: {
|
|
393
|
+
/**
|
|
394
|
+
* ID sequencer for Orders
|
|
395
|
+
*/
|
|
396
|
+
NextOrderId: StorageDescriptor<[], number, false, never>;
|
|
397
|
+
/**
|
|
398
|
+
|
|
399
|
+
*/
|
|
400
|
+
Orders: StorageDescriptor<[Key: number], Anonymize<I7bcpl5g2rcql5>, true, never>;
|
|
401
|
+
};
|
|
234
402
|
DynamicFees: {
|
|
235
403
|
/**
|
|
236
404
|
* Stores last calculated fee of an asset and block number in which it was changed..
|
|
@@ -331,6 +499,55 @@ type IStorage = {
|
|
|
331
499
|
*/
|
|
332
500
|
PoolAssets: StorageDescriptor<[Key: SS58String], Anonymize<I9jd27rnpm8ttv>, true, never>;
|
|
333
501
|
};
|
|
502
|
+
Referrals: {
|
|
503
|
+
/**
|
|
504
|
+
* Referral codes
|
|
505
|
+
* Maps a referral code to an account.
|
|
506
|
+
*/
|
|
507
|
+
ReferralCodes: StorageDescriptor<[Key: Binary], SS58String, true, never>;
|
|
508
|
+
/**
|
|
509
|
+
* Referral accounts
|
|
510
|
+
* Maps an account to a referral code.
|
|
511
|
+
*/
|
|
512
|
+
ReferralAccounts: StorageDescriptor<[Key: SS58String], Binary, true, never>;
|
|
513
|
+
/**
|
|
514
|
+
* Linked accounts.
|
|
515
|
+
* Maps an account to a referral account.
|
|
516
|
+
*/
|
|
517
|
+
LinkedAccounts: StorageDescriptor<[Key: SS58String], SS58String, true, never>;
|
|
518
|
+
/**
|
|
519
|
+
* Shares of a referral account
|
|
520
|
+
*/
|
|
521
|
+
ReferrerShares: StorageDescriptor<[Key: SS58String], bigint, false, never>;
|
|
522
|
+
/**
|
|
523
|
+
* Shares of a trader account
|
|
524
|
+
*/
|
|
525
|
+
TraderShares: StorageDescriptor<[Key: SS58String], bigint, false, never>;
|
|
526
|
+
/**
|
|
527
|
+
* Total share issuance.
|
|
528
|
+
*/
|
|
529
|
+
TotalShares: StorageDescriptor<[], bigint, false, never>;
|
|
530
|
+
/**
|
|
531
|
+
* Referer level and total accumulated rewards over time.
|
|
532
|
+
* Maps referrer account to (Level, Balance). Level indicates current rewards and Balance is used to unlock next level.
|
|
533
|
+
* Dev note: we use OptionQuery here because this helps to easily determine that an account if referrer account.
|
|
534
|
+
*/
|
|
535
|
+
Referrer: StorageDescriptor<[Key: SS58String], Anonymize<I9qpa0evftgoo5>, true, never>;
|
|
536
|
+
/**
|
|
537
|
+
* Asset fee distribution rewards information.
|
|
538
|
+
* Maps (asset_id, level) to asset reward percentages.
|
|
539
|
+
*/
|
|
540
|
+
AssetRewards: StorageDescriptor<Anonymize<I1stghsu756nk9>, Anonymize<I4qc61lpfqml75>, true, never>;
|
|
541
|
+
/**
|
|
542
|
+
* Information about assets that are currently in the rewards pot.
|
|
543
|
+
* Used to easily determine list of assets that need to be converted.
|
|
544
|
+
*/
|
|
545
|
+
PendingConversions: StorageDescriptor<[Key: number], null, true, never>;
|
|
546
|
+
/**
|
|
547
|
+
* Counter for the related counted storage map
|
|
548
|
+
*/
|
|
549
|
+
CounterForPendingConversions: StorageDescriptor<[], number, false, never>;
|
|
550
|
+
};
|
|
334
551
|
HSM: {
|
|
335
552
|
/**
|
|
336
553
|
* List of approved assets that Hollar can be purchased with
|
|
@@ -455,364 +672,2270 @@ type IStorage = {
|
|
|
455
672
|
};
|
|
456
673
|
};
|
|
457
674
|
type ICalls = {
|
|
458
|
-
|
|
675
|
+
MultiTransactionPayment: {
|
|
459
676
|
/**
|
|
460
|
-
|
|
677
|
+
* Set selected currency for given account.
|
|
678
|
+
*
|
|
679
|
+
* This allows to set a currency for an account in which all transaction fees will be paid.
|
|
680
|
+
* Account balance cannot be zero.
|
|
681
|
+
*
|
|
682
|
+
* In case of sufficient asset, the chosen currency must be in the list of accepted currencies
|
|
683
|
+
* In case of insufficient asset, the chosen currency must have a XYK pool with DOT
|
|
684
|
+
*
|
|
685
|
+
* When currency is set, fixed fee is withdrawn from the account to pay for the currency change
|
|
686
|
+
*
|
|
687
|
+
* EVM accounts are now allowed to change thier payment currency.
|
|
688
|
+
*
|
|
689
|
+
* Emits `CurrencySet` event when successful.
|
|
461
690
|
*/
|
|
462
|
-
|
|
691
|
+
set_currency: TxDescriptor<Anonymize<Ic1e6uvbf8ado3>>;
|
|
463
692
|
/**
|
|
464
|
-
|
|
693
|
+
* Add a currency to the list of accepted currencies.
|
|
694
|
+
*
|
|
695
|
+
* Only member can perform this action.
|
|
696
|
+
*
|
|
697
|
+
* Currency must not be already accepted. Core asset id cannot be explicitly added.
|
|
698
|
+
*
|
|
699
|
+
* Emits `CurrencyAdded` event when successful.
|
|
465
700
|
*/
|
|
466
|
-
|
|
701
|
+
add_currency: TxDescriptor<Anonymize<Ie7oqvfdar8r2>>;
|
|
467
702
|
/**
|
|
468
|
-
*
|
|
703
|
+
* Remove currency from the list of supported currencies
|
|
704
|
+
* Only selected members can perform this action
|
|
469
705
|
*
|
|
470
|
-
*
|
|
706
|
+
* Core asset cannot be removed.
|
|
471
707
|
*
|
|
472
|
-
*
|
|
473
|
-
* can be different.
|
|
708
|
+
* Emits `CurrencyRemoved` when successful.
|
|
474
709
|
*/
|
|
475
|
-
|
|
710
|
+
remove_currency: TxDescriptor<Anonymize<Ic1e6uvbf8ado3>>;
|
|
476
711
|
/**
|
|
477
|
-
*
|
|
712
|
+
* Reset currency of the specified account to HDX.
|
|
713
|
+
* If the account is EVM account, the payment currency is reset to WETH.
|
|
714
|
+
* Only selected members can perform this action.
|
|
478
715
|
*
|
|
479
|
-
*
|
|
480
|
-
* The extra gas is not refunded, even if not used.
|
|
716
|
+
* Emits `CurrencySet` when successful.
|
|
481
717
|
*/
|
|
482
|
-
|
|
718
|
+
reset_payment_currency: TxDescriptor<Anonymize<I6v8sm60vvkmk7>>;
|
|
483
719
|
/**
|
|
484
|
-
*
|
|
485
|
-
*
|
|
486
|
-
*
|
|
720
|
+
* Dispatch EVM permit.
|
|
721
|
+
* The main purpose of this function is to allow EVM accounts to pay for the transaction fee in non-native currency
|
|
722
|
+
* by allowing them to self-dispatch pre-signed permit.
|
|
723
|
+
* The EVM fee is paid in the currency set for the account.
|
|
724
|
+
*/
|
|
725
|
+
dispatch_permit: TxDescriptor<Anonymize<I92pum5p0t4pat>>;
|
|
726
|
+
};
|
|
727
|
+
Utility: {
|
|
728
|
+
/**
|
|
729
|
+
* Send a batch of dispatch calls.
|
|
487
730
|
*
|
|
488
|
-
*
|
|
489
|
-
* - `origin`: Signed origin.
|
|
490
|
-
* - `call`: presumably `pallet_evm::Call::call` as boxed `RuntimeCall`.
|
|
731
|
+
* May be called from any origin except `None`.
|
|
491
732
|
*
|
|
492
|
-
*
|
|
733
|
+
* - `calls`: The calls to be dispatched from the same origin. The number of call must not
|
|
734
|
+
* exceed the constant: `batched_calls_limit` (available in constant metadata).
|
|
735
|
+
*
|
|
736
|
+
* If origin is root then the calls are dispatched without checking origin filter. (This
|
|
737
|
+
* includes bypassing `frame_system::Config::BaseCallFilter`).
|
|
738
|
+
*
|
|
739
|
+
* ## Complexity
|
|
740
|
+
* - O(C) where C is the number of calls to be batched.
|
|
741
|
+
*
|
|
742
|
+
* This will return `Ok` in all circumstances. To determine the success of the batch, an
|
|
743
|
+
* event is deposited. If a call failed and the batch was interrupted, then the
|
|
744
|
+
* `BatchInterrupted` event is deposited, along with the number of successful calls made
|
|
745
|
+
* and the error of the failed call. If all were successful, then the `BatchCompleted`
|
|
746
|
+
* event is deposited.
|
|
493
747
|
*/
|
|
494
|
-
|
|
495
|
-
};
|
|
496
|
-
Omnipool: {
|
|
748
|
+
batch: TxDescriptor<Anonymize<I909ad06li5mlt>>;
|
|
497
749
|
/**
|
|
498
|
-
*
|
|
750
|
+
* Send a call through an indexed pseudonym of the sender.
|
|
499
751
|
*
|
|
500
|
-
*
|
|
752
|
+
* Filter from origin are passed along. The call will be dispatched with an origin which
|
|
753
|
+
* use the same filter as the origin of this call.
|
|
501
754
|
*
|
|
502
|
-
*
|
|
755
|
+
* NOTE: If you need to ensure that any account-based filtering is not honored (i.e.
|
|
756
|
+
* because you expect `proxy` to have been used prior in the call stack and you do not want
|
|
757
|
+
* the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`
|
|
758
|
+
* in the Multisig pallet instead.
|
|
503
759
|
*
|
|
504
|
-
*
|
|
760
|
+
* NOTE: Prior to version *12, this was called `as_limited_sub`.
|
|
505
761
|
*
|
|
506
|
-
*
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
*
|
|
762
|
+
* The dispatch origin for this call must be _Signed_.
|
|
763
|
+
*/
|
|
764
|
+
as_derivative: TxDescriptor<Anonymize<Id2vcln8l5js7v>>;
|
|
765
|
+
/**
|
|
766
|
+
* Send a batch of dispatch calls and atomically execute them.
|
|
767
|
+
* The whole transaction will rollback and fail if any of the calls failed.
|
|
511
768
|
*
|
|
512
|
-
*
|
|
769
|
+
* May be called from any origin except `None`.
|
|
770
|
+
*
|
|
771
|
+
* - `calls`: The calls to be dispatched from the same origin. The number of call must not
|
|
772
|
+
* exceed the constant: `batched_calls_limit` (available in constant metadata).
|
|
513
773
|
*
|
|
774
|
+
* If origin is root then the calls are dispatched without checking origin filter. (This
|
|
775
|
+
* includes bypassing `frame_system::Config::BaseCallFilter`).
|
|
776
|
+
*
|
|
777
|
+
* ## Complexity
|
|
778
|
+
* - O(C) where C is the number of calls to be batched.
|
|
514
779
|
*/
|
|
515
|
-
|
|
780
|
+
batch_all: TxDescriptor<Anonymize<I909ad06li5mlt>>;
|
|
516
781
|
/**
|
|
517
|
-
*
|
|
782
|
+
* Dispatches a function call with a provided origin.
|
|
518
783
|
*
|
|
519
|
-
*
|
|
520
|
-
* corresponding shares amount in form of NFT at current price.
|
|
784
|
+
* The dispatch origin for this call must be _Root_.
|
|
521
785
|
*
|
|
522
|
-
*
|
|
786
|
+
* ## Complexity
|
|
787
|
+
* - O(1).
|
|
788
|
+
*/
|
|
789
|
+
dispatch_as: TxDescriptor<Anonymize<Iapma14uhor1hk>>;
|
|
790
|
+
/**
|
|
791
|
+
* Send a batch of dispatch calls.
|
|
792
|
+
* Unlike `batch`, it allows errors and won't interrupt.
|
|
523
793
|
*
|
|
524
|
-
*
|
|
794
|
+
* May be called from any origin except `None`.
|
|
525
795
|
*
|
|
526
|
-
*
|
|
527
|
-
*
|
|
796
|
+
* - `calls`: The calls to be dispatched from the same origin. The number of call must not
|
|
797
|
+
* exceed the constant: `batched_calls_limit` (available in constant metadata).
|
|
528
798
|
*
|
|
529
|
-
*
|
|
799
|
+
* If origin is root then the calls are dispatch without checking origin filter. (This
|
|
800
|
+
* includes bypassing `frame_system::Config::BaseCallFilter`).
|
|
530
801
|
*
|
|
531
|
-
*
|
|
532
|
-
* -
|
|
533
|
-
|
|
802
|
+
* ## Complexity
|
|
803
|
+
* - O(C) where C is the number of calls to be batched.
|
|
804
|
+
*/
|
|
805
|
+
force_batch: TxDescriptor<Anonymize<I909ad06li5mlt>>;
|
|
806
|
+
/**
|
|
807
|
+
* Dispatch a function call with a specified weight.
|
|
534
808
|
*
|
|
535
|
-
*
|
|
809
|
+
* This function does not check the weight of the call, and instead allows the
|
|
810
|
+
* Root origin to specify the weight of the call.
|
|
536
811
|
*
|
|
812
|
+
* The dispatch origin for this call must be _Root_.
|
|
537
813
|
*/
|
|
538
|
-
|
|
814
|
+
with_weight: TxDescriptor<Anonymize<I3j76tu6k1ksql>>;
|
|
815
|
+
};
|
|
816
|
+
Democracy: {
|
|
539
817
|
/**
|
|
540
|
-
*
|
|
818
|
+
* Propose a sensitive action to be taken.
|
|
541
819
|
*
|
|
542
|
-
*
|
|
820
|
+
* The dispatch origin of this call must be _Signed_ and the sender must
|
|
821
|
+
* have funds to cover the deposit.
|
|
543
822
|
*
|
|
544
|
-
* `
|
|
545
|
-
*
|
|
823
|
+
* - `proposal_hash`: The hash of the proposal preimage.
|
|
824
|
+
* - `value`: The amount of deposit (must be at least `MinimumDeposit`).
|
|
546
825
|
*
|
|
547
|
-
*
|
|
826
|
+
* Emits `Proposed`.
|
|
827
|
+
*/
|
|
828
|
+
propose: TxDescriptor<Anonymize<I1moso5oagpiea>>;
|
|
829
|
+
/**
|
|
830
|
+
* Signals agreement with a particular proposal.
|
|
548
831
|
*
|
|
549
|
-
*
|
|
832
|
+
* The dispatch origin of this call must be _Signed_ and the sender
|
|
833
|
+
* must have funds to cover the deposit, equal to the original deposit.
|
|
550
834
|
*
|
|
551
|
-
*
|
|
552
|
-
|
|
835
|
+
* - `proposal`: The index of the proposal to second.
|
|
836
|
+
*/
|
|
837
|
+
second: TxDescriptor<Anonymize<Ibeb4n9vpjefp3>>;
|
|
838
|
+
/**
|
|
839
|
+
* Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;
|
|
840
|
+
* otherwise it is a vote to keep the status quo.
|
|
553
841
|
*
|
|
554
|
-
*
|
|
842
|
+
* The dispatch origin of this call must be _Signed_.
|
|
555
843
|
*
|
|
556
|
-
*
|
|
557
|
-
* - `
|
|
558
|
-
|
|
559
|
-
|
|
844
|
+
* - `ref_index`: The index of the referendum to vote for.
|
|
845
|
+
* - `vote`: The vote configuration.
|
|
846
|
+
*/
|
|
847
|
+
vote: TxDescriptor<Anonymize<Id7murq9s9fg6h>>;
|
|
848
|
+
/**
|
|
849
|
+
* Schedule an emergency cancellation of a referendum. Cannot happen twice to the same
|
|
850
|
+
* referendum.
|
|
560
851
|
*
|
|
561
|
-
*
|
|
852
|
+
* The dispatch origin of this call must be `CancellationOrigin`.
|
|
853
|
+
*
|
|
854
|
+
* -`ref_index`: The index of the referendum to cancel.
|
|
562
855
|
*
|
|
856
|
+
* Weight: `O(1)`.
|
|
563
857
|
*/
|
|
564
|
-
|
|
858
|
+
emergency_cancel: TxDescriptor<Anonymize<Ied9mja4bq7va8>>;
|
|
565
859
|
/**
|
|
566
|
-
*
|
|
860
|
+
* Schedule a referendum to be tabled once it is legal to schedule an external
|
|
861
|
+
* referendum.
|
|
567
862
|
*
|
|
568
|
-
*
|
|
863
|
+
* The dispatch origin of this call must be `ExternalOrigin`.
|
|
569
864
|
*
|
|
570
|
-
*
|
|
865
|
+
* - `proposal_hash`: The preimage hash of the proposal.
|
|
866
|
+
*/
|
|
867
|
+
external_propose: TxDescriptor<Anonymize<I4f7jul8ljs54r>>;
|
|
868
|
+
/**
|
|
869
|
+
* Schedule a majority-carries referendum to be tabled next once it is legal to schedule
|
|
870
|
+
* an external referendum.
|
|
571
871
|
*
|
|
572
|
-
*
|
|
872
|
+
* The dispatch of this call must be `ExternalMajorityOrigin`.
|
|
573
873
|
*
|
|
574
|
-
*
|
|
874
|
+
* - `proposal_hash`: The preimage hash of the proposal.
|
|
575
875
|
*
|
|
576
|
-
*
|
|
577
|
-
*
|
|
876
|
+
* Unlike `external_propose`, blacklisting has no effect on this and it may replace a
|
|
877
|
+
* pre-scheduled `external_propose` call.
|
|
578
878
|
*
|
|
579
|
-
*
|
|
580
|
-
|
|
581
|
-
|
|
879
|
+
* Weight: `O(1)`
|
|
880
|
+
*/
|
|
881
|
+
external_propose_majority: TxDescriptor<Anonymize<I4f7jul8ljs54r>>;
|
|
882
|
+
/**
|
|
883
|
+
* Schedule a negative-turnout-bias referendum to be tabled next once it is legal to
|
|
884
|
+
* schedule an external referendum.
|
|
582
885
|
*
|
|
583
|
-
*
|
|
886
|
+
* The dispatch of this call must be `ExternalDefaultOrigin`.
|
|
584
887
|
*
|
|
888
|
+
* - `proposal_hash`: The preimage hash of the proposal.
|
|
889
|
+
*
|
|
890
|
+
* Unlike `external_propose`, blacklisting has no effect on this and it may replace a
|
|
891
|
+
* pre-scheduled `external_propose` call.
|
|
892
|
+
*
|
|
893
|
+
* Weight: `O(1)`
|
|
585
894
|
*/
|
|
586
|
-
|
|
895
|
+
external_propose_default: TxDescriptor<Anonymize<I4f7jul8ljs54r>>;
|
|
587
896
|
/**
|
|
588
|
-
*
|
|
897
|
+
* Schedule the currently externally-proposed majority-carries referendum to be tabled
|
|
898
|
+
* immediately. If there is no externally-proposed referendum currently, or if there is one
|
|
899
|
+
* but it is not a majority-carries referendum then it fails.
|
|
589
900
|
*
|
|
590
|
-
*
|
|
901
|
+
* The dispatch of this call must be `FastTrackOrigin`.
|
|
591
902
|
*
|
|
592
|
-
* `
|
|
903
|
+
* - `proposal_hash`: The hash of the current external proposal.
|
|
904
|
+
* - `voting_period`: The period that is allowed for voting on this proposal. Increased to
|
|
905
|
+
* Must be always greater than zero.
|
|
906
|
+
* For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.
|
|
907
|
+
* - `delay`: The number of block after voting has ended in approval and this should be
|
|
908
|
+
* enacted. This doesn't have a minimum amount.
|
|
593
909
|
*
|
|
594
|
-
*
|
|
910
|
+
* Emits `Started`.
|
|
595
911
|
*
|
|
596
|
-
*
|
|
912
|
+
* Weight: `O(1)`
|
|
913
|
+
*/
|
|
914
|
+
fast_track: TxDescriptor<Anonymize<I5agg650597e49>>;
|
|
915
|
+
/**
|
|
916
|
+
* Veto and blacklist the external proposal hash.
|
|
597
917
|
*
|
|
598
|
-
*
|
|
918
|
+
* The dispatch origin of this call must be `VetoOrigin`.
|
|
599
919
|
*
|
|
600
|
-
*
|
|
601
|
-
* Withdrawal is considered safe when trading is disabled.
|
|
920
|
+
* - `proposal_hash`: The preimage hash of the proposal to veto and blacklist.
|
|
602
921
|
*
|
|
603
|
-
*
|
|
604
|
-
* - `position_id`: The identifier of position which liquidity is removed from.
|
|
605
|
-
* - `amount`: Amount of shares removed from omnipool
|
|
606
|
-
* - `min_limit`: The min amount of asset to be removed for the user
|
|
922
|
+
* Emits `Vetoed`.
|
|
607
923
|
*
|
|
608
|
-
*
|
|
924
|
+
* Weight: `O(V + log(V))` where V is number of `existing vetoers`
|
|
925
|
+
*/
|
|
926
|
+
veto_external: TxDescriptor<Anonymize<I2ev73t79f46tb>>;
|
|
927
|
+
/**
|
|
928
|
+
* Remove a referendum.
|
|
609
929
|
*
|
|
930
|
+
* The dispatch origin of this call must be _Root_.
|
|
931
|
+
*
|
|
932
|
+
* - `ref_index`: The index of the referendum to cancel.
|
|
933
|
+
*
|
|
934
|
+
* # Weight: `O(1)`.
|
|
610
935
|
*/
|
|
611
|
-
|
|
936
|
+
cancel_referendum: TxDescriptor<Anonymize<Ied9mja4bq7va8>>;
|
|
612
937
|
/**
|
|
613
|
-
*
|
|
938
|
+
* Delegate the voting power (with some given conviction) of the sending account.
|
|
614
939
|
*
|
|
615
|
-
*
|
|
940
|
+
* The balance delegated is locked for as long as it's delegated, and thereafter for the
|
|
941
|
+
* time appropriate for the conviction's lock period.
|
|
942
|
+
*
|
|
943
|
+
* The dispatch origin of this call must be _Signed_, and the signing account must either:
|
|
944
|
+
* - be delegating already; or
|
|
945
|
+
* - have no voting activity (if there is, then it will need to be removed/consolidated
|
|
946
|
+
* through `reap_vote` or `unvote`).
|
|
947
|
+
*
|
|
948
|
+
* - `to`: The account whose voting the `target` account's voting power will follow.
|
|
949
|
+
* - `conviction`: The conviction that will be attached to the delegated votes. When the
|
|
950
|
+
* account is undelegated, the funds will be locked for the corresponding period.
|
|
951
|
+
* - `balance`: The amount of the account's balance to be used in delegating. This must not
|
|
952
|
+
* be more than the account's current balance.
|
|
953
|
+
*
|
|
954
|
+
* Emits `Delegated`.
|
|
955
|
+
*
|
|
956
|
+
* Weight: `O(R)` where R is the number of referendums the voter delegating to has
|
|
957
|
+
* voted on. Weight is charged as if maximum votes.
|
|
958
|
+
*/
|
|
959
|
+
delegate: TxDescriptor<Anonymize<Iab64mce6q91i>>;
|
|
960
|
+
/**
|
|
961
|
+
* Undelegate the voting power of the sending account.
|
|
962
|
+
*
|
|
963
|
+
* Tokens may be unlocked following once an amount of time consistent with the lock period
|
|
964
|
+
* of the conviction with which the delegation was issued.
|
|
965
|
+
*
|
|
966
|
+
* The dispatch origin of this call must be _Signed_ and the signing account must be
|
|
967
|
+
* currently delegating.
|
|
968
|
+
*
|
|
969
|
+
* Emits `Undelegated`.
|
|
970
|
+
*
|
|
971
|
+
* Weight: `O(R)` where R is the number of referendums the voter delegating to has
|
|
972
|
+
* voted on. Weight is charged as if maximum votes.
|
|
973
|
+
*/
|
|
974
|
+
undelegate: TxDescriptor<undefined>;
|
|
975
|
+
/**
|
|
976
|
+
* Clears all public proposals.
|
|
977
|
+
*
|
|
978
|
+
* The dispatch origin of this call must be _Root_.
|
|
979
|
+
*
|
|
980
|
+
* Weight: `O(1)`.
|
|
981
|
+
*/
|
|
982
|
+
clear_public_proposals: TxDescriptor<undefined>;
|
|
983
|
+
/**
|
|
984
|
+
* Unlock tokens that have an expired lock.
|
|
985
|
+
*
|
|
986
|
+
* The dispatch origin of this call must be _Signed_.
|
|
987
|
+
*
|
|
988
|
+
* - `target`: The account to remove the lock on.
|
|
989
|
+
*
|
|
990
|
+
* Weight: `O(R)` with R number of vote of target.
|
|
991
|
+
*/
|
|
992
|
+
unlock: TxDescriptor<Anonymize<I14p0q0qs0fqbj>>;
|
|
993
|
+
/**
|
|
994
|
+
* Remove a vote for a referendum.
|
|
995
|
+
*
|
|
996
|
+
* If:
|
|
997
|
+
* - the referendum was cancelled, or
|
|
998
|
+
* - the referendum is ongoing, or
|
|
999
|
+
* - the referendum has ended such that
|
|
1000
|
+
* - the vote of the account was in opposition to the result; or
|
|
1001
|
+
* - there was no conviction to the account's vote; or
|
|
1002
|
+
* - the account made a split vote
|
|
1003
|
+
* ...then the vote is removed cleanly and a following call to `unlock` may result in more
|
|
1004
|
+
* funds being available.
|
|
1005
|
+
*
|
|
1006
|
+
* If, however, the referendum has ended and:
|
|
1007
|
+
* - it finished corresponding to the vote of the account, and
|
|
1008
|
+
* - the account made a standard vote with conviction, and
|
|
1009
|
+
* - the lock period of the conviction is not over
|
|
1010
|
+
* ...then the lock will be aggregated into the overall account's lock, which may involve
|
|
1011
|
+
* *overlocking* (where the two locks are combined into a single lock that is the maximum
|
|
1012
|
+
* of both the amount locked and the time is it locked for).
|
|
1013
|
+
*
|
|
1014
|
+
* The dispatch origin of this call must be _Signed_, and the signer must have a vote
|
|
1015
|
+
* registered for referendum `index`.
|
|
1016
|
+
*
|
|
1017
|
+
* - `index`: The index of referendum of the vote to be removed.
|
|
1018
|
+
*
|
|
1019
|
+
* Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.
|
|
1020
|
+
* Weight is calculated for the maximum number of vote.
|
|
1021
|
+
*/
|
|
1022
|
+
remove_vote: TxDescriptor<Anonymize<I666bl2fqjkejo>>;
|
|
1023
|
+
/**
|
|
1024
|
+
* Remove a vote for a referendum.
|
|
1025
|
+
*
|
|
1026
|
+
* If the `target` is equal to the signer, then this function is exactly equivalent to
|
|
1027
|
+
* `remove_vote`. If not equal to the signer, then the vote must have expired,
|
|
1028
|
+
* either because the referendum was cancelled, because the voter lost the referendum or
|
|
1029
|
+
* because the conviction period is over.
|
|
1030
|
+
*
|
|
1031
|
+
* The dispatch origin of this call must be _Signed_.
|
|
1032
|
+
*
|
|
1033
|
+
* - `target`: The account of the vote to be removed; this account must have voted for
|
|
1034
|
+
* referendum `index`.
|
|
1035
|
+
* - `index`: The index of referendum of the vote to be removed.
|
|
1036
|
+
*
|
|
1037
|
+
* Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.
|
|
1038
|
+
* Weight is calculated for the maximum number of vote.
|
|
1039
|
+
*/
|
|
1040
|
+
remove_other_vote: TxDescriptor<Anonymize<I7ji3jng252el9>>;
|
|
1041
|
+
/**
|
|
1042
|
+
* Permanently place a proposal into the blacklist. This prevents it from ever being
|
|
1043
|
+
* proposed again.
|
|
1044
|
+
*
|
|
1045
|
+
* If called on a queued public or external proposal, then this will result in it being
|
|
1046
|
+
* removed. If the `ref_index` supplied is an active referendum with the proposal hash,
|
|
1047
|
+
* then it will be cancelled.
|
|
1048
|
+
*
|
|
1049
|
+
* The dispatch origin of this call must be `BlacklistOrigin`.
|
|
1050
|
+
*
|
|
1051
|
+
* - `proposal_hash`: The proposal hash to blacklist permanently.
|
|
1052
|
+
* - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be
|
|
1053
|
+
* cancelled.
|
|
1054
|
+
*
|
|
1055
|
+
* Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a
|
|
1056
|
+
* reasonable value).
|
|
1057
|
+
*/
|
|
1058
|
+
blacklist: TxDescriptor<Anonymize<I3v9h9f3mpm1l8>>;
|
|
1059
|
+
/**
|
|
1060
|
+
* Remove a proposal.
|
|
1061
|
+
*
|
|
1062
|
+
* The dispatch origin of this call must be `CancelProposalOrigin`.
|
|
1063
|
+
*
|
|
1064
|
+
* - `prop_index`: The index of the proposal to cancel.
|
|
1065
|
+
*
|
|
1066
|
+
* Weight: `O(p)` where `p = PublicProps::<T>::decode_len()`
|
|
1067
|
+
*/
|
|
1068
|
+
cancel_proposal: TxDescriptor<Anonymize<I9mnj4k4u8ls2c>>;
|
|
1069
|
+
/**
|
|
1070
|
+
* Set or clear a metadata of a proposal or a referendum.
|
|
1071
|
+
*
|
|
1072
|
+
* Parameters:
|
|
1073
|
+
* - `origin`: Must correspond to the `MetadataOwner`.
|
|
1074
|
+
* - `ExternalOrigin` for an external proposal with the `SuperMajorityApprove`
|
|
1075
|
+
* threshold.
|
|
1076
|
+
* - `ExternalDefaultOrigin` for an external proposal with the `SuperMajorityAgainst`
|
|
1077
|
+
* threshold.
|
|
1078
|
+
* - `ExternalMajorityOrigin` for an external proposal with the `SimpleMajority`
|
|
1079
|
+
* threshold.
|
|
1080
|
+
* - `Signed` by a creator for a public proposal.
|
|
1081
|
+
* - `Signed` to clear a metadata for a finished referendum.
|
|
1082
|
+
* - `Root` to set a metadata for an ongoing referendum.
|
|
1083
|
+
* - `owner`: an identifier of a metadata owner.
|
|
1084
|
+
* - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata.
|
|
1085
|
+
*/
|
|
1086
|
+
set_metadata: TxDescriptor<Anonymize<I2kt2u1flctk2q>>;
|
|
1087
|
+
/**
|
|
1088
|
+
* Allow to force remove a vote for a referendum.
|
|
1089
|
+
*
|
|
1090
|
+
* Same as `remove_other_vote`, except the scope is overriden by forced flag.
|
|
1091
|
+
* The dispatch origin of this call must be `VoteRemovalOrigin`.
|
|
1092
|
+
*
|
|
1093
|
+
* Only allowed if the referendum is finished.
|
|
1094
|
+
*
|
|
1095
|
+
* The dispatch origin of this call must be _Signed_.
|
|
1096
|
+
*
|
|
1097
|
+
* - `target`: The account of the vote to be removed; this account must have voted for
|
|
1098
|
+
* referendum `index`.
|
|
1099
|
+
* - `index`: The index of referendum of the vote to be removed.
|
|
1100
|
+
*
|
|
1101
|
+
* Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.
|
|
1102
|
+
* Weight is calculated for the maximum number of vote.
|
|
1103
|
+
*/
|
|
1104
|
+
force_remove_vote: TxDescriptor<Anonymize<I7ji3jng252el9>>;
|
|
1105
|
+
};
|
|
1106
|
+
ConvictionVoting: {
|
|
1107
|
+
/**
|
|
1108
|
+
* Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;
|
|
1109
|
+
* otherwise it is a vote to keep the status quo.
|
|
1110
|
+
*
|
|
1111
|
+
* The dispatch origin of this call must be _Signed_.
|
|
1112
|
+
*
|
|
1113
|
+
* - `poll_index`: The index of the poll to vote for.
|
|
1114
|
+
* - `vote`: The vote configuration.
|
|
1115
|
+
*
|
|
1116
|
+
* Weight: `O(R)` where R is the number of polls the voter has voted on.
|
|
1117
|
+
*/
|
|
1118
|
+
vote: TxDescriptor<Anonymize<Idnsr2pndm36h0>>;
|
|
1119
|
+
/**
|
|
1120
|
+
* Delegate the voting power (with some given conviction) of the sending account for a
|
|
1121
|
+
* particular class of polls.
|
|
1122
|
+
*
|
|
1123
|
+
* The balance delegated is locked for as long as it's delegated, and thereafter for the
|
|
1124
|
+
* time appropriate for the conviction's lock period.
|
|
1125
|
+
*
|
|
1126
|
+
* The dispatch origin of this call must be _Signed_, and the signing account must either:
|
|
1127
|
+
* - be delegating already; or
|
|
1128
|
+
* - have no voting activity (if there is, then it will need to be removed through
|
|
1129
|
+
* `remove_vote`).
|
|
1130
|
+
*
|
|
1131
|
+
* - `to`: The account whose voting the `target` account's voting power will follow.
|
|
1132
|
+
* - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls
|
|
1133
|
+
* to this function are required.
|
|
1134
|
+
* - `conviction`: The conviction that will be attached to the delegated votes. When the
|
|
1135
|
+
* account is undelegated, the funds will be locked for the corresponding period.
|
|
1136
|
+
* - `balance`: The amount of the account's balance to be used in delegating. This must not
|
|
1137
|
+
* be more than the account's current balance.
|
|
1138
|
+
*
|
|
1139
|
+
* Emits `Delegated`.
|
|
1140
|
+
*
|
|
1141
|
+
* Weight: `O(R)` where R is the number of polls the voter delegating to has
|
|
1142
|
+
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
|
|
1143
|
+
*/
|
|
1144
|
+
delegate: TxDescriptor<Anonymize<Itcpv4hqecjfj>>;
|
|
1145
|
+
/**
|
|
1146
|
+
* Undelegate the voting power of the sending account for a particular class of polls.
|
|
1147
|
+
*
|
|
1148
|
+
* Tokens may be unlocked following once an amount of time consistent with the lock period
|
|
1149
|
+
* of the conviction with which the delegation was issued has passed.
|
|
1150
|
+
*
|
|
1151
|
+
* The dispatch origin of this call must be _Signed_ and the signing account must be
|
|
1152
|
+
* currently delegating.
|
|
1153
|
+
*
|
|
1154
|
+
* - `class`: The class of polls to remove the delegation from.
|
|
1155
|
+
*
|
|
1156
|
+
* Emits `Undelegated`.
|
|
1157
|
+
*
|
|
1158
|
+
* Weight: `O(R)` where R is the number of polls the voter delegating to has
|
|
1159
|
+
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
|
|
1160
|
+
*/
|
|
1161
|
+
undelegate: TxDescriptor<Anonymize<I8steo882k7qns>>;
|
|
1162
|
+
/**
|
|
1163
|
+
* Remove the lock caused by prior voting/delegating which has expired within a particular
|
|
1164
|
+
* class.
|
|
1165
|
+
*
|
|
1166
|
+
* The dispatch origin of this call must be _Signed_.
|
|
1167
|
+
*
|
|
1168
|
+
* - `class`: The class of polls to unlock.
|
|
1169
|
+
* - `target`: The account to remove the lock on.
|
|
1170
|
+
*
|
|
1171
|
+
* Weight: `O(R)` with R number of vote of target.
|
|
1172
|
+
*/
|
|
1173
|
+
unlock: TxDescriptor<Anonymize<I9qtj66dgng975>>;
|
|
1174
|
+
/**
|
|
1175
|
+
* Remove a vote for a poll.
|
|
1176
|
+
*
|
|
1177
|
+
* If:
|
|
1178
|
+
* - the poll was cancelled, or
|
|
1179
|
+
* - the poll is ongoing, or
|
|
1180
|
+
* - the poll has ended such that
|
|
1181
|
+
* - the vote of the account was in opposition to the result; or
|
|
1182
|
+
* - there was no conviction to the account's vote; or
|
|
1183
|
+
* - the account made a split vote
|
|
1184
|
+
* ...then the vote is removed cleanly and a following call to `unlock` may result in more
|
|
1185
|
+
* funds being available.
|
|
1186
|
+
*
|
|
1187
|
+
* If, however, the poll has ended and:
|
|
1188
|
+
* - it finished corresponding to the vote of the account, and
|
|
1189
|
+
* - the account made a standard vote with conviction, and
|
|
1190
|
+
* - the lock period of the conviction is not over
|
|
1191
|
+
* ...then the lock will be aggregated into the overall account's lock, which may involve
|
|
1192
|
+
* *overlocking* (where the two locks are combined into a single lock that is the maximum
|
|
1193
|
+
* of both the amount locked and the time is it locked for).
|
|
1194
|
+
*
|
|
1195
|
+
* The dispatch origin of this call must be _Signed_, and the signer must have a vote
|
|
1196
|
+
* registered for poll `index`.
|
|
1197
|
+
*
|
|
1198
|
+
* - `index`: The index of poll of the vote to be removed.
|
|
1199
|
+
* - `class`: Optional parameter, if given it indicates the class of the poll. For polls
|
|
1200
|
+
* which have finished or are cancelled, this must be `Some`.
|
|
1201
|
+
*
|
|
1202
|
+
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
|
|
1203
|
+
* Weight is calculated for the maximum number of vote.
|
|
1204
|
+
*/
|
|
1205
|
+
remove_vote: TxDescriptor<Anonymize<I5f178ab6b89t3>>;
|
|
1206
|
+
/**
|
|
1207
|
+
* Remove a vote for a poll.
|
|
1208
|
+
*
|
|
1209
|
+
* If the `target` is equal to the signer, then this function is exactly equivalent to
|
|
1210
|
+
* `remove_vote`. If not equal to the signer, then the vote must have expired,
|
|
1211
|
+
* either because the poll was cancelled, because the voter lost the poll or
|
|
1212
|
+
* because the conviction period is over.
|
|
1213
|
+
*
|
|
1214
|
+
* The dispatch origin of this call must be _Signed_.
|
|
1215
|
+
*
|
|
1216
|
+
* - `target`: The account of the vote to be removed; this account must have voted for poll
|
|
1217
|
+
* `index`.
|
|
1218
|
+
* - `index`: The index of poll of the vote to be removed.
|
|
1219
|
+
* - `class`: The class of the poll.
|
|
1220
|
+
*
|
|
1221
|
+
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
|
|
1222
|
+
* Weight is calculated for the maximum number of vote.
|
|
1223
|
+
*/
|
|
1224
|
+
remove_other_vote: TxDescriptor<Anonymize<Iduerupfbc8ruc>>;
|
|
1225
|
+
/**
|
|
1226
|
+
* Allow to force remove a vote for a referendum.
|
|
1227
|
+
*
|
|
1228
|
+
* The dispatch origin of this call must be `VoteRemovalOrigin`.
|
|
1229
|
+
*
|
|
1230
|
+
* Only allowed if the referendum is finished.
|
|
1231
|
+
*
|
|
1232
|
+
* The dispatch origin of this call must be _Signed_.
|
|
1233
|
+
*
|
|
1234
|
+
* - `target`: The account of the vote to be removed; this account must have voted for
|
|
1235
|
+
* referendum `index`.
|
|
1236
|
+
* - `index`: The index of referendum of the vote to be removed.
|
|
1237
|
+
*
|
|
1238
|
+
* Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.
|
|
1239
|
+
* Weight is calculated for the maximum number of vote.
|
|
1240
|
+
*/
|
|
1241
|
+
force_remove_vote: TxDescriptor<Anonymize<Iduerupfbc8ruc>>;
|
|
1242
|
+
};
|
|
1243
|
+
Dispatcher: {
|
|
1244
|
+
/**
|
|
1245
|
+
|
|
1246
|
+
*/
|
|
1247
|
+
dispatch_as_treasury: TxDescriptor<Anonymize<I3btog7m617l6b>>;
|
|
1248
|
+
/**
|
|
1249
|
+
|
|
1250
|
+
*/
|
|
1251
|
+
dispatch_as_aave_manager: TxDescriptor<Anonymize<I3btog7m617l6b>>;
|
|
1252
|
+
/**
|
|
1253
|
+
* Sets the Aave manager account to be used as origin for dispatching calls.
|
|
1254
|
+
*
|
|
1255
|
+
* This doesn't actually changes any ACL in the pool.
|
|
1256
|
+
*
|
|
1257
|
+
* This is intented to be mainly used in testnet environments, where the manager account
|
|
1258
|
+
* can be different.
|
|
1259
|
+
*/
|
|
1260
|
+
note_aave_manager: TxDescriptor<Anonymize<Icbccs0ug47ilf>>;
|
|
1261
|
+
/**
|
|
1262
|
+
* Dispatch a call with extra gas.
|
|
1263
|
+
*
|
|
1264
|
+
* This allows executing calls with additional weight (gas) limit.
|
|
1265
|
+
* The extra gas is not refunded, even if not used.
|
|
1266
|
+
*/
|
|
1267
|
+
dispatch_with_extra_gas: TxDescriptor<Anonymize<Ivm3oem3tagcb>>;
|
|
1268
|
+
/**
|
|
1269
|
+
* Execute a single EVM call.
|
|
1270
|
+
* This extrinsic will fail if the EVM call returns any other ExitReason than `ExitSucceed(Returned)` or `ExitSucceed(Stopped)`.
|
|
1271
|
+
* Look the [hydradx_runtime::evm::runner::WrapRunner] implementation for details.
|
|
1272
|
+
*
|
|
1273
|
+
* Parameters:
|
|
1274
|
+
* - `origin`: Signed origin.
|
|
1275
|
+
* - `call`: presumably `pallet_evm::Call::call` as boxed `RuntimeCall`.
|
|
1276
|
+
*
|
|
1277
|
+
* Emits `EvmCallFailed` event when failed.
|
|
1278
|
+
*/
|
|
1279
|
+
dispatch_evm_call: TxDescriptor<Anonymize<I3btog7m617l6b>>;
|
|
1280
|
+
};
|
|
1281
|
+
Omnipool: {
|
|
1282
|
+
/**
|
|
1283
|
+
* Add new token to omnipool in quantity `amount` at price `initial_price`
|
|
1284
|
+
*
|
|
1285
|
+
* Initial liquidity must be transferred to pool's account for this new token manually prior to calling `add_token`.
|
|
1286
|
+
*
|
|
1287
|
+
* Initial liquidity is pool's account balance of the token.
|
|
1288
|
+
*
|
|
1289
|
+
* Position NFT token is minted for `position_owner`.
|
|
1290
|
+
*
|
|
1291
|
+
* Parameters:
|
|
1292
|
+
* - `asset`: The identifier of the new asset added to the pool. Must be registered in Asset registry
|
|
1293
|
+
* - `initial_price`: Initial price
|
|
1294
|
+
* - `position_owner`: account id for which share are distributed in form on NFT
|
|
1295
|
+
* - `weight_cap`: asset weight cap
|
|
1296
|
+
*
|
|
1297
|
+
* Emits `TokenAdded` event when successful.
|
|
1298
|
+
*
|
|
1299
|
+
*/
|
|
1300
|
+
add_token: TxDescriptor<Anonymize<Ida2ijjar0n0j3>>;
|
|
1301
|
+
/**
|
|
1302
|
+
* Add liquidity of asset `asset` in quantity `amount` to Omnipool
|
|
1303
|
+
*
|
|
1304
|
+
* `add_liquidity` adds specified asset amount to Omnipool and in exchange gives the origin
|
|
1305
|
+
* corresponding shares amount in form of NFT at current price.
|
|
1306
|
+
*
|
|
1307
|
+
* Asset's tradable state must contain ADD_LIQUIDITY flag, otherwise `NotAllowed` error is returned.
|
|
1308
|
+
*
|
|
1309
|
+
* NFT is minted using NTFHandler which implements non-fungibles traits from frame_support.
|
|
1310
|
+
*
|
|
1311
|
+
* Asset weight cap must be respected, otherwise `AssetWeightExceeded` error is returned.
|
|
1312
|
+
* Asset weight is ratio between new HubAsset reserve and total reserve of Hub asset in Omnipool.
|
|
1313
|
+
*
|
|
1314
|
+
* Add liquidity fails if price difference between spot price and oracle price is higher than allowed by `PriceBarrier`.
|
|
1315
|
+
*
|
|
1316
|
+
* Parameters:
|
|
1317
|
+
* - `asset`: The identifier of the new asset added to the pool. Must be already in the pool
|
|
1318
|
+
* - `amount`: Amount of asset added to omnipool
|
|
1319
|
+
*
|
|
1320
|
+
* Emits `LiquidityAdded` event when successful.
|
|
1321
|
+
*
|
|
1322
|
+
*/
|
|
1323
|
+
add_liquidity: TxDescriptor<Anonymize<Ing3etrevsfg0>>;
|
|
1324
|
+
/**
|
|
1325
|
+
* Add liquidity of asset `asset` in quantity `amount` to Omnipool.
|
|
1326
|
+
*
|
|
1327
|
+
* Limit protection is applied.
|
|
1328
|
+
*
|
|
1329
|
+
* `add_liquidity` adds specified asset amount to Omnipool and in exchange gives the origin
|
|
1330
|
+
* corresponding shares amount in form of NFT at current price.
|
|
1331
|
+
*
|
|
1332
|
+
* Asset's tradable state must contain ADD_LIQUIDITY flag, otherwise `NotAllowed` error is returned.
|
|
1333
|
+
*
|
|
1334
|
+
* NFT is minted using NTFHandler which implements non-fungibles traits from frame_support.
|
|
1335
|
+
*
|
|
1336
|
+
* Asset weight cap must be respected, otherwise `AssetWeightExceeded` error is returned.
|
|
1337
|
+
* Asset weight is ratio between new HubAsset reserve and total reserve of Hub asset in Omnipool.
|
|
1338
|
+
*
|
|
1339
|
+
* Add liquidity fails if price difference between spot price and oracle price is higher than allowed by `PriceBarrier`.
|
|
1340
|
+
*
|
|
1341
|
+
* Parameters:
|
|
1342
|
+
* - `asset`: The identifier of the new asset added to the pool. Must be already in the pool
|
|
1343
|
+
* - `amount`: Amount of asset added to omnipool
|
|
1344
|
+
* - `min_shares_limit`: The min amount of delta share asset the user should receive in the position
|
|
1345
|
+
*
|
|
1346
|
+
* Emits `LiquidityAdded` event when successful.
|
|
1347
|
+
*
|
|
1348
|
+
*/
|
|
1349
|
+
add_liquidity_with_limit: TxDescriptor<Anonymize<Ietsl92b11kilg>>;
|
|
1350
|
+
/**
|
|
1351
|
+
* Remove liquidity of asset `asset` in quantity `amount` from Omnipool
|
|
1352
|
+
*
|
|
1353
|
+
* `remove_liquidity` removes specified shares amount from given PositionId (NFT instance).
|
|
1354
|
+
*
|
|
1355
|
+
* Asset's tradable state must contain REMOVE_LIQUIDITY flag, otherwise `NotAllowed` error is returned.
|
|
1356
|
+
*
|
|
1357
|
+
* if all shares from given position are removed, position is destroyed and NFT is burned.
|
|
1358
|
+
*
|
|
1359
|
+
* Remove liquidity fails if price difference between spot price and oracle price is higher than allowed by `PriceBarrier`.
|
|
1360
|
+
*
|
|
1361
|
+
* Dynamic withdrawal fee is applied if withdrawal is not safe. It is calculated using spot price and external price oracle.
|
|
1362
|
+
* Withdrawal is considered safe when trading is disabled.
|
|
1363
|
+
*
|
|
1364
|
+
* Parameters:
|
|
1365
|
+
* - `position_id`: The identifier of position which liquidity is removed from.
|
|
1366
|
+
* - `amount`: Amount of shares removed from omnipool
|
|
1367
|
+
*
|
|
1368
|
+
* Emits `LiquidityRemoved` event when successful.
|
|
1369
|
+
*
|
|
1370
|
+
*/
|
|
1371
|
+
remove_liquidity: TxDescriptor<Anonymize<Icqdi7b9m95ug3>>;
|
|
1372
|
+
/**
|
|
1373
|
+
* Remove liquidity of asset `asset` in quantity `amount` from Omnipool
|
|
1374
|
+
*
|
|
1375
|
+
* Limit protection is applied.
|
|
1376
|
+
*
|
|
1377
|
+
* `remove_liquidity` removes specified shares amount from given PositionId (NFT instance).
|
|
1378
|
+
*
|
|
1379
|
+
* Asset's tradable state must contain REMOVE_LIQUIDITY flag, otherwise `NotAllowed` error is returned.
|
|
1380
|
+
*
|
|
1381
|
+
* if all shares from given position are removed, position is destroyed and NFT is burned.
|
|
1382
|
+
*
|
|
1383
|
+
* Remove liquidity fails if price difference between spot price and oracle price is higher than allowed by `PriceBarrier`.
|
|
1384
|
+
*
|
|
1385
|
+
* Dynamic withdrawal fee is applied if withdrawal is not safe. It is calculated using spot price and external price oracle.
|
|
1386
|
+
* Withdrawal is considered safe when trading is disabled.
|
|
1387
|
+
*
|
|
1388
|
+
* Parameters:
|
|
1389
|
+
* - `position_id`: The identifier of position which liquidity is removed from.
|
|
1390
|
+
* - `amount`: Amount of shares removed from omnipool
|
|
1391
|
+
* - `min_limit`: The min amount of asset to be removed for the user
|
|
1392
|
+
*
|
|
1393
|
+
* Emits `LiquidityRemoved` event when successful.
|
|
1394
|
+
*
|
|
1395
|
+
*/
|
|
1396
|
+
remove_liquidity_with_limit: TxDescriptor<Anonymize<Ieuqv44kptstcs>>;
|
|
1397
|
+
/**
|
|
1398
|
+
* Sacrifice LP position in favor of pool.
|
|
1399
|
+
*
|
|
1400
|
+
* A position is destroyed and liquidity owned by LP becomes pool owned liquidity.
|
|
1401
|
+
*
|
|
1402
|
+
* Only owner of position can perform this action.
|
|
1403
|
+
*
|
|
1404
|
+
* Emits `PositionDestroyed`.
|
|
1405
|
+
*/
|
|
1406
|
+
sacrifice_position: TxDescriptor<Anonymize<I6vhvcln14dp4d>>;
|
|
1407
|
+
/**
|
|
1408
|
+
* Execute a swap of `asset_in` for `asset_out`.
|
|
1409
|
+
*
|
|
1410
|
+
* Price is determined by the Omnipool.
|
|
1411
|
+
*
|
|
1412
|
+
* Hub asset is traded separately.
|
|
1413
|
+
*
|
|
1414
|
+
* Asset's tradable states must contain SELL flag for asset_in and BUY flag for asset_out, otherwise `NotAllowed` error is returned.
|
|
1415
|
+
*
|
|
1416
|
+
* Parameters:
|
|
1417
|
+
* - `asset_in`: ID of asset sold to the pool
|
|
1418
|
+
* - `asset_out`: ID of asset bought from the pool
|
|
1419
|
+
* - `amount`: Amount of asset sold
|
|
1420
|
+
* - `min_buy_amount`: Minimum amount required to receive
|
|
1421
|
+
*
|
|
1422
|
+
* Emits `SellExecuted` event when successful. Deprecated.
|
|
1423
|
+
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
1424
|
+
*
|
|
1425
|
+
*/
|
|
1426
|
+
sell: TxDescriptor<Anonymize<Ievca65alkkho9>>;
|
|
1427
|
+
/**
|
|
1428
|
+
* Execute a swap of `asset_out` for `asset_in`.
|
|
1429
|
+
*
|
|
1430
|
+
* Price is determined by the Omnipool.
|
|
1431
|
+
*
|
|
1432
|
+
* Hub asset is traded separately.
|
|
1433
|
+
*
|
|
1434
|
+
* Asset's tradable states must contain SELL flag for asset_in and BUY flag for asset_out, otherwise `NotAllowed` error is returned.
|
|
1435
|
+
*
|
|
1436
|
+
* Parameters:
|
|
1437
|
+
* - `asset_in`: ID of asset sold to the pool
|
|
1438
|
+
* - `asset_out`: ID of asset bought from the pool
|
|
1439
|
+
* - `amount`: Amount of asset sold
|
|
1440
|
+
* - `max_sell_amount`: Maximum amount to be sold.
|
|
1441
|
+
*
|
|
1442
|
+
* Emits `BuyExecuted` event when successful. Deprecated.
|
|
1443
|
+
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
1444
|
+
*
|
|
1445
|
+
*/
|
|
1446
|
+
buy: TxDescriptor<Anonymize<I2qkf9i0e8mf1f>>;
|
|
1447
|
+
/**
|
|
1448
|
+
* Update asset's tradable state.
|
|
1449
|
+
*
|
|
1450
|
+
* Parameters:
|
|
1451
|
+
* - `asset_id`: asset id
|
|
1452
|
+
* - `state`: new state
|
|
1453
|
+
*
|
|
1454
|
+
* Emits `TradableStateUpdated` event when successful.
|
|
1455
|
+
*
|
|
1456
|
+
*/
|
|
1457
|
+
set_asset_tradable_state: TxDescriptor<Anonymize<Iefviakco48cs2>>;
|
|
1458
|
+
/**
|
|
1459
|
+
* Refund given amount of asset to a recipient.
|
|
1460
|
+
*
|
|
1461
|
+
* A refund is needed when a token is refused to be added to Omnipool, and initial liquidity of the asset has been already transferred to pool's account.
|
|
1462
|
+
*
|
|
1463
|
+
* Transfer can be executed only if asset is not in Omnipool and pool's balance has sufficient amount.
|
|
1464
|
+
*
|
|
1465
|
+
* Only `AuthorityOrigin` can perform this operation.
|
|
1466
|
+
*
|
|
1467
|
+
* Emits `AssetRefunded`
|
|
1468
|
+
*/
|
|
1469
|
+
refund_refused_asset: TxDescriptor<Anonymize<Iakb7idgif10m8>>;
|
|
1470
|
+
/**
|
|
1471
|
+
* Update asset's weight cap
|
|
1472
|
+
*
|
|
1473
|
+
* Parameters:
|
|
1474
|
+
* - `asset_id`: asset id
|
|
1475
|
+
* - `cap`: new weight cap
|
|
1476
|
+
*
|
|
1477
|
+
* Emits `AssetWeightCapUpdated` event when successful.
|
|
1478
|
+
*
|
|
1479
|
+
*/
|
|
1480
|
+
set_asset_weight_cap: TxDescriptor<Anonymize<Id7aqsj1u6b2r2>>;
|
|
1481
|
+
/**
|
|
1482
|
+
* Removes protocol liquidity.
|
|
1483
|
+
*
|
|
1484
|
+
* Protocol liquidity is liquidity from sacrificed positions. In order to remove protocol liquidity,
|
|
1485
|
+
* we need the know the price of the position at the time of sacrifice. Hence this specific call.
|
|
1486
|
+
*
|
|
1487
|
+
* Only `AuthorityOrigin` can perform this call.
|
|
1488
|
+
*
|
|
1489
|
+
* Note that sacrifice position will be deprecated in future. There is no longer a need for that.
|
|
1490
|
+
*
|
|
1491
|
+
* It works the same way as remove liquidity call, but position is temporary reconstructed.
|
|
1492
|
+
*
|
|
1493
|
+
*/
|
|
1494
|
+
withdraw_protocol_liquidity: TxDescriptor<Anonymize<Icah19jgge5j3e>>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Removes token from Omnipool.
|
|
1497
|
+
*
|
|
1498
|
+
* Asset's tradability must be FROZEN, otherwise `AssetNotFrozen` error is returned.
|
|
1499
|
+
*
|
|
1500
|
+
* Remaining shares must belong to protocol, otherwise `SharesRemaining` error is returned.
|
|
1501
|
+
*
|
|
1502
|
+
* Protocol's liquidity is transferred to the beneficiary account and hub asset amount is burned.
|
|
1503
|
+
*
|
|
1504
|
+
* Only `AuthorityOrigin` can perform this call.
|
|
1505
|
+
*
|
|
1506
|
+
* Emits `TokenRemoved` event when successful.
|
|
1507
|
+
*/
|
|
1508
|
+
remove_token: TxDescriptor<Anonymize<I2bi2kbaaunr13>>;
|
|
1509
|
+
};
|
|
1510
|
+
OmnipoolLiquidityMining: {
|
|
1511
|
+
/**
|
|
1512
|
+
* Create a new liquidity mining program with provided parameters.
|
|
1513
|
+
*
|
|
1514
|
+
* `owner` account has to have at least `total_rewards` balance. These funds will be
|
|
1515
|
+
* transferred from `owner` to farm account.
|
|
1516
|
+
*
|
|
1517
|
+
* The dispatch origin for this call must be `T::CreateOrigin`.
|
|
1518
|
+
* !!!WARN: `T::CreateOrigin` has power over funds of `owner`'s account and it should be
|
|
1519
|
+
* configured to trusted origin e.g Sudo or Governance.
|
|
1520
|
+
*
|
|
1521
|
+
* Parameters:
|
|
1522
|
+
* - `origin`: account allowed to create new liquidity mining program(root, governance).
|
|
1523
|
+
* - `total_rewards`: total rewards planned to distribute. These rewards will be
|
|
1524
|
+
* distributed between all yield farms in the global farm.
|
|
1525
|
+
* - `planned_yielding_periods`: planned number of periods to distribute `total_rewards`.
|
|
1526
|
+
* WARN: THIS IS NOT HARD DEADLINE. Not all rewards have to be distributed in
|
|
1527
|
+
* `planned_yielding_periods`. Rewards are distributed based on the situation in the yield
|
|
1528
|
+
* farms and can be distributed in a longer, though never in a shorter, time frame.
|
|
1529
|
+
* - `blocks_per_period`: number of blocks in a single period. Min. number of blocks per
|
|
1530
|
+
* period is 1.
|
|
1531
|
+
* - `reward_currency`: payoff currency of rewards.
|
|
1532
|
+
* - `owner`: liq. mining farm owner. This account will be able to manage created
|
|
1533
|
+
* liquidity mining program.
|
|
1534
|
+
* - `yield_per_period`: percentage return on `reward_currency` of all farms.
|
|
1535
|
+
* - `min_deposit`: minimum amount of LP shares to be deposited into the liquidity mining by each user.
|
|
1536
|
+
* - `lrna_price_adjustment`: price adjustment between `[LRNA]` and `reward_currency`.
|
|
1537
|
+
*
|
|
1538
|
+
* Emits `GlobalFarmCreated` when successful.
|
|
1539
|
+
*
|
|
1540
|
+
*/
|
|
1541
|
+
create_global_farm: TxDescriptor<Anonymize<I3iojc1k1m6nu7>>;
|
|
1542
|
+
/**
|
|
1543
|
+
* Terminate existing liq. mining program.
|
|
1544
|
+
*
|
|
1545
|
+
* Only farm owner can perform this action.
|
|
1546
|
+
*
|
|
1547
|
+
* WARN: To successfully terminate a global farm, farm have to be empty
|
|
1548
|
+
* (all yield farms in the global farm must be terminated).
|
|
1549
|
+
*
|
|
1550
|
+
* Parameters:
|
|
1551
|
+
* - `origin`: global farm's owner.
|
|
1552
|
+
* - `global_farm_id`: id of global farm to be terminated.
|
|
1553
|
+
*
|
|
1554
|
+
* Emits `GlobalFarmTerminated` event when successful.
|
|
1555
|
+
*
|
|
1556
|
+
*/
|
|
1557
|
+
terminate_global_farm: TxDescriptor<Anonymize<I9q8qmop6bko5m>>;
|
|
1558
|
+
/**
|
|
1559
|
+
* Create yield farm for given `asset_id` in the omnipool.
|
|
1560
|
+
*
|
|
1561
|
+
* Only farm owner can perform this action.
|
|
1562
|
+
*
|
|
1563
|
+
* Asset with `asset_id` has to be registered in the omnipool.
|
|
1564
|
+
* At most one `active` yield farm can exist in one global farm for the same `asset_id`.
|
|
1565
|
+
*
|
|
1566
|
+
* Parameters:
|
|
1567
|
+
* - `origin`: global farm's owner.
|
|
1568
|
+
* - `global_farm_id`: global farm id to which a yield farm will be added.
|
|
1569
|
+
* - `asset_id`: id of a asset in the omnipool. Yield farm will be created
|
|
1570
|
+
* for this asset and user will be able to lock LP shares into this yield farm immediately.
|
|
1571
|
+
* - `multiplier`: yield farm's multiplier.
|
|
1572
|
+
* - `loyalty_curve`: curve to calculate loyalty multiplier to distribute rewards to users
|
|
1573
|
+
* with time incentive. `None` means no loyalty multiplier.
|
|
1574
|
+
*
|
|
1575
|
+
* Emits `YieldFarmCreated` event when successful.
|
|
1576
|
+
*
|
|
1577
|
+
*/
|
|
1578
|
+
create_yield_farm: TxDescriptor<Anonymize<Ial2ta95n8ff3b>>;
|
|
1579
|
+
/**
|
|
1580
|
+
* Update yield farm's multiplier.
|
|
1581
|
+
*
|
|
1582
|
+
* Only farm owner can perform this action.
|
|
1583
|
+
*
|
|
1584
|
+
* Parameters:
|
|
1585
|
+
* - `origin`: global farm's owner.
|
|
1586
|
+
* - `global_farm_id`: global farm id in which yield farm will be updated.
|
|
1587
|
+
* - `asset_id`: id of the asset identifying yield farm in the global farm.
|
|
1588
|
+
* - `multiplier`: new yield farm's multiplier.
|
|
1589
|
+
*
|
|
1590
|
+
* Emits `YieldFarmUpdated` event when successful.
|
|
1591
|
+
*
|
|
1592
|
+
*/
|
|
1593
|
+
update_yield_farm: TxDescriptor<Anonymize<Iammrvujtc5lnk>>;
|
|
1594
|
+
/**
|
|
1595
|
+
* Stop liquidity miming for specific yield farm.
|
|
1596
|
+
*
|
|
1597
|
+
* This function claims rewards from `GlobalFarm` last time and stop yield farm
|
|
1598
|
+
* incentivization from a `GlobalFarm`. Users will be able to only withdraw
|
|
1599
|
+
* shares(with claiming) after calling this function.
|
|
1600
|
+
* `deposit_shares()` is not allowed on stopped yield farm.
|
|
1601
|
+
*
|
|
1602
|
+
* Only farm owner can perform this action.
|
|
1603
|
+
*
|
|
1604
|
+
* Parameters:
|
|
1605
|
+
* - `origin`: global farm's owner.
|
|
1606
|
+
* - `global_farm_id`: farm id in which yield farm will be canceled.
|
|
1607
|
+
* - `asset_id`: id of the asset identifying yield farm in the global farm.
|
|
1608
|
+
*
|
|
1609
|
+
* Emits `YieldFarmStopped` event when successful.
|
|
1610
|
+
*
|
|
1611
|
+
*/
|
|
1612
|
+
stop_yield_farm: TxDescriptor<Anonymize<I87j02rt3f17j8>>;
|
|
1613
|
+
/**
|
|
1614
|
+
* Resume incentivization of the asset represented by yield farm.
|
|
1615
|
+
*
|
|
1616
|
+
* This function resume incentivization of the asset from the `GlobalFarm` and
|
|
1617
|
+
* restore full functionality or the yield farm. Users will be able to deposit,
|
|
1618
|
+
* claim and withdraw again.
|
|
1619
|
+
*
|
|
1620
|
+
* WARN: Yield farm(and users) is NOT rewarded for time it was stopped.
|
|
1621
|
+
*
|
|
1622
|
+
* Only farm owner can perform this action.
|
|
1623
|
+
*
|
|
1624
|
+
* Parameters:
|
|
1625
|
+
* - `origin`: global farm's owner.
|
|
1626
|
+
* - `global_farm_id`: global farm id in which yield farm will be resumed.
|
|
1627
|
+
* - `yield_farm_id`: id of the yield farm to be resumed.
|
|
1628
|
+
* - `asset_id`: id of the asset identifying yield farm in the global farm.
|
|
1629
|
+
* - `multiplier`: yield farm multiplier.
|
|
1630
|
+
*
|
|
1631
|
+
* Emits `YieldFarmResumed` event when successful.
|
|
1632
|
+
*
|
|
1633
|
+
*/
|
|
1634
|
+
resume_yield_farm: TxDescriptor<Anonymize<Iasmn3c065hq91>>;
|
|
1635
|
+
/**
|
|
1636
|
+
* Terminate yield farm.
|
|
1637
|
+
*
|
|
1638
|
+
* This function marks a yield farm as ready to be removed from storage when it's empty. Users will
|
|
1639
|
+
* be able to only withdraw shares(without claiming rewards from yield farm). Unpaid rewards
|
|
1640
|
+
* will be transferred back to global farm and it will be used to distribute to other yield farms.
|
|
1641
|
+
*
|
|
1642
|
+
* Yield farm must be stopped before it can be terminated.
|
|
1643
|
+
*
|
|
1644
|
+
* Only global farm's owner can perform this action. Yield farm stays in the storage until it's
|
|
1645
|
+
* empty(all farm entries are withdrawn). Last withdrawn from yield farm trigger removing from
|
|
1646
|
+
* the storage.
|
|
1647
|
+
*
|
|
1648
|
+
* Parameters:
|
|
1649
|
+
* - `origin`: global farm's owner.
|
|
1650
|
+
* - `global_farm_id`: global farm id in which yield farm should be terminated.
|
|
1651
|
+
* - `yield_farm_id`: id of yield farm to be terminated.
|
|
1652
|
+
* - `asset_id`: id of the asset identifying yield farm.
|
|
1653
|
+
*
|
|
1654
|
+
* Emits `YieldFarmTerminated` event when successful.
|
|
1655
|
+
*
|
|
1656
|
+
*/
|
|
1657
|
+
terminate_yield_farm: TxDescriptor<Anonymize<Ia5kd7m19ap7ge>>;
|
|
1658
|
+
/**
|
|
1659
|
+
* Deposit omnipool position(LP shares) to a liquidity mining.
|
|
1660
|
+
*
|
|
1661
|
+
* This function transfers omnipool position from `origin` to pallet's account and mint NFT for
|
|
1662
|
+
* `origin` account. Minted NFT represents deposit in the liquidity mining. User can
|
|
1663
|
+
* deposit omnipool position as a whole(all the LP shares in the position).
|
|
1664
|
+
*
|
|
1665
|
+
* Parameters:
|
|
1666
|
+
* - `origin`: owner of the omnipool position to deposit into the liquidity mining.
|
|
1667
|
+
* - `global_farm_id`: id of global farm to which user wants to deposit LP shares.
|
|
1668
|
+
* - `yield_farm_id`: id of yield farm to deposit to.
|
|
1669
|
+
* - `position_id`: id of the omnipool position to be deposited into the liquidity mining.
|
|
1670
|
+
*
|
|
1671
|
+
* Emits `SharesDeposited` event when successful.
|
|
1672
|
+
*
|
|
1673
|
+
*/
|
|
1674
|
+
deposit_shares: TxDescriptor<Anonymize<Ieq7brqoubndin>>;
|
|
1675
|
+
/**
|
|
1676
|
+
* Redeposit LP shares in the already locked omnipool position.
|
|
1677
|
+
*
|
|
1678
|
+
* This function create yield farm entry for existing deposit. Amount of redeposited LP
|
|
1679
|
+
* shares is same as amount shares which are already deposited in the deposit.
|
|
1680
|
+
*
|
|
1681
|
+
* This function DOESN'T create new deposit(NFT).
|
|
1682
|
+
*
|
|
1683
|
+
* Parameters:
|
|
1684
|
+
* - `origin`: owner of the deposit to redeposit.
|
|
1685
|
+
* - `global_farm_id`: id of the global farm to which user wants to redeposit LP shares.
|
|
1686
|
+
* - `yield_farm_id`: id of the yield farm to redeposit to.
|
|
1687
|
+
* - `deposit_id`: identifier of the deposit to redeposit.
|
|
1688
|
+
*
|
|
1689
|
+
* Emits `SharesRedeposited` event when successful.
|
|
1690
|
+
*
|
|
1691
|
+
*/
|
|
1692
|
+
redeposit_shares: TxDescriptor<Anonymize<Ie8ft8rd6cil27>>;
|
|
1693
|
+
/**
|
|
1694
|
+
* Claim rewards from liquidity mining program for deposit represented by the `deposit_id`.
|
|
1695
|
+
*
|
|
1696
|
+
* This function calculate user rewards from liquidity mining and transfer rewards to `origin`
|
|
1697
|
+
* account. Claiming multiple time the same period is not allowed.
|
|
1698
|
+
*
|
|
1699
|
+
* Parameters:
|
|
1700
|
+
* - `origin`: owner of deposit.
|
|
1701
|
+
* - `deposit_id`: id of the deposit to claim rewards for.
|
|
1702
|
+
* - `yield_farm_id`: id of the yield farm to claim rewards from.
|
|
1703
|
+
*
|
|
1704
|
+
* Emits `RewardClaimed` event when successful.
|
|
1705
|
+
*
|
|
1706
|
+
*/
|
|
1707
|
+
claim_rewards: TxDescriptor<Anonymize<I2k37dcoppgins>>;
|
|
1708
|
+
/**
|
|
1709
|
+
* This function claim rewards and withdraw LP shares from yield farm. Omnipool position
|
|
1710
|
+
* is transferred to origin only if this is last withdraw in the deposit and deposit is
|
|
1711
|
+
* destroyed. This function claim rewards only if yield farm is not terminated and user
|
|
1712
|
+
* didn't already claim rewards in current period.
|
|
1713
|
+
*
|
|
1714
|
+
* Unclaimable rewards represents rewards which user won't be able to claim because of
|
|
1715
|
+
* exiting early and these rewards will be transferred back to global farm for future
|
|
1716
|
+
* redistribution.
|
|
1717
|
+
*
|
|
1718
|
+
* Parameters:
|
|
1719
|
+
* - `origin`: owner of deposit.
|
|
1720
|
+
* - `deposit_id`: id of the deposit to claim rewards for.
|
|
1721
|
+
* - `yield_farm_id`: id of the yield farm to claim rewards from.
|
|
1722
|
+
*
|
|
1723
|
+
* Emits:
|
|
1724
|
+
* * `RewardClaimed` event if claimed rewards is > 0
|
|
1725
|
+
* * `SharesWithdrawn` event when successful
|
|
1726
|
+
* * `DepositDestroyed` event when this was last withdraw from the deposit and deposit was
|
|
1727
|
+
* destroyed.
|
|
1728
|
+
*
|
|
1729
|
+
*/
|
|
1730
|
+
withdraw_shares: TxDescriptor<Anonymize<I2k37dcoppgins>>;
|
|
1731
|
+
/**
|
|
1732
|
+
* This extrinsic updates global farm's main parameters.
|
|
1733
|
+
*
|
|
1734
|
+
* The dispatch origin for this call must be `T::CreateOrigin`.
|
|
1735
|
+
* !!!WARN: `T::CreateOrigin` has power over funds of `owner`'s account and it should be
|
|
1736
|
+
* configured to trusted origin e.g Sudo or Governance.
|
|
1737
|
+
*
|
|
1738
|
+
* Parameters:
|
|
1739
|
+
* - `origin`: account allowed to create new liquidity mining program(root, governance).
|
|
1740
|
+
* - `global_farm_id`: id of the global farm to update.
|
|
1741
|
+
* - `planned_yielding_periods`: planned number of periods to distribute `total_rewards`.
|
|
1742
|
+
* - `yield_per_period`: percentage return on `reward_currency` of all farms.
|
|
1743
|
+
* - `min_deposit`: minimum amount of LP shares to be deposited into the liquidity mining by each user.
|
|
1744
|
+
*
|
|
1745
|
+
* Emits `GlobalFarmUpdated` event when successful.
|
|
1746
|
+
*/
|
|
1747
|
+
update_global_farm: TxDescriptor<Anonymize<Ia05t9pjenemsb>>;
|
|
1748
|
+
/**
|
|
1749
|
+
* This function allows user to join multiple farms with a single omnipool position.
|
|
1750
|
+
*
|
|
1751
|
+
* Parameters:
|
|
1752
|
+
* - `origin`: owner of the omnipool position to deposit into the liquidity mining.
|
|
1753
|
+
* - `farm_entries`: list of farms to join.
|
|
1754
|
+
* - `position_id`: id of the omnipool position to be deposited into the liquidity mining.
|
|
1755
|
+
*
|
|
1756
|
+
* Emits `SharesDeposited` event for the first farm entry
|
|
1757
|
+
* Emits `SharesRedeposited` event for each farm entry after the first one
|
|
1758
|
+
*/
|
|
1759
|
+
join_farms: TxDescriptor<Anonymize<I4rm8rabbdt645>>;
|
|
1760
|
+
/**
|
|
1761
|
+
* This function allows user to add liquidity then use that shares to join multiple farms.
|
|
1762
|
+
*
|
|
1763
|
+
* Parameters:
|
|
1764
|
+
* - `origin`: owner of the omnipool position to deposit into the liquidity mining.
|
|
1765
|
+
* - `farm_entries`: list of farms to join.
|
|
1766
|
+
* - `asset`: id of the asset to be deposited into the liquidity mining.
|
|
1767
|
+
* - `amount`: amount of the asset to be deposited into the liquidity mining.
|
|
1768
|
+
* - `min_shares_limit`: The min amount of delta share asset the user should receive in the position
|
|
1769
|
+
*
|
|
1770
|
+
* Emits `SharesDeposited` event for the first farm entry
|
|
1771
|
+
* Emits `SharesRedeposited` event for each farm entry after the first one
|
|
1772
|
+
*/
|
|
1773
|
+
add_liquidity_and_join_farms: TxDescriptor<Anonymize<I9sh4kg79d0vn>>;
|
|
1774
|
+
/**
|
|
1775
|
+
* Exit from all specified yield farms
|
|
1776
|
+
*
|
|
1777
|
+
* This function will attempt to withdraw shares and claim rewards (if available) from all
|
|
1778
|
+
* specified yield farms for a given deposit.
|
|
1779
|
+
*
|
|
1780
|
+
* Parameters:
|
|
1781
|
+
* - `origin`: account owner of deposit(nft).
|
|
1782
|
+
* - `deposit_id`: id of the deposit to claim rewards for.
|
|
1783
|
+
* - `yield_farm_ids`: id(s) of yield farm(s) to exit from.
|
|
1784
|
+
*
|
|
1785
|
+
* Emits:
|
|
1786
|
+
* * `RewardClaimed` for each successful claim
|
|
1787
|
+
* * `SharesWithdrawn` for each successful withdrawal
|
|
1788
|
+
* * `DepositDestroyed` if the deposit is fully withdrawn
|
|
1789
|
+
*
|
|
1790
|
+
*/
|
|
1791
|
+
exit_farms: TxDescriptor<Anonymize<I5k5ne4orot4oe>>;
|
|
1792
|
+
/**
|
|
1793
|
+
* This function allows user to add liquidity to stableswap pool,
|
|
1794
|
+
* then adding the stable shares as liquidity to omnipool
|
|
1795
|
+
* then use that omnipool shares to join multiple farms.
|
|
1796
|
+
*
|
|
1797
|
+
* If farm entries are not specified (empty vectoo), then the liquidities are still added to the pools
|
|
1798
|
+
*
|
|
1799
|
+
* Parameters:
|
|
1800
|
+
* - `origin`: owner of the omnipool position to deposit into the liquidity mining.
|
|
1801
|
+
* - `stable_pool_id`: id of the stableswap pool to add liquidity to.
|
|
1802
|
+
* - `stable_asset_amounts`: amount of each asset to be deposited into the stableswap pool.
|
|
1803
|
+
* - `farm_entries`: list of farms to join.
|
|
1804
|
+
*
|
|
1805
|
+
* Emits `LiquidityAdded` events from both pool
|
|
1806
|
+
* Emits `SharesDeposited` event for the first farm entry
|
|
1807
|
+
* Emits `SharesRedeposited` event for each farm entry after the first one
|
|
1808
|
+
*
|
|
1809
|
+
*/
|
|
1810
|
+
add_liquidity_stableswap_omnipool_and_join_farms: TxDescriptor<Anonymize<Idtg418thlu95>>;
|
|
1811
|
+
};
|
|
1812
|
+
OTC: {
|
|
1813
|
+
/**
|
|
1814
|
+
* Create a new OTC order
|
|
1815
|
+
*
|
|
1816
|
+
* Parameters:
|
|
1817
|
+
* - `asset_in`: Asset which is being bought
|
|
1818
|
+
* - `asset_out`: Asset which is being sold
|
|
1819
|
+
* - `amount_in`: Amount that the order is seeking to buy
|
|
1820
|
+
* - `amount_out`: Amount that the order is selling
|
|
1821
|
+
* - `partially_fillable`: Flag indicating whether users can fill the order partially
|
|
1822
|
+
*
|
|
1823
|
+
* Validations:
|
|
1824
|
+
* - asset_in must be registered
|
|
1825
|
+
* - amount_in must be higher than the existential deposit of asset_in multiplied by
|
|
1826
|
+
* ExistentialDepositMultiplier
|
|
1827
|
+
* - amount_out must be higher than the existential deposit of asset_out multiplied by
|
|
1828
|
+
* ExistentialDepositMultiplier
|
|
1829
|
+
*
|
|
1830
|
+
* Events:
|
|
1831
|
+
* - `Placed` event when successful.
|
|
1832
|
+
*/
|
|
1833
|
+
place_order: TxDescriptor<Anonymize<I8utns9aeu3t6o>>;
|
|
1834
|
+
/**
|
|
1835
|
+
* Fill an OTC order (partially)
|
|
1836
|
+
*
|
|
1837
|
+
* Parameters:
|
|
1838
|
+
* - `order_id`: ID of the order
|
|
1839
|
+
* - `amount_in`: Amount with which the order is being filled
|
|
1840
|
+
*
|
|
1841
|
+
* Validations:
|
|
1842
|
+
* - order must be partially_fillable
|
|
1843
|
+
* - after the partial_fill, the remaining order.amount_in must be higher than the existential deposit
|
|
1844
|
+
* of asset_in multiplied by ExistentialDepositMultiplier
|
|
1845
|
+
* - after the partial_fill, the remaining order.amount_out must be higher than the existential deposit
|
|
1846
|
+
* of asset_out multiplied by ExistentialDepositMultiplier
|
|
1847
|
+
*
|
|
1848
|
+
* Events:
|
|
1849
|
+
* `PartiallyFilled` event when successful. Deprecated.
|
|
1850
|
+
* `pallet_broadcast::Swapped` event when successful.
|
|
1851
|
+
*/
|
|
1852
|
+
partial_fill_order: TxDescriptor<Anonymize<I35cf63e7kg5on>>;
|
|
1853
|
+
/**
|
|
1854
|
+
* Fill an OTC order (completely)
|
|
1855
|
+
*
|
|
1856
|
+
* Parameters:
|
|
1857
|
+
* - `order_id`: ID of the order
|
|
1858
|
+
*
|
|
1859
|
+
* Events:
|
|
1860
|
+
* `Filled` event when successful. Deprecated.
|
|
1861
|
+
* `pallet_broadcast::Swapped` event when successful.
|
|
1862
|
+
*/
|
|
1863
|
+
fill_order: TxDescriptor<Anonymize<Ibq6b0nsk23kj8>>;
|
|
1864
|
+
/**
|
|
1865
|
+
* Cancel an open OTC order
|
|
1866
|
+
*
|
|
1867
|
+
* Parameters:
|
|
1868
|
+
* - `order_id`: ID of the order
|
|
1869
|
+
* - `asset`: Asset which is being filled
|
|
1870
|
+
* - `amount`: Amount which is being filled
|
|
1871
|
+
*
|
|
1872
|
+
* Validations:
|
|
1873
|
+
* - caller is order owner
|
|
1874
|
+
*
|
|
1875
|
+
* Emits `Cancelled` event when successful.
|
|
1876
|
+
*/
|
|
1877
|
+
cancel_order: TxDescriptor<Anonymize<Ibq6b0nsk23kj8>>;
|
|
1878
|
+
};
|
|
1879
|
+
Router: {
|
|
1880
|
+
/**
|
|
1881
|
+
* Executes a sell with a series of trades specified in the route.
|
|
1882
|
+
* The price for each trade is determined by the corresponding AMM.
|
|
1883
|
+
*
|
|
1884
|
+
* - `origin`: The executor of the trade
|
|
1885
|
+
* - `asset_in`: The identifier of the asset to sell
|
|
1886
|
+
* - `asset_out`: The identifier of the asset to receive
|
|
1887
|
+
* - `amount_in`: The amount of `asset_in` to sell
|
|
1888
|
+
* - `min_amount_out`: The minimum amount of `asset_out` to receive.
|
|
1889
|
+
* - `route`: Series of [`Trade<AssetId>`] to be executed. A [`Trade<AssetId>`] specifies the asset pair (`asset_in`, `asset_out`) and the AMM (`pool`) in which the trade is executed.
|
|
1890
|
+
* If not specified, than the on-chain route is used.
|
|
1891
|
+
* If no on-chain is present, then omnipool route is used as default
|
|
1892
|
+
*
|
|
1893
|
+
* Emits `RouteExecuted` when successful.
|
|
1894
|
+
*/
|
|
1895
|
+
sell: TxDescriptor<Anonymize<Ifc3gfgolmaqf7>>;
|
|
1896
|
+
/**
|
|
1897
|
+
* Executes a buy with a series of trades specified in the route.
|
|
1898
|
+
* The price for each trade is determined by the corresponding AMM.
|
|
1899
|
+
*
|
|
1900
|
+
* - `origin`: The executor of the trade
|
|
1901
|
+
* - `asset_in`: The identifier of the asset to be swapped to buy `asset_out`
|
|
1902
|
+
* - `asset_out`: The identifier of the asset to buy
|
|
1903
|
+
* - `amount_out`: The amount of `asset_out` to buy
|
|
1904
|
+
* - `max_amount_in`: The max amount of `asset_in` to spend on the buy.
|
|
1905
|
+
* - `route`: Series of [`Trade<AssetId>`] to be executed. A [`Trade<AssetId>`] specifies the asset pair (`asset_in`, `asset_out`) and the AMM (`pool`) in which the trade is executed.
|
|
1906
|
+
* If not specified, than the on-chain route is used.
|
|
1907
|
+
* If no on-chain is present, then omnipool route is used as default
|
|
1908
|
+
*
|
|
1909
|
+
* Emits `RouteExecuted` when successful.
|
|
1910
|
+
*/
|
|
1911
|
+
buy: TxDescriptor<Anonymize<I651losl68jmo5>>;
|
|
1912
|
+
/**
|
|
1913
|
+
* Sets the on-chain route for a given asset pair.
|
|
1914
|
+
*
|
|
1915
|
+
* The new route is validated by being executed in a dry-run mode
|
|
1916
|
+
*
|
|
1917
|
+
* If there is no route explicitly set for an asset pair, then we use the omnipool route as default.
|
|
1918
|
+
*
|
|
1919
|
+
* When a new route is set, we compare it to the existing (or default) route.
|
|
1920
|
+
* The comparison happens by calculating sell amount_outs for the routes, but also for the inversed routes.
|
|
1921
|
+
*
|
|
1922
|
+
* The route is stored in an ordered manner, based on the oder of the ids in the asset pair.
|
|
1923
|
+
*
|
|
1924
|
+
* If the route is set successfully, then the fee is payed back.
|
|
1925
|
+
*
|
|
1926
|
+
* - `origin`: The origin of the route setter
|
|
1927
|
+
* - `asset_pair`: The identifier of the asset-pair for which the route is set
|
|
1928
|
+
* - `new_route`: Series of [`Trade<AssetId>`] to be executed. A [`Trade<AssetId>`] specifies the asset pair (`asset_in`, `asset_out`) and the AMM (`pool`) in which the trade is executed.
|
|
1929
|
+
*
|
|
1930
|
+
* Emits `RouteUpdated` when successful.
|
|
1931
|
+
*
|
|
1932
|
+
* Fails with `RouteUpdateIsNotSuccessful` error when failed to set the route
|
|
1933
|
+
*
|
|
1934
|
+
*/
|
|
1935
|
+
set_route: TxDescriptor<Anonymize<I5dlvf0cogf3c3>>;
|
|
1936
|
+
/**
|
|
1937
|
+
* Force inserts the on-chain route for a given asset pair, so there is no any validation for the route
|
|
1938
|
+
*
|
|
1939
|
+
* Can only be called by T::ForceInsertOrigin
|
|
1940
|
+
*
|
|
1941
|
+
* The route is stored in an ordered manner, based on the oder of the ids in the asset pair.
|
|
1942
|
+
*
|
|
1943
|
+
* If the route is set successfully, then the fee is payed back.
|
|
1944
|
+
*
|
|
1945
|
+
* - `origin`: The origin of the route setter
|
|
1946
|
+
* - `asset_pair`: The identifier of the asset-pair for which the route is set
|
|
1947
|
+
* - `new_route`: Series of [`Trade<AssetId>`] to be executed. A [`Trade<AssetId>`] specifies the asset pair (`asset_in`, `asset_out`) and the AMM (`pool`) in which the trade is executed.
|
|
1948
|
+
*
|
|
1949
|
+
* Emits `RouteUpdated` when successful.
|
|
1950
|
+
*
|
|
1951
|
+
*/
|
|
1952
|
+
force_insert_route: TxDescriptor<Anonymize<I5dlvf0cogf3c3>>;
|
|
1953
|
+
/**
|
|
1954
|
+
* Executes a sell with a series of trades specified in the route.
|
|
1955
|
+
* It sells all reducible user balance of `asset_in`
|
|
1956
|
+
* The price for each trade is determined by the corresponding AMM.
|
|
1957
|
+
*
|
|
1958
|
+
* - `origin`: The executor of the trade
|
|
1959
|
+
* - `asset_in`: The identifier of the asset to sell
|
|
1960
|
+
* - `asset_out`: The identifier of the asset to receive
|
|
1961
|
+
* - `min_amount_out`: The minimum amount of `asset_out` to receive.
|
|
1962
|
+
* - `route`: Series of [`Trade<AssetId>`] to be executed. A [`Trade<AssetId>`] specifies the asset pair (`asset_in`, `asset_out`) and the AMM (`pool`) in which the trade is executed.
|
|
1963
|
+
* If not specified, than the on-chain route is used.
|
|
1964
|
+
* If no on-chain is present, then omnipool route is used as default
|
|
1965
|
+
*
|
|
1966
|
+
* Emits `RouteExecuted` when successful.
|
|
1967
|
+
*
|
|
1968
|
+
*/
|
|
1969
|
+
sell_all: TxDescriptor<Anonymize<Ie6nueo20p04gk>>;
|
|
1970
|
+
};
|
|
1971
|
+
Staking: {
|
|
1972
|
+
/**
|
|
1973
|
+
* Staking pallet initialization. This call will reserved `pot`'s balance to prevent
|
|
1974
|
+
* account dusting and start collecting fees from trades as rewards.
|
|
1975
|
+
*
|
|
1976
|
+
* `pot`’s account has to have a balance which will be reserved to prevent account dusting.
|
|
1977
|
+
*
|
|
1978
|
+
* Emits `StakingInitialized` event when successful.
|
|
1979
|
+
*
|
|
1980
|
+
*/
|
|
1981
|
+
initialize_staking: TxDescriptor<undefined>;
|
|
1982
|
+
/**
|
|
1983
|
+
* Stake `amount` into a new staking position.
|
|
1984
|
+
*
|
|
1985
|
+
* `stake` locks specified `amount` into staking and creates new NFT representing staking
|
|
1986
|
+
* position.
|
|
1987
|
+
* Users can stake `NativeAssetId` balance which is not vested or already staked.
|
|
1988
|
+
*
|
|
1989
|
+
* Staking pallet must be initialized otherwise extrinsic will fail with error.
|
|
1990
|
+
*
|
|
1991
|
+
* Parameters:
|
|
1992
|
+
* - `amount`: Amount of native asset to be staked. `amount` can't be vested or already
|
|
1993
|
+
* staked
|
|
1994
|
+
*
|
|
1995
|
+
* Emits `PositionCreated` event when successful.
|
|
1996
|
+
*
|
|
1997
|
+
*/
|
|
1998
|
+
stake: TxDescriptor<Anonymize<I3qt1hgg4djhgb>>;
|
|
1999
|
+
/**
|
|
2000
|
+
* Extrinsic to increase staked amount of existing staking position by specified `amount`.
|
|
2001
|
+
*
|
|
2002
|
+
* `increase_stake` increases staked amount of position specified by `postion_id` by the
|
|
2003
|
+
* `amount` specified by the user.
|
|
2004
|
+
* Staking position must exist and `origin` has to be the owner of the position.
|
|
2005
|
+
* Users can stake tokens which are not vested or already staked.
|
|
2006
|
+
* Position's params e.g points are updated to offset stake increase and rewards
|
|
2007
|
+
* accumulated until this point are paid and locked to the user.
|
|
2008
|
+
*
|
|
2009
|
+
* Parameters:
|
|
2010
|
+
* - `position_id`: The identifier of the position which stake will be increased.
|
|
2011
|
+
* - `amount`: Amount of native asset to be added to staked amount. `amount` can't be vested or
|
|
2012
|
+
* already staked
|
|
2013
|
+
*
|
|
2014
|
+
* Emits `StakeAdded` event when successful.
|
|
2015
|
+
*
|
|
2016
|
+
*/
|
|
2017
|
+
increase_stake: TxDescriptor<Anonymize<Icqdi7b9m95ug3>>;
|
|
2018
|
+
/**
|
|
2019
|
+
* Claim rewards accumulated for specific staking position.
|
|
2020
|
+
*
|
|
2021
|
+
* Function calculates amount of rewards to pay for specified staking position based on
|
|
2022
|
+
* the amount of points position accumulated. Function also unlocks all the rewards locked
|
|
2023
|
+
* from `increase_stake` based on the amount of the points.
|
|
2024
|
+
*
|
|
2025
|
+
* This action is penalized by removing all the points and returning allocated unpaid rewards
|
|
2026
|
+
* for redistribution.
|
|
2027
|
+
*
|
|
2028
|
+
* Parameters:
|
|
2029
|
+
* - `position_id`: The identifier of the position to claim rewards for.
|
|
2030
|
+
*
|
|
2031
|
+
* Emits `RewardsClaimed` event when successful.
|
|
2032
|
+
*
|
|
2033
|
+
*/
|
|
2034
|
+
claim: TxDescriptor<Anonymize<I6vhvcln14dp4d>>;
|
|
2035
|
+
/**
|
|
2036
|
+
* Function pays rewards, unlocks all the staked assets and destroys staking position
|
|
2037
|
+
* specified by `position_id`.
|
|
2038
|
+
*
|
|
2039
|
+
* Function calculates and pays latest rewards, unlocks all the locked rewards and staked
|
|
2040
|
+
* tokens for staking position and burns NFT representing staking position.
|
|
2041
|
+
* Unpaid allocated rewards are returned to the Staking for redistribution.
|
|
2042
|
+
*
|
|
2043
|
+
* Parameters:
|
|
2044
|
+
* - `position_id`: The identifier of the position to be destroyed.
|
|
2045
|
+
*
|
|
2046
|
+
* Emits `RewardsClaimed` and `Unstaked` events when successful.
|
|
2047
|
+
*
|
|
2048
|
+
*/
|
|
2049
|
+
unstake: TxDescriptor<Anonymize<I6vhvcln14dp4d>>;
|
|
2050
|
+
};
|
|
2051
|
+
Stableswap: {
|
|
2052
|
+
/**
|
|
2053
|
+
* Create a stable pool with given list of assets.
|
|
2054
|
+
*
|
|
2055
|
+
* All assets must be correctly registered in `T::AssetRegistry`.
|
|
2056
|
+
* Note that this does not seed the pool with liquidity. Use `add_assets_liquidity` to provide
|
|
2057
|
+
* initial liquidity.
|
|
2058
|
+
*
|
|
2059
|
+
* Parameters:
|
|
2060
|
+
* - `origin`: Must be T::AuthorityOrigin
|
|
2061
|
+
* - `share_asset`: Preregistered share asset identifier
|
|
2062
|
+
* - `assets`: List of Asset ids
|
|
2063
|
+
* - `amplification`: Pool amplification
|
|
2064
|
+
* - `fee`: fee to be applied on trade and liquidity operations
|
|
2065
|
+
*
|
|
2066
|
+
* Emits `PoolCreated` event if successful.
|
|
2067
|
+
*/
|
|
2068
|
+
create_pool: TxDescriptor<Anonymize<I77a9b6eik0rui>>;
|
|
2069
|
+
/**
|
|
2070
|
+
* Update pool's fee.
|
|
2071
|
+
*
|
|
2072
|
+
* if pool does not exist, `PoolNotFound` is returned.
|
|
2073
|
+
*
|
|
2074
|
+
* Parameters:
|
|
2075
|
+
* - `origin`: Must be T::AuthorityOrigin
|
|
2076
|
+
* - `pool_id`: pool to update
|
|
2077
|
+
* - `fee`: new pool fee
|
|
2078
|
+
*
|
|
2079
|
+
* Emits `FeeUpdated` event if successful.
|
|
2080
|
+
*/
|
|
2081
|
+
update_pool_fee: TxDescriptor<Anonymize<Ics8sn0t3vlpat>>;
|
|
2082
|
+
/**
|
|
2083
|
+
* Update pool's amplification.
|
|
2084
|
+
*
|
|
2085
|
+
* Parameters:
|
|
2086
|
+
* - `origin`: Must be T::AuthorityOrigin
|
|
2087
|
+
* - `pool_id`: pool to update
|
|
2088
|
+
* - `final_amplification`: new desired pool amplification
|
|
2089
|
+
* - `start_block`: block number when the amplification starts to move towards final_amplication
|
|
2090
|
+
* - `end_block`: block number when the amplification reaches final_amplification
|
|
2091
|
+
*
|
|
2092
|
+
* Emits `AmplificationUpdated` event if successful.
|
|
2093
|
+
*/
|
|
2094
|
+
update_amplification: TxDescriptor<Anonymize<I6p5nbogrodkcc>>;
|
|
2095
|
+
/**
|
|
2096
|
+
* Add liquidity to selected pool.
|
|
2097
|
+
*
|
|
2098
|
+
* Use `add_assets_liquidity` instead.
|
|
2099
|
+
* This extrinsics will be removed in the future.
|
|
2100
|
+
*
|
|
2101
|
+
* First call of `add_liquidity` must provide "initial liquidity" of all assets.
|
|
2102
|
+
*
|
|
2103
|
+
* If there is liquidity already in the pool, LP can provide liquidity of any number of pool assets.
|
|
2104
|
+
*
|
|
2105
|
+
* LP must have sufficient amount of each asset.
|
|
2106
|
+
*
|
|
2107
|
+
* Origin is given corresponding amount of shares.
|
|
2108
|
+
*
|
|
2109
|
+
* Parameters:
|
|
2110
|
+
* - `origin`: liquidity provider
|
|
2111
|
+
* - `pool_id`: Pool Id
|
|
2112
|
+
* - `assets`: asset id and liquidity amount provided
|
|
2113
|
+
*
|
|
2114
|
+
* Emits `LiquidityAdded` event when successful.
|
|
2115
|
+
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
2116
|
+
*/
|
|
2117
|
+
add_liquidity: TxDescriptor<Anonymize<I7pgj3rnfo83eg>>;
|
|
2118
|
+
/**
|
|
2119
|
+
* Add liquidity to selected pool given exact amount of shares to receive.
|
|
2120
|
+
*
|
|
2121
|
+
* Similar to `add_liquidity` but LP specifies exact amount of shares to receive.
|
|
2122
|
+
*
|
|
2123
|
+
* This functionality is used mainly by on-chain routing when a swap between Omnipool asset and stable asset is performed.
|
|
2124
|
+
*
|
|
2125
|
+
* Parameters:
|
|
2126
|
+
* - `origin`: liquidity provider
|
|
2127
|
+
* - `pool_id`: Pool Id
|
|
2128
|
+
* - `shares`: amount of shares to receive
|
|
2129
|
+
* - `asset_id`: asset id of an asset to provide as liquidity
|
|
2130
|
+
* - `max_asset_amount`: slippage limit. Max amount of asset.
|
|
2131
|
+
*
|
|
2132
|
+
* Emits `LiquidityAdded` event when successful.
|
|
2133
|
+
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
2134
|
+
*/
|
|
2135
|
+
add_liquidity_shares: TxDescriptor<Anonymize<Ic11mlh16sngai>>;
|
|
2136
|
+
/**
|
|
2137
|
+
* Remove liquidity from selected pool.
|
|
2138
|
+
*
|
|
2139
|
+
* Withdraws liquidity of selected asset from a pool.
|
|
2140
|
+
*
|
|
2141
|
+
* Share amount is burned and LP receives corresponding amount of chosen asset.
|
|
2142
|
+
*
|
|
2143
|
+
* Withdraw fee is applied to the asset amount.
|
|
2144
|
+
*
|
|
2145
|
+
* Parameters:
|
|
2146
|
+
* - `origin`: liquidity provider
|
|
2147
|
+
* - `pool_id`: Pool Id
|
|
2148
|
+
* - `asset_id`: id of asset to receive
|
|
2149
|
+
* - 'share_amount': amount of shares to withdraw
|
|
2150
|
+
* - 'min_amount_out': minimum amount to receive
|
|
2151
|
+
*
|
|
2152
|
+
* Emits `LiquidityRemoved` event when successful.
|
|
2153
|
+
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
2154
|
+
*/
|
|
2155
|
+
remove_liquidity_one_asset: TxDescriptor<Anonymize<I4vbsn8c7ui70f>>;
|
|
2156
|
+
/**
|
|
2157
|
+
* Remove liquidity from selected pool by specifying exact amount of asset to receive.
|
|
2158
|
+
*
|
|
2159
|
+
* Similar to `remove_liquidity_one_asset` but LP specifies exact amount of asset to receive instead of share amount.
|
|
2160
|
+
*
|
|
2161
|
+
* Parameters:
|
|
2162
|
+
* - `origin`: liquidity provider
|
|
2163
|
+
* - `pool_id`: Pool Id
|
|
2164
|
+
* - `asset_id`: id of asset to receive
|
|
2165
|
+
* - 'amount': amount of asset to receive
|
|
2166
|
+
* - 'max_share_amount': Slippage limit. Max amount of shares to burn.
|
|
2167
|
+
*
|
|
2168
|
+
* Emits `LiquidityRemoved` event when successful.
|
|
2169
|
+
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
2170
|
+
*/
|
|
2171
|
+
withdraw_asset_amount: TxDescriptor<Anonymize<I60m5cjc6e18ab>>;
|
|
2172
|
+
/**
|
|
2173
|
+
* Execute a swap of `asset_in` for `asset_out`.
|
|
2174
|
+
*
|
|
2175
|
+
* Parameters:
|
|
2176
|
+
* - `origin`: origin of the caller
|
|
2177
|
+
* - `pool_id`: Id of a pool
|
|
2178
|
+
* - `asset_in`: ID of asset sold to the pool
|
|
2179
|
+
* - `asset_out`: ID of asset bought from the pool
|
|
2180
|
+
* - `amount_in`: Amount of asset to be sold to the pool
|
|
2181
|
+
* - `min_buy_amount`: Minimum amount required to receive
|
|
2182
|
+
*
|
|
2183
|
+
* Emits `SellExecuted` event when successful. Deprecated.
|
|
2184
|
+
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
2185
|
+
*
|
|
2186
|
+
*/
|
|
2187
|
+
sell: TxDescriptor<Anonymize<Iauknf9up388mv>>;
|
|
2188
|
+
/**
|
|
2189
|
+
* Execute a swap of `asset_out` for `asset_in`.
|
|
2190
|
+
*
|
|
2191
|
+
* Parameters:
|
|
2192
|
+
* - `origin`:
|
|
2193
|
+
* - `pool_id`: Id of a pool
|
|
2194
|
+
* - `asset_out`: ID of asset bought from the pool
|
|
2195
|
+
* - `asset_in`: ID of asset sold to the pool
|
|
2196
|
+
* - `amount_out`: Amount of asset to receive from the pool
|
|
2197
|
+
* - `max_sell_amount`: Maximum amount allowed to be sold
|
|
2198
|
+
*
|
|
2199
|
+
* Emits `BuyExecuted` event when successful. Deprecated.
|
|
2200
|
+
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
2201
|
+
*
|
|
2202
|
+
*/
|
|
2203
|
+
buy: TxDescriptor<Anonymize<Ieh252ua9757u1>>;
|
|
2204
|
+
/**
|
|
2205
|
+
* Update the tradable state of a specific asset in a pool.
|
|
2206
|
+
*
|
|
2207
|
+
* This function allows updating the tradability state of an asset within a pool. The tradability state determines whether the asset can be used for specific operations such as adding liquidity, removing liquidity, buying, or selling.
|
|
2208
|
+
*
|
|
2209
|
+
* Parameters:
|
|
2210
|
+
* - `origin`: Must be `T::UpdateTradabilityOrigin`.
|
|
2211
|
+
* - `pool_id`: The ID of the pool containing the asset.
|
|
2212
|
+
* - `asset_id`: The ID of the asset whose tradability state is to be updated.
|
|
2213
|
+
* - `state`: The new tradability state of the asset.
|
|
2214
|
+
*
|
|
2215
|
+
* Emits `TradableStateUpdated` event when successful.
|
|
2216
|
+
*
|
|
2217
|
+
* # Errors
|
|
2218
|
+
* - `PoolNotFound`: If the specified pool does not exist.
|
|
2219
|
+
* - `AssetNotInPool`: If the specified asset is not part of the pool.
|
|
2220
|
+
*
|
|
2221
|
+
*/
|
|
2222
|
+
set_asset_tradable_state: TxDescriptor<Anonymize<Iest0fomljvrb6>>;
|
|
2223
|
+
/**
|
|
2224
|
+
* Remove liquidity from a selected pool uniformly.
|
|
2225
|
+
*
|
|
2226
|
+
* This function allows a liquidity provider to withdraw liquidity from a pool.
|
|
2227
|
+
* The provider specifies the amount of shares to burn and the minimum amounts of each asset to receive.
|
|
2228
|
+
*
|
|
2229
|
+
* Parameters:
|
|
2230
|
+
* - `origin`: The liquidity provider.
|
|
2231
|
+
* - `pool_id`: The ID of the pool from which to remove liquidity.
|
|
2232
|
+
* - `share_amount`: The amount of shares to burn.
|
|
2233
|
+
* - `min_amounts_out`: A bounded vector specifying the minimum amounts of each asset to receive.
|
|
2234
|
+
*
|
|
2235
|
+
* Emits `LiquidityRemoved` event when successful.
|
|
2236
|
+
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
2237
|
+
*
|
|
2238
|
+
* # Errors
|
|
2239
|
+
* - `InvalidAssetAmount`: If the `share_amount` is zero.
|
|
2240
|
+
* - `InsufficientShares`: If the provider does not have enough shares.
|
|
2241
|
+
* - `PoolNotFound`: If the specified pool does not exist.
|
|
2242
|
+
* - `UnknownDecimals`: If the asset decimals cannot be retrieved.
|
|
2243
|
+
* - `IncorrectAssets`: If the provided `min_amounts_out` does not match the pool assets.
|
|
2244
|
+
* - `NotAllowed`: If the asset is not allowed for the operation.
|
|
2245
|
+
* - `SlippageLimit`: If the amount received is less than the specified minimum amount.
|
|
2246
|
+
* - `InsufficientLiquidityRemaining`: If the remaining liquidity in the pool is below the minimum required.
|
|
2247
|
+
*
|
|
2248
|
+
* # Invariants
|
|
2249
|
+
* - Ensures that the pool's reserves are updated correctly after liquidity removal.
|
|
2250
|
+
* - Ensures that the pool's invariant is maintained.
|
|
2251
|
+
*/
|
|
2252
|
+
remove_liquidity: TxDescriptor<Anonymize<I2d6orhhgh5et2>>;
|
|
2253
|
+
/**
|
|
2254
|
+
* Create a stable pool with a given list of assets and pegs.
|
|
2255
|
+
*
|
|
2256
|
+
* This function allows the creation of a new stable pool with specified assets, amplification, fee, and peg sources. The pool is identified by a share asset.
|
|
2257
|
+
*
|
|
2258
|
+
* Peg target price is determined by retrieving the target peg from the oracle - it is the price of the asset from the peg sourcedenominated in the other pool assets.
|
|
2259
|
+
*
|
|
2260
|
+
* Parameters:
|
|
2261
|
+
* - `origin`: Must be `T::AuthorityOrigin`.
|
|
2262
|
+
* - `share_asset`: Preregistered share asset identifier.
|
|
2263
|
+
* - `assets`: List of asset IDs to be included in the pool.
|
|
2264
|
+
* - `amplification`: Pool amplification parameter.
|
|
2265
|
+
* - `fee`: Fee to be applied on trade and liquidity operations.
|
|
2266
|
+
* - `peg_source`: Bounded vector specifying the source of the peg for each asset.
|
|
2267
|
+
* - `max_peg_update`: Maximum allowed peg update per block.
|
|
2268
|
+
*
|
|
2269
|
+
* Emits `PoolCreated` event if successful.
|
|
2270
|
+
* Emits `AmplificationChanging` event if successful.
|
|
2271
|
+
*
|
|
2272
|
+
* # Errors
|
|
2273
|
+
* - `IncorrectAssets`: If the assets are the same or less than 2 assets are provided.
|
|
2274
|
+
* - `MaxAssetsExceeded`: If the maximum number of assets is exceeded.
|
|
2275
|
+
* - `PoolExists`: If a pool with the given assets already exists.
|
|
2276
|
+
* - `ShareAssetInPoolAssets`: If the share asset is among the pool assets.
|
|
2277
|
+
* - `AssetNotRegistered`: If one or more assets are not registered in the AssetRegistry.
|
|
2278
|
+
* - `InvalidAmplification`: If the amplification parameter is invalid.
|
|
2279
|
+
* - `IncorrectInitialPegs`: If the initial pegs are incorrect.
|
|
2280
|
+
* - `MissingTargetPegOracle`: If the target peg oracle entry is missing.
|
|
2281
|
+
* - `IncorrectAssetDecimals`: If the assets have different decimals.
|
|
2282
|
+
*
|
|
2283
|
+
*/
|
|
2284
|
+
create_pool_with_pegs: TxDescriptor<Anonymize<I8ij5e2p0aqu6i>>;
|
|
2285
|
+
/**
|
|
2286
|
+
* Add liquidity to selected pool.
|
|
2287
|
+
*
|
|
2288
|
+
* First call of `add_assets_liquidity` must provide "initial liquidity" of all assets.
|
|
2289
|
+
*
|
|
2290
|
+
* If there is liquidity already in the pool, LP can provide liquidity of any number of pool assets.
|
|
2291
|
+
*
|
|
2292
|
+
* LP must have sufficient amount of each asset.
|
|
2293
|
+
*
|
|
2294
|
+
* Origin is given corresponding amount of shares.
|
|
2295
|
+
*
|
|
2296
|
+
* Parameters:
|
|
2297
|
+
* - `origin`: liquidity provider
|
|
2298
|
+
* - `pool_id`: Pool Id
|
|
2299
|
+
* - `assets`: asset id and liquidity amount provided
|
|
2300
|
+
* - `min_shares`: minimum amount of shares to receive
|
|
2301
|
+
*
|
|
2302
|
+
* Emits `LiquidityAdded` event when successful.
|
|
2303
|
+
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
2304
|
+
*/
|
|
2305
|
+
add_assets_liquidity: TxDescriptor<Anonymize<Ijqmlm7h71nc1>>;
|
|
2306
|
+
/**
|
|
2307
|
+
* Update the peg source for a specific asset in a pool.
|
|
2308
|
+
*
|
|
2309
|
+
* This function allows updating the peg source for an asset within a pool.
|
|
2310
|
+
* The pool must exist and have pegs configured. The asset must be part of the pool.
|
|
2311
|
+
* The current price is always preserved when updating the peg source.
|
|
2312
|
+
*
|
|
2313
|
+
* Parameters:
|
|
2314
|
+
* - `origin`: Must be `T::AuthorityOrigin`.
|
|
2315
|
+
* - `pool_id`: The ID of the pool containing the asset.
|
|
2316
|
+
* - `asset_id`: The ID of the asset whose peg source is to be updated.
|
|
2317
|
+
* - `peg_source`: The new peg source for the asset.
|
|
2318
|
+
*
|
|
2319
|
+
* Emits `PoolPegSourceUpdated` event when successful.
|
|
2320
|
+
*
|
|
2321
|
+
* # Errors
|
|
2322
|
+
* - `PoolNotFound`: If the specified pool does not exist.
|
|
2323
|
+
* - `NoPegSource`: If the pool does not have pegs configured.
|
|
2324
|
+
* - `AssetNotInPool`: If the specified asset is not part of the pool.
|
|
2325
|
+
*
|
|
2326
|
+
*/
|
|
2327
|
+
update_asset_peg_source: TxDescriptor<Anonymize<Ibmmi1tbvqjkf9>>;
|
|
2328
|
+
/**
|
|
2329
|
+
* Update the maximum peg update percentage for a pool.
|
|
2330
|
+
*
|
|
2331
|
+
* This function allows updating the maximum percentage by which peg values
|
|
2332
|
+
* can change in a pool with pegs configured.
|
|
2333
|
+
*
|
|
2334
|
+
* Parameters:
|
|
2335
|
+
* - `origin`: Must be `T::AuthorityOrigin`.
|
|
2336
|
+
* - `pool_id`: The ID of the pool to update.
|
|
2337
|
+
* - `max_peg_update`: The new maximum peg update percentage.
|
|
2338
|
+
*
|
|
2339
|
+
* Emits `PoolMaxPegUpdateUpdated` event when successful.
|
|
2340
|
+
*
|
|
2341
|
+
* # Errors
|
|
2342
|
+
* - `PoolNotFound`: If the specified pool does not exist.
|
|
2343
|
+
* - `NoPegSource`: If the pool does not have pegs configured.
|
|
2344
|
+
*
|
|
2345
|
+
*/
|
|
2346
|
+
update_pool_max_peg_update: TxDescriptor<Anonymize<I4f24vd3pvt9k>>;
|
|
2347
|
+
};
|
|
2348
|
+
XYK: {
|
|
2349
|
+
/**
|
|
2350
|
+
* Create new pool for given asset pair.
|
|
2351
|
+
*
|
|
2352
|
+
* Registers new pool for given asset pair (`asset a` and `asset b`) in asset registry.
|
|
2353
|
+
* Asset registry creates new id or returns previously created one if such pool existed before.
|
|
2354
|
+
*
|
|
2355
|
+
* Pool is created with initial liquidity provided by `origin`.
|
|
2356
|
+
* Shares are issued with specified initial price and represents proportion of asset in the pool.
|
|
2357
|
+
*
|
|
2358
|
+
* Emits `PoolCreated` event when successful.
|
|
2359
|
+
*/
|
|
2360
|
+
create_pool: TxDescriptor<Anonymize<Icjk91npopm3h9>>;
|
|
2361
|
+
/**
|
|
2362
|
+
* Add liquidity to previously created asset pair pool.
|
|
2363
|
+
*
|
|
2364
|
+
* Shares are issued with current price.
|
|
2365
|
+
*
|
|
2366
|
+
* Emits `LiquidityAdded` event when successful.
|
|
2367
|
+
*/
|
|
2368
|
+
add_liquidity: TxDescriptor<Anonymize<Ie03o0h06lol9p>>;
|
|
2369
|
+
/**
|
|
2370
|
+
|
|
2371
|
+
*/
|
|
2372
|
+
add_liquidity_with_limits: TxDescriptor<Anonymize<I1ko6jcqv0sqm4>>;
|
|
2373
|
+
/**
|
|
2374
|
+
* Remove liquidity from specific liquidity pool in the form of burning shares.
|
|
2375
|
+
*
|
|
2376
|
+
* If liquidity in the pool reaches 0, it is destroyed.
|
|
2377
|
+
*
|
|
2378
|
+
* Emits 'LiquidityRemoved' when successful.
|
|
2379
|
+
* Emits 'PoolDestroyed' when pool is destroyed.
|
|
2380
|
+
*/
|
|
2381
|
+
remove_liquidity: TxDescriptor<Anonymize<I6a1eig522s2p0>>;
|
|
2382
|
+
/**
|
|
2383
|
+
|
|
2384
|
+
*/
|
|
2385
|
+
remove_liquidity_with_limits: TxDescriptor<Anonymize<I7mcjnqos9shs1>>;
|
|
2386
|
+
/**
|
|
2387
|
+
* Trade asset in for asset out.
|
|
2388
|
+
*
|
|
2389
|
+
* Executes a swap of `asset_in` for `asset_out`. Price is determined by the liquidity pool.
|
|
2390
|
+
*
|
|
2391
|
+
* `max_limit` - minimum amount of `asset_out` / amount of asset_out to be obtained from the pool in exchange for `asset_in`.
|
|
2392
|
+
*
|
|
2393
|
+
* Emits `SellExecuted` when successful. Deprecated.
|
|
2394
|
+
* Emits `pallet_broadcast::Swapped` when successful.
|
|
2395
|
+
*/
|
|
2396
|
+
sell: TxDescriptor<Anonymize<I6ap0qjh5n5817>>;
|
|
2397
|
+
/**
|
|
2398
|
+
* Trade asset in for asset out.
|
|
2399
|
+
*
|
|
2400
|
+
* Executes a swap of `asset_in` for `asset_out`. Price is determined by the liquidity pool.
|
|
2401
|
+
*
|
|
2402
|
+
* `max_limit` - maximum amount of `asset_in` to be sold in exchange for `asset_out`.
|
|
2403
|
+
* Emits `BuyExecuted` when successful. Deprecated.
|
|
2404
|
+
* Emits `pallet_broadcast::Swapped` when successful.
|
|
2405
|
+
*/
|
|
2406
|
+
buy: TxDescriptor<Anonymize<I6ap0qjh5n5817>>;
|
|
2407
|
+
};
|
|
2408
|
+
Referrals: {
|
|
2409
|
+
/**
|
|
2410
|
+
* Register new referral code.
|
|
2411
|
+
*
|
|
2412
|
+
* `origin` pays the registration fee.
|
|
2413
|
+
* `code` is assigned to the given `account`.
|
|
2414
|
+
*
|
|
2415
|
+
* Length of the `code` must be at least `T::MinCodeLength`.
|
|
2416
|
+
* Maximum length is limited to `T::CodeLength`.
|
|
2417
|
+
* `code` must contain only alfa-numeric characters and all characters will be converted to upper case.
|
|
2418
|
+
*
|
|
2419
|
+
* Parameters:
|
|
2420
|
+
* - `code`: Code to register. Must follow the restrictions.
|
|
2421
|
+
*
|
|
2422
|
+
* Emits `CodeRegistered` event when successful.
|
|
2423
|
+
*/
|
|
2424
|
+
register_code: TxDescriptor<Anonymize<I6pjjpfvhvcfru>>;
|
|
2425
|
+
/**
|
|
2426
|
+
* Link a code to an account.
|
|
2427
|
+
*
|
|
2428
|
+
* `Code` must be valid registered code. Otherwise `InvalidCode` is returned.
|
|
2429
|
+
*
|
|
2430
|
+
* Signer account is linked to the referral account of the code.
|
|
2431
|
+
*
|
|
2432
|
+
* Parameters:
|
|
2433
|
+
* - `code`: Code to use to link the signer account to.
|
|
2434
|
+
*
|
|
2435
|
+
* Emits `CodeLinked` event when successful.
|
|
2436
|
+
*/
|
|
2437
|
+
link_code: TxDescriptor<Anonymize<I6pjjpfvhvcfru>>;
|
|
2438
|
+
/**
|
|
2439
|
+
* Convert accrued asset amount to reward currency.
|
|
2440
|
+
*
|
|
2441
|
+
* Parameters:
|
|
2442
|
+
* - `asset_id`: Id of an asset to convert to RewardAsset.
|
|
2443
|
+
*
|
|
2444
|
+
* Emits `Converted` event when successful.
|
|
2445
|
+
*/
|
|
2446
|
+
convert: TxDescriptor<Anonymize<Ia5le7udkgbaq9>>;
|
|
2447
|
+
/**
|
|
2448
|
+
* Claim accumulated rewards
|
|
2449
|
+
*
|
|
2450
|
+
* IF there is any asset in the reward pot, all is converted to RewardCurrency first.
|
|
2451
|
+
*
|
|
2452
|
+
* Reward amount is calculated based on the shares of the signer account.
|
|
2453
|
+
*
|
|
2454
|
+
* if the signer account is referrer account, total accumulated rewards is updated as well as referrer level if reached.
|
|
2455
|
+
*
|
|
2456
|
+
* Emits `Claimed` event when successful.
|
|
2457
|
+
*/
|
|
2458
|
+
claim_rewards: TxDescriptor<undefined>;
|
|
2459
|
+
/**
|
|
2460
|
+
* Set asset reward percentages
|
|
2461
|
+
*
|
|
2462
|
+
* Parameters:
|
|
2463
|
+
* - `asset_id`: asset id
|
|
2464
|
+
* - `level`: level
|
|
2465
|
+
* - `rewards`: reward fee percentages
|
|
2466
|
+
*
|
|
2467
|
+
* Emits `AssetRewardsUpdated` event when successful.
|
|
2468
|
+
*/
|
|
2469
|
+
set_reward_percentage: TxDescriptor<Anonymize<Ionfhf9va2t31>>;
|
|
2470
|
+
};
|
|
2471
|
+
Tokens: {
|
|
2472
|
+
/**
|
|
2473
|
+
* Transfer some liquid free balance to another account.
|
|
2474
|
+
*
|
|
2475
|
+
* `transfer` will set the `FreeBalance` of the sender and receiver.
|
|
2476
|
+
* It will decrease the total issuance of the system by the
|
|
2477
|
+
* `TransferFee`. If the sender's account is below the existential
|
|
2478
|
+
* deposit as a result of the transfer, the account will be reaped.
|
|
2479
|
+
*
|
|
2480
|
+
* The dispatch origin for this call must be `Signed` by the
|
|
2481
|
+
* transactor.
|
|
2482
|
+
*
|
|
2483
|
+
* - `dest`: The recipient of the transfer.
|
|
2484
|
+
* - `currency_id`: currency type.
|
|
2485
|
+
* - `amount`: free balance amount to tranfer.
|
|
2486
|
+
*/
|
|
2487
|
+
transfer: TxDescriptor<Anonymize<Ibbvcet1pv1l61>>;
|
|
2488
|
+
/**
|
|
2489
|
+
* Transfer all remaining balance to the given account.
|
|
2490
|
+
*
|
|
2491
|
+
* NOTE: This function only attempts to transfer _transferable_
|
|
2492
|
+
* balances. This means that any locked, reserved, or existential
|
|
2493
|
+
* deposits (when `keep_alive` is `true`), will not be transferred by
|
|
2494
|
+
* this function. To ensure that this function results in a killed
|
|
2495
|
+
* account, you might need to prepare the account by removing any
|
|
2496
|
+
* reference counters, storage deposits, etc...
|
|
2497
|
+
*
|
|
2498
|
+
* The dispatch origin for this call must be `Signed` by the
|
|
2499
|
+
* transactor.
|
|
2500
|
+
*
|
|
2501
|
+
* - `dest`: The recipient of the transfer.
|
|
2502
|
+
* - `currency_id`: currency type.
|
|
2503
|
+
* - `keep_alive`: A boolean to determine if the `transfer_all`
|
|
2504
|
+
* operation should send all of the funds the account has, causing
|
|
2505
|
+
* the sender account to be killed (false), or transfer everything
|
|
2506
|
+
* except at least the existential deposit, which will guarantee to
|
|
2507
|
+
* keep the sender account alive (true).
|
|
2508
|
+
*/
|
|
2509
|
+
transfer_all: TxDescriptor<Anonymize<I67bpqa7o2ocua>>;
|
|
2510
|
+
/**
|
|
2511
|
+
* Same as the [`transfer`] call, but with a check that the transfer
|
|
2512
|
+
* will not kill the origin account.
|
|
2513
|
+
*
|
|
2514
|
+
* 99% of the time you want [`transfer`] instead.
|
|
2515
|
+
*
|
|
2516
|
+
* The dispatch origin for this call must be `Signed` by the
|
|
2517
|
+
* transactor.
|
|
2518
|
+
*
|
|
2519
|
+
* - `dest`: The recipient of the transfer.
|
|
2520
|
+
* - `currency_id`: currency type.
|
|
2521
|
+
* - `amount`: free balance amount to tranfer.
|
|
2522
|
+
*/
|
|
2523
|
+
transfer_keep_alive: TxDescriptor<Anonymize<Ibbvcet1pv1l61>>;
|
|
2524
|
+
/**
|
|
2525
|
+
* Exactly as `transfer`, except the origin must be root and the source
|
|
2526
|
+
* account may be specified.
|
|
2527
|
+
*
|
|
2528
|
+
* The dispatch origin for this call must be _Root_.
|
|
2529
|
+
*
|
|
2530
|
+
* - `source`: The sender of the transfer.
|
|
2531
|
+
* - `dest`: The recipient of the transfer.
|
|
2532
|
+
* - `currency_id`: currency type.
|
|
2533
|
+
* - `amount`: free balance amount to tranfer.
|
|
2534
|
+
*/
|
|
2535
|
+
force_transfer: TxDescriptor<Anonymize<I2holodggoluon>>;
|
|
2536
|
+
/**
|
|
2537
|
+
* Set the balances of a given account.
|
|
2538
|
+
*
|
|
2539
|
+
* This will alter `FreeBalance` and `ReservedBalance` in storage. it
|
|
2540
|
+
* will also decrease the total issuance of the system
|
|
2541
|
+
* (`TotalIssuance`). If the new free or reserved balance is below the
|
|
2542
|
+
* existential deposit, it will reap the `AccountInfo`.
|
|
2543
|
+
*
|
|
2544
|
+
* The dispatch origin for this call is `root`.
|
|
2545
|
+
*/
|
|
2546
|
+
set_balance: TxDescriptor<Anonymize<Ib5umq5uf644jr>>;
|
|
2547
|
+
};
|
|
2548
|
+
Currencies: {
|
|
2549
|
+
/**
|
|
2550
|
+
* Transfer some balance to another account under `currency_id`.
|
|
2551
|
+
*
|
|
2552
|
+
* The dispatch origin for this call must be `Signed` by the
|
|
2553
|
+
* transactor.
|
|
2554
|
+
*/
|
|
2555
|
+
transfer: TxDescriptor<Anonymize<Ibbvcet1pv1l61>>;
|
|
2556
|
+
/**
|
|
2557
|
+
* Transfer some native currency to another account.
|
|
2558
|
+
*
|
|
2559
|
+
* The dispatch origin for this call must be `Signed` by the
|
|
2560
|
+
* transactor.
|
|
2561
|
+
*/
|
|
2562
|
+
transfer_native_currency: TxDescriptor<Anonymize<I9r83fr4b3rmmj>>;
|
|
2563
|
+
/**
|
|
2564
|
+
* update amount of account `who` under `currency_id`.
|
|
2565
|
+
*
|
|
2566
|
+
* The dispatch origin of this call must be _Root_.
|
|
2567
|
+
*/
|
|
2568
|
+
update_balance: TxDescriptor<Anonymize<I24s4g6gkj5oec>>;
|
|
2569
|
+
};
|
|
2570
|
+
EVM: {
|
|
2571
|
+
/**
|
|
2572
|
+
* Withdraw balance from EVM into currency/balances pallet.
|
|
2573
|
+
*/
|
|
2574
|
+
withdraw: TxDescriptor<Anonymize<Idcabvplu05lea>>;
|
|
2575
|
+
/**
|
|
2576
|
+
* Issue an EVM call operation. This is similar to a message call transaction in Ethereum.
|
|
2577
|
+
*/
|
|
2578
|
+
call: TxDescriptor<Anonymize<I2ncccle6pmhd9>>;
|
|
2579
|
+
/**
|
|
2580
|
+
* Issue an EVM create operation. This is similar to a contract creation transaction in
|
|
2581
|
+
* Ethereum.
|
|
2582
|
+
*/
|
|
2583
|
+
create: TxDescriptor<Anonymize<I92bnd3pe0civj>>;
|
|
2584
|
+
/**
|
|
2585
|
+
* Issue an EVM create2 operation.
|
|
2586
|
+
*/
|
|
2587
|
+
create2: TxDescriptor<Anonymize<Ic84i538n8bl8j>>;
|
|
2588
|
+
};
|
|
2589
|
+
EVMAccounts: {
|
|
2590
|
+
/**
|
|
2591
|
+
* Binds a Substrate address to EVM address.
|
|
2592
|
+
* After binding, the EVM is able to convert an EVM address to the original Substrate address.
|
|
2593
|
+
* Without binding, the EVM converts an EVM address to a truncated Substrate address, which doesn't correspond
|
|
2594
|
+
* to the origin address.
|
|
2595
|
+
*
|
|
2596
|
+
* Binding an address is not necessary for interacting with the EVM.
|
|
2597
|
+
*
|
|
2598
|
+
* Parameters:
|
|
2599
|
+
* - `origin`: Substrate account binding an address
|
|
2600
|
+
*
|
|
2601
|
+
* Emits `EvmAccountBound` event when successful.
|
|
2602
|
+
*/
|
|
2603
|
+
bind_evm_address: TxDescriptor<undefined>;
|
|
2604
|
+
/**
|
|
2605
|
+
* Adds an EVM address to the list of addresses that are allowed to deploy smart contracts.
|
|
2606
|
+
*
|
|
2607
|
+
* Parameters:
|
|
2608
|
+
* - `origin`: Substrate account whitelisting an address. Must be `ControllerOrigin`.
|
|
2609
|
+
* - `address`: EVM address that is whitelisted
|
|
2610
|
+
*
|
|
2611
|
+
* Emits `DeployerAdded` event when successful.
|
|
2612
|
+
*/
|
|
2613
|
+
add_contract_deployer: TxDescriptor<Anonymize<Itmchvgqfl28g>>;
|
|
2614
|
+
/**
|
|
2615
|
+
* Removes an EVM address from the list of addresses that are allowed to deploy smart contracts.
|
|
2616
|
+
*
|
|
2617
|
+
* Parameters:
|
|
2618
|
+
* - `origin`: Substrate account removing the EVM address from the whitelist. Must be `ControllerOrigin`.
|
|
2619
|
+
* - `address`: EVM address that is removed from the whitelist
|
|
2620
|
+
*
|
|
2621
|
+
* Emits `DeployerRemoved` event when successful.
|
|
2622
|
+
*/
|
|
2623
|
+
remove_contract_deployer: TxDescriptor<Anonymize<Itmchvgqfl28g>>;
|
|
2624
|
+
/**
|
|
2625
|
+
* Removes the account's EVM address from the list of addresses that are allowed to deploy smart contracts.
|
|
2626
|
+
* Based on the best practices, this extrinsic can be called by any whitelisted account to renounce their own permission.
|
|
2627
|
+
*
|
|
2628
|
+
* Parameters:
|
|
2629
|
+
* - `origin`: Substrate account removing their EVM address from the whitelist.
|
|
2630
|
+
*
|
|
2631
|
+
* Emits `DeployerRemoved` event when successful.
|
|
2632
|
+
*/
|
|
2633
|
+
renounce_contract_deployer: TxDescriptor<undefined>;
|
|
2634
|
+
/**
|
|
2635
|
+
* Adds address of the contract to the list of approved contracts to manage balances.
|
|
2636
|
+
*
|
|
2637
|
+
* Effectively giving it allowance to for any balances and tokens.
|
|
2638
|
+
*
|
|
2639
|
+
* Parameters:
|
|
2640
|
+
* - `origin`: Must be `ControllerOrigin`.
|
|
2641
|
+
* - `address`: Contract address that will be approved
|
|
2642
|
+
*
|
|
2643
|
+
* Emits `ContractApproved` event when successful.
|
|
2644
|
+
*/
|
|
2645
|
+
approve_contract: TxDescriptor<Anonymize<Itmchvgqfl28g>>;
|
|
2646
|
+
/**
|
|
2647
|
+
* Removes address of the contract from the list of approved contracts to manage balances.
|
|
616
2648
|
*
|
|
617
|
-
*
|
|
2649
|
+
* Parameters:
|
|
2650
|
+
* - `origin`: Must be `ControllerOrigin`.
|
|
2651
|
+
* - `address`: Contract address that will be disapproved
|
|
618
2652
|
*
|
|
619
|
-
* Emits `
|
|
2653
|
+
* Emits `ContractDisapproved` event when successful.
|
|
620
2654
|
*/
|
|
621
|
-
|
|
2655
|
+
disapprove_contract: TxDescriptor<Anonymize<Itmchvgqfl28g>>;
|
|
2656
|
+
};
|
|
2657
|
+
XYKLiquidityMining: {
|
|
622
2658
|
/**
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
* Price is determined by the Omnipool.
|
|
2659
|
+
* Create new liquidity mining program with provided parameters.
|
|
626
2660
|
*
|
|
627
|
-
*
|
|
2661
|
+
* `owner` account has to have at least `total_rewards` balance. This fund will be
|
|
2662
|
+
* transferred from `owner` to farm account.
|
|
2663
|
+
* In case of `reward_currency` is insufficient asset, farm's `owner` has to pay existential
|
|
2664
|
+
* deposit for global farm account and for liquidity mining `pot` account.
|
|
628
2665
|
*
|
|
629
|
-
*
|
|
2666
|
+
* The dispatch origin for this call must be `T::CreateOrigin`.
|
|
2667
|
+
* !!!WARN: `T::CreateOrigin` has power over funds of `owner`'s account and it should be
|
|
2668
|
+
* configured to trusted origin e.g Sudo or Governance.
|
|
630
2669
|
*
|
|
631
2670
|
* Parameters:
|
|
632
|
-
* - `
|
|
633
|
-
* - `
|
|
634
|
-
*
|
|
635
|
-
* - `
|
|
2671
|
+
* - `origin`: global farm's owner.
|
|
2672
|
+
* - `total_rewards`: total rewards planned to distribute. This rewards will be
|
|
2673
|
+
* distributed between all yield farms in the global farm.
|
|
2674
|
+
* - `planned_yielding_periods`: planned number of periods to distribute `total_rewards`.
|
|
2675
|
+
* WARN: THIS IS NOT HARD DEADLINE. Not all rewards have to be distributed in
|
|
2676
|
+
* `planned_yielding_periods`. Rewards are distributed based on the situation in the yield
|
|
2677
|
+
* farms and can be distributed in a longer time frame but never in the shorter time frame.
|
|
2678
|
+
* - `blocks_per_period`: number of blocks in a single period. Min. number of blocks per
|
|
2679
|
+
* period is 1.
|
|
2680
|
+
* - `incentivized_asset`: asset to be incentivized in XYK pools. All yield farms added into
|
|
2681
|
+
* liq. mining program have to have `incentivized_asset` in their pair.
|
|
2682
|
+
* - `reward_currency`: payoff currency of rewards.
|
|
2683
|
+
* - `owner`: liq. mining program owner.
|
|
2684
|
+
* - `yield_per_period`: percentage return on `reward_currency` of all farms p.a.
|
|
2685
|
+
* - `min_deposit`: minimum amount which can be deposited to the farm
|
|
2686
|
+
* - `price_adjustment`:
|
|
2687
|
+
* Emits `GlobalFarmCreated` event when successful.
|
|
2688
|
+
*/
|
|
2689
|
+
create_global_farm: TxDescriptor<Anonymize<I10hmgseei3j6r>>;
|
|
2690
|
+
/**
|
|
2691
|
+
* Update global farm's prices adjustment.
|
|
2692
|
+
*
|
|
2693
|
+
* Only farm's owner can perform this action.
|
|
636
2694
|
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
2695
|
+
* Parameters:
|
|
2696
|
+
* - `origin`: global farm's owner.
|
|
2697
|
+
* - `global_farm_id`: id of the global farm to update
|
|
2698
|
+
* - `price_adjustment`: new value for price adjustment
|
|
639
2699
|
*
|
|
2700
|
+
* Emits `GlobalFarmUpdated` event when successful.
|
|
640
2701
|
*/
|
|
641
|
-
|
|
2702
|
+
update_global_farm: TxDescriptor<Anonymize<I8p4numg1r4ojm>>;
|
|
642
2703
|
/**
|
|
643
|
-
*
|
|
2704
|
+
* Terminate existing liq. mining program.
|
|
644
2705
|
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
* Hub asset is traded separately.
|
|
2706
|
+
* Only farm owner can perform this action.
|
|
648
2707
|
*
|
|
649
|
-
*
|
|
2708
|
+
* WARN: To successfully terminate a farm, farm have to be empty(all yield farms in he global farm must be terminated).
|
|
650
2709
|
*
|
|
651
2710
|
* Parameters:
|
|
652
|
-
* - `
|
|
653
|
-
* - `
|
|
654
|
-
* - `amount`: Amount of asset sold
|
|
655
|
-
* - `max_sell_amount`: Maximum amount to be sold.
|
|
656
|
-
*
|
|
657
|
-
* Emits `BuyExecuted` event when successful. Deprecated.
|
|
658
|
-
* Emits `pallet_broadcast::Swapped` event when successful.
|
|
2711
|
+
* - `origin`: global farm's owner.
|
|
2712
|
+
* - `global_farm_id`: id of global farm to be terminated.
|
|
659
2713
|
*
|
|
2714
|
+
* Emits `GlobalFarmTerminated` event when successful.
|
|
660
2715
|
*/
|
|
661
|
-
|
|
2716
|
+
terminate_global_farm: TxDescriptor<Anonymize<I9q8qmop6bko5m>>;
|
|
662
2717
|
/**
|
|
663
|
-
*
|
|
2718
|
+
* Add yield farm for given `asset_pair` XYK pool.
|
|
664
2719
|
*
|
|
665
|
-
*
|
|
666
|
-
* - `asset_id`: asset id
|
|
667
|
-
* - `state`: new state
|
|
2720
|
+
* Only farm owner can perform this action.
|
|
668
2721
|
*
|
|
669
|
-
*
|
|
2722
|
+
* Only XYKs with `asset_pair` with `incentivized_asset` can be added into the farm. XYK
|
|
2723
|
+
* pool for `asset_pair` has to exist to successfully create yield farm.
|
|
2724
|
+
* Yield farm for same `asset_pair` can exist only once in the global farm.
|
|
2725
|
+
*
|
|
2726
|
+
* Parameters:
|
|
2727
|
+
* - `origin`: global farm's owner.
|
|
2728
|
+
* - `farm_id`: global farm id to which a yield farm will be added.
|
|
2729
|
+
* - `asset_pair`: asset pair identifying yield farm. Liq. mining will be allowed for this
|
|
2730
|
+
* `asset_pair` and one of the assets in the pair must be `incentivized_asset`.
|
|
2731
|
+
* - `multiplier`: yield farm multiplier.
|
|
2732
|
+
* - `loyalty_curve`: curve to calculate loyalty multiplier to distribute rewards to users
|
|
2733
|
+
* with time incentive. `None` means no loyalty multiplier.
|
|
670
2734
|
*
|
|
2735
|
+
* Emits `YieldFarmCreated` event when successful.
|
|
671
2736
|
*/
|
|
672
|
-
|
|
2737
|
+
create_yield_farm: TxDescriptor<Anonymize<Idtucog650c7f8>>;
|
|
673
2738
|
/**
|
|
674
|
-
*
|
|
675
|
-
*
|
|
676
|
-
* A refund is needed when a token is refused to be added to Omnipool, and initial liquidity of the asset has been already transferred to pool's account.
|
|
2739
|
+
* Update yield farm multiplier.
|
|
677
2740
|
*
|
|
678
|
-
*
|
|
2741
|
+
* Only farm owner can perform this action.
|
|
679
2742
|
*
|
|
680
|
-
*
|
|
2743
|
+
* Parameters:
|
|
2744
|
+
* - `origin`: global farm's owner.
|
|
2745
|
+
* - `global_farm_id`: global farm id in which yield farm will be updated.
|
|
2746
|
+
* - `asset_pair`: asset pair identifying yield farm in global farm.
|
|
2747
|
+
* - `multiplier`: new yield farm multiplier.
|
|
681
2748
|
*
|
|
682
|
-
* Emits `
|
|
2749
|
+
* Emits `YieldFarmUpdated` event when successful.
|
|
683
2750
|
*/
|
|
684
|
-
|
|
2751
|
+
update_yield_farm: TxDescriptor<Anonymize<I4kvfua9fqrpi2>>;
|
|
685
2752
|
/**
|
|
686
|
-
*
|
|
2753
|
+
* Stop liq. miming for specific yield farm.
|
|
687
2754
|
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
*
|
|
2755
|
+
* This function claims rewards from `GlobalFarm` last time and stops yield farm
|
|
2756
|
+
* incentivization from a `GlobalFarm`. Users will be able to only withdraw
|
|
2757
|
+
* shares(with claiming) after calling this function.
|
|
2758
|
+
* `deposit_shares()` and `claim_rewards()` are not allowed on canceled yield farm.
|
|
691
2759
|
*
|
|
692
|
-
*
|
|
2760
|
+
* Only farm owner can perform this action.
|
|
2761
|
+
*
|
|
2762
|
+
* Parameters:
|
|
2763
|
+
* - `origin`: global farm's owner.
|
|
2764
|
+
* - `global_farm_id`: farm id in which yield farm will be canceled.
|
|
2765
|
+
* - `asset_pair`: asset pair identifying yield farm in the farm.
|
|
693
2766
|
*
|
|
2767
|
+
* Emits `YieldFarmStopped` event when successful.
|
|
694
2768
|
*/
|
|
695
|
-
|
|
2769
|
+
stop_yield_farm: TxDescriptor<Anonymize<I7t5blhj97u8r7>>;
|
|
696
2770
|
/**
|
|
697
|
-
*
|
|
2771
|
+
* Resume yield farm for stopped yield farm.
|
|
698
2772
|
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
2773
|
+
* This function resume incentivization from `GlobalFarm` and restore full functionality
|
|
2774
|
+
* for yield farm. Users will be able to deposit, claim and withdraw again.
|
|
701
2775
|
*
|
|
702
|
-
*
|
|
2776
|
+
* WARN: Yield farm is NOT rewarded for time it was stopped.
|
|
703
2777
|
*
|
|
704
|
-
*
|
|
2778
|
+
* Only farm owner can perform this action.
|
|
705
2779
|
*
|
|
706
|
-
*
|
|
2780
|
+
* Parameters:
|
|
2781
|
+
* - `origin`: global farm's owner.
|
|
2782
|
+
* - `global_farm_id`: global farm id in which yield farm will be resumed.
|
|
2783
|
+
* - `yield_farm_id`: id of yield farm to be resumed.
|
|
2784
|
+
* - `asset_pair`: asset pair identifying yield farm in global farm.
|
|
2785
|
+
* - `multiplier`: yield farm multiplier in the farm.
|
|
707
2786
|
*
|
|
2787
|
+
* Emits `YieldFarmResumed` event when successful.
|
|
708
2788
|
*/
|
|
709
|
-
|
|
2789
|
+
resume_yield_farm: TxDescriptor<Anonymize<I21qpgggberqt3>>;
|
|
710
2790
|
/**
|
|
711
|
-
*
|
|
2791
|
+
* Remove yield farm
|
|
712
2792
|
*
|
|
713
|
-
*
|
|
2793
|
+
* This function marks a yield farm as ready to be removed from storage when it's empty. Users will
|
|
2794
|
+
* be able to only withdraw shares(without claiming rewards from yield farm). Unpaid rewards
|
|
2795
|
+
* will be transferred back to global farm and will be used to distribute to other yield farms.
|
|
714
2796
|
*
|
|
715
|
-
*
|
|
2797
|
+
* Yield farm must be stopped before calling this function.
|
|
716
2798
|
*
|
|
717
|
-
*
|
|
2799
|
+
* Only global farm's owner can perform this action. Yield farm stays in the storage until it's
|
|
2800
|
+
* empty(all farm entries are withdrawn). Last withdrawn from yield farm trigger removing from
|
|
2801
|
+
* the storage.
|
|
718
2802
|
*
|
|
719
|
-
*
|
|
2803
|
+
* Parameters:
|
|
2804
|
+
* - `origin`: global farm's owner.
|
|
2805
|
+
* - `global_farm_id`: farm id from which yield farm should be terminated.
|
|
2806
|
+
* - `yield_farm_id`: id of yield farm to be terminated.
|
|
2807
|
+
* - `asset_pair`: asset pair identifying yield farm in the global farm.
|
|
720
2808
|
*
|
|
721
|
-
* Emits `
|
|
2809
|
+
* Emits `YieldFarmTerminated` event when successful.
|
|
722
2810
|
*/
|
|
723
|
-
|
|
724
|
-
};
|
|
725
|
-
Router: {
|
|
2811
|
+
terminate_yield_farm: TxDescriptor<Anonymize<Id7r4m9aulb7sn>>;
|
|
726
2812
|
/**
|
|
727
|
-
*
|
|
728
|
-
* The price for each trade is determined by the corresponding AMM.
|
|
2813
|
+
* Deposit LP shares to a liq. mining.
|
|
729
2814
|
*
|
|
730
|
-
*
|
|
731
|
-
*
|
|
732
|
-
* - `asset_out`: The identifier of the asset to receive
|
|
733
|
-
* - `amount_in`: The amount of `asset_in` to sell
|
|
734
|
-
* - `min_amount_out`: The minimum amount of `asset_out` to receive.
|
|
735
|
-
* - `route`: Series of [`Trade<AssetId>`] to be executed. A [`Trade<AssetId>`] specifies the asset pair (`asset_in`, `asset_out`) and the AMM (`pool`) in which the trade is executed.
|
|
736
|
-
* If not specified, than the on-chain route is used.
|
|
737
|
-
* If no on-chain is present, then omnipool route is used as default
|
|
2815
|
+
* This function transfers LP shares from `origin` to pallet's account and mint nft for
|
|
2816
|
+
* `origin` account. Minted nft represents deposit in the liq. mining.
|
|
738
2817
|
*
|
|
739
|
-
*
|
|
2818
|
+
* Parameters:
|
|
2819
|
+
* - `origin`: account depositing LP shares. This account has to have at least
|
|
2820
|
+
* `shares_amount` of LP shares.
|
|
2821
|
+
* - `global_farm_id`: id of global farm to which user wants to deposit LP shares.
|
|
2822
|
+
* - `yield_farm_id`: id of yield farm to deposit to.
|
|
2823
|
+
* - `asset_pair`: asset pair identifying LP shares user wants to deposit.
|
|
2824
|
+
* - `shares_amount`: amount of LP shares user wants to deposit.
|
|
2825
|
+
*
|
|
2826
|
+
* Emits `SharesDeposited` event when successful.
|
|
740
2827
|
*/
|
|
741
|
-
|
|
2828
|
+
deposit_shares: TxDescriptor<Anonymize<Ielqbuofrsq2ri>>;
|
|
742
2829
|
/**
|
|
743
|
-
*
|
|
744
|
-
* The price for each trade is determined by the corresponding AMM.
|
|
2830
|
+
* Join multiple farms with a given share amount
|
|
745
2831
|
*
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
* - `asset_out`: The identifier of the asset to buy
|
|
749
|
-
* - `amount_out`: The amount of `asset_out` to buy
|
|
750
|
-
* - `max_amount_in`: The max amount of `asset_in` to spend on the buy.
|
|
751
|
-
* - `route`: Series of [`Trade<AssetId>`] to be executed. A [`Trade<AssetId>`] specifies the asset pair (`asset_in`, `asset_out`) and the AMM (`pool`) in which the trade is executed.
|
|
752
|
-
* If not specified, than the on-chain route is used.
|
|
753
|
-
* If no on-chain is present, then omnipool route is used as default
|
|
2832
|
+
* The share is deposited to the first farm of the specified fams,
|
|
2833
|
+
* and then redeposit the shares to the remaining farms
|
|
754
2834
|
*
|
|
755
|
-
*
|
|
2835
|
+
* Parameters:
|
|
2836
|
+
* - `origin`: account depositing LP shares. This account has to have at least
|
|
2837
|
+
* - `farm_entries`: list of global farm id and yield farm id pairs to join
|
|
2838
|
+
* - `asset_pair`: asset pair identifying LP shares user wants to deposit.
|
|
2839
|
+
* - `shares_amount`: amount of LP shares user wants to deposit.
|
|
2840
|
+
*
|
|
2841
|
+
* Emits `SharesDeposited` event for the first farm entry
|
|
2842
|
+
* Emits `SharesRedeposited` event for each farm entry after the first one
|
|
756
2843
|
*/
|
|
757
|
-
|
|
2844
|
+
join_farms: TxDescriptor<Anonymize<I3hno1r9147mro>>;
|
|
758
2845
|
/**
|
|
759
|
-
*
|
|
2846
|
+
* Add liquidity to XYK pool and join multiple farms with a given share amount
|
|
760
2847
|
*
|
|
761
|
-
* The
|
|
2848
|
+
* The share is deposited to the first farm of the specified entries,
|
|
2849
|
+
* and then redeposit the shares to the remaining farms
|
|
762
2850
|
*
|
|
763
|
-
*
|
|
2851
|
+
* Parameters:
|
|
2852
|
+
* - `origin`: account depositing LP shares. This account has to have at least
|
|
2853
|
+
* - `asset_a`: asset id of the first asset in the pair
|
|
2854
|
+
* - `asset_b`: asset id of the second asset in the pair
|
|
2855
|
+
* - `amount_a`: amount of the first asset to deposit
|
|
2856
|
+
* - `amount_b_max_limit`: maximum amount of the second asset to deposit
|
|
2857
|
+
* - `farm_entries`: list of global farm id and yield farm id pairs to join
|
|
764
2858
|
*
|
|
765
|
-
*
|
|
766
|
-
*
|
|
2859
|
+
* Emits `SharesDeposited` event for the first farm entry
|
|
2860
|
+
* Emits `SharesRedeposited` event for each farm entry after the first one
|
|
2861
|
+
*/
|
|
2862
|
+
add_liquidity_and_join_farms: TxDescriptor<Anonymize<Iaihikf7d0fpt7>>;
|
|
2863
|
+
/**
|
|
2864
|
+
* Redeposit already locked LP shares to another yield farm.
|
|
767
2865
|
*
|
|
768
|
-
*
|
|
2866
|
+
* This function create yield farm entry for existing deposit. LP shares are not transferred
|
|
2867
|
+
* and amount of LP shares is based on existing deposit.
|
|
769
2868
|
*
|
|
770
|
-
*
|
|
2869
|
+
* This function DOESN'T create new deposit.
|
|
771
2870
|
*
|
|
772
|
-
*
|
|
773
|
-
* - `
|
|
774
|
-
* - `
|
|
2871
|
+
* Parameters:
|
|
2872
|
+
* - `origin`: account depositing LP shares. This account have to have at least
|
|
2873
|
+
* - `global_farm_id`: global farm identifier.
|
|
2874
|
+
* - `yield_farm_id`: yield farm identifier redepositing to.
|
|
2875
|
+
* - `asset_pair`: asset pair identifying LP shares user want to deposit.
|
|
2876
|
+
* - `deposit_id`: identifier of the deposit.
|
|
775
2877
|
*
|
|
776
|
-
* Emits `
|
|
2878
|
+
* Emits `SharesRedeposited` event when successful.
|
|
2879
|
+
*/
|
|
2880
|
+
redeposit_shares: TxDescriptor<Anonymize<Iaehj4ajaudum7>>;
|
|
2881
|
+
/**
|
|
2882
|
+
* Claim rewards from liq. mining for deposit represented by `nft_id`.
|
|
777
2883
|
*
|
|
778
|
-
*
|
|
2884
|
+
* This function calculate user rewards from liq. mining and transfer rewards to `origin`
|
|
2885
|
+
* account. Claiming in the same period is allowed only once.
|
|
779
2886
|
*
|
|
2887
|
+
* Parameters:
|
|
2888
|
+
* - `origin`: account owner of deposit(nft).
|
|
2889
|
+
* - `deposit_id`: nft id representing deposit in the yield farm.
|
|
2890
|
+
* - `yield_farm_id`: yield farm identifier to claim rewards from.
|
|
2891
|
+
*
|
|
2892
|
+
* Emits `RewardClaimed` event when successful.
|
|
780
2893
|
*/
|
|
781
|
-
|
|
2894
|
+
claim_rewards: TxDescriptor<Anonymize<I2k37dcoppgins>>;
|
|
782
2895
|
/**
|
|
783
|
-
*
|
|
2896
|
+
* Withdraw LP shares from liq. mining with reward claiming if possible.
|
|
784
2897
|
*
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
* The route is stored in an ordered manner, based on the oder of the ids in the asset pair.
|
|
2898
|
+
* List of possible cases of transfers of LP shares and claimed rewards:
|
|
788
2899
|
*
|
|
789
|
-
*
|
|
2900
|
+
* * yield farm is active(yield farm is not stopped) - claim and transfer rewards(if it
|
|
2901
|
+
* wasn't claimed in this period) and transfer LP shares.
|
|
2902
|
+
* * liq. mining is stopped - claim and transfer rewards(if it
|
|
2903
|
+
* wasn't claimed in this period) and transfer LP shares.
|
|
2904
|
+
* * yield farm was terminated - only LP shares will be transferred.
|
|
2905
|
+
* * farm was terminated - only LP shares will be transferred.
|
|
790
2906
|
*
|
|
791
|
-
*
|
|
792
|
-
* - `asset_pair`: The identifier of the asset-pair for which the route is set
|
|
793
|
-
* - `new_route`: Series of [`Trade<AssetId>`] to be executed. A [`Trade<AssetId>`] specifies the asset pair (`asset_in`, `asset_out`) and the AMM (`pool`) in which the trade is executed.
|
|
2907
|
+
* User's unclaimable rewards will be transferred back to global farm's account.
|
|
794
2908
|
*
|
|
795
|
-
*
|
|
2909
|
+
* Parameters:
|
|
2910
|
+
* - `origin`: account owner of deposit(nft).
|
|
2911
|
+
* - `deposit_id`: nft id representing deposit in the yield farm.
|
|
2912
|
+
* - `yield_farm_id`: yield farm identifier to dithdraw shares from.
|
|
2913
|
+
* - `asset_pair`: asset pair identifying yield farm in global farm.
|
|
796
2914
|
*
|
|
2915
|
+
* Emits:
|
|
2916
|
+
* * `RewardClaimed` if claim happen
|
|
2917
|
+
* * `SharesWithdrawn` event when successful
|
|
797
2918
|
*/
|
|
798
|
-
|
|
2919
|
+
withdraw_shares: TxDescriptor<Anonymize<Id83ilm95if0sl>>;
|
|
799
2920
|
/**
|
|
800
|
-
*
|
|
801
|
-
* It sells all reducible user balance of `asset_in`
|
|
802
|
-
* The price for each trade is determined by the corresponding AMM.
|
|
2921
|
+
* Exit from all specified yield farms
|
|
803
2922
|
*
|
|
804
|
-
*
|
|
805
|
-
*
|
|
806
|
-
* - `asset_out`: The identifier of the asset to receive
|
|
807
|
-
* - `min_amount_out`: The minimum amount of `asset_out` to receive.
|
|
808
|
-
* - `route`: Series of [`Trade<AssetId>`] to be executed. A [`Trade<AssetId>`] specifies the asset pair (`asset_in`, `asset_out`) and the AMM (`pool`) in which the trade is executed.
|
|
809
|
-
* If not specified, than the on-chain route is used.
|
|
810
|
-
* If no on-chain is present, then omnipool route is used as default
|
|
2923
|
+
* This function will attempt to withdraw shares and claim rewards (if available) from all
|
|
2924
|
+
* specified yield farms for a given deposit.
|
|
811
2925
|
*
|
|
812
|
-
*
|
|
2926
|
+
* Parameters:
|
|
2927
|
+
* - `origin`: account owner of deposit(nft).
|
|
2928
|
+
* - `deposit_id`: nft id representing deposit in the yield farm.
|
|
2929
|
+
* - `asset_pair`: asset pair identifying yield farm(s) in global farm(s).
|
|
2930
|
+
* - `farm_entries`: id(s) of yield farm(s) to exit from.
|
|
2931
|
+
*
|
|
2932
|
+
* Emits:
|
|
2933
|
+
* * `RewardClaimed` for each successful claim
|
|
2934
|
+
* * `SharesWithdrawn` for each successful withdrawal
|
|
2935
|
+
* * `DepositDestroyed` if the deposit is fully withdrawn
|
|
813
2936
|
*
|
|
814
2937
|
*/
|
|
815
|
-
|
|
2938
|
+
exit_farms: TxDescriptor<Anonymize<I82r4tvnf2s05i>>;
|
|
816
2939
|
};
|
|
817
2940
|
DCA: {
|
|
818
2941
|
/**
|
|
@@ -1143,6 +3266,54 @@ type IEvent = {
|
|
|
1143
3266
|
*/
|
|
1144
3267
|
Executed: PlainDescriptor<Anonymize<If1007933akv96>>;
|
|
1145
3268
|
};
|
|
3269
|
+
Stableswap: {
|
|
3270
|
+
/**
|
|
3271
|
+
* A pool was created.
|
|
3272
|
+
*/
|
|
3273
|
+
PoolCreated: PlainDescriptor<Anonymize<I59jkmlks7g3ck>>;
|
|
3274
|
+
/**
|
|
3275
|
+
* Pool fee has been updated.
|
|
3276
|
+
*/
|
|
3277
|
+
FeeUpdated: PlainDescriptor<Anonymize<Ics8sn0t3vlpat>>;
|
|
3278
|
+
/**
|
|
3279
|
+
* Liquidity of an asset was added to a pool.
|
|
3280
|
+
*/
|
|
3281
|
+
LiquidityAdded: PlainDescriptor<Anonymize<I88qo502j1hm6r>>;
|
|
3282
|
+
/**
|
|
3283
|
+
* Liquidity removed.
|
|
3284
|
+
*/
|
|
3285
|
+
LiquidityRemoved: PlainDescriptor<Anonymize<I44sqbdseede38>>;
|
|
3286
|
+
/**
|
|
3287
|
+
* Sell trade executed. Trade fee paid in asset leaving the pool (already subtracted from amount_out).
|
|
3288
|
+
* Deprecated. Replaced by pallet_broadcast::Swapped
|
|
3289
|
+
*/
|
|
3290
|
+
SellExecuted: PlainDescriptor<Anonymize<I203slt75ll6b5>>;
|
|
3291
|
+
/**
|
|
3292
|
+
* Buy trade executed. Trade fee paid in asset entering the pool (already included in amount_in).
|
|
3293
|
+
* Deprecated. Replaced by pallet_broadcast::Swapped
|
|
3294
|
+
*/
|
|
3295
|
+
BuyExecuted: PlainDescriptor<Anonymize<I203slt75ll6b5>>;
|
|
3296
|
+
/**
|
|
3297
|
+
* Asset's tradable state has been updated.
|
|
3298
|
+
*/
|
|
3299
|
+
TradableStateUpdated: PlainDescriptor<Anonymize<Iest0fomljvrb6>>;
|
|
3300
|
+
/**
|
|
3301
|
+
* Amplification of a pool has been scheduled to change.
|
|
3302
|
+
*/
|
|
3303
|
+
AmplificationChanging: PlainDescriptor<Anonymize<I9buamva6m987d>>;
|
|
3304
|
+
/**
|
|
3305
|
+
* A pool has been destroyed.
|
|
3306
|
+
*/
|
|
3307
|
+
PoolDestroyed: PlainDescriptor<Anonymize<I931cottvong90>>;
|
|
3308
|
+
/**
|
|
3309
|
+
* Pool peg source has been updated.
|
|
3310
|
+
*/
|
|
3311
|
+
PoolPegSourceUpdated: PlainDescriptor<Anonymize<Ibmmi1tbvqjkf9>>;
|
|
3312
|
+
/**
|
|
3313
|
+
* Pool max peg update has been updated.
|
|
3314
|
+
*/
|
|
3315
|
+
PoolMaxPegUpdateUpdated: PlainDescriptor<Anonymize<I4f24vd3pvt9k>>;
|
|
3316
|
+
};
|
|
1146
3317
|
EVM: {
|
|
1147
3318
|
/**
|
|
1148
3319
|
* Ethereum events from contracts.
|
|
@@ -4111,6 +6282,61 @@ type IConstants = {
|
|
|
4111
6282
|
*/
|
|
4112
6283
|
SS58Prefix: PlainDescriptor<number>;
|
|
4113
6284
|
};
|
|
6285
|
+
Balances: {
|
|
6286
|
+
/**
|
|
6287
|
+
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
|
|
6288
|
+
*
|
|
6289
|
+
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
|
|
6290
|
+
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
|
|
6291
|
+
* In case you have multiple sources of provider references, you may also get unexpected
|
|
6292
|
+
* behaviour if you set this to zero.
|
|
6293
|
+
*
|
|
6294
|
+
* Bottom line: Do yourself a favour and make it at least one!
|
|
6295
|
+
*/
|
|
6296
|
+
ExistentialDeposit: PlainDescriptor<bigint>;
|
|
6297
|
+
/**
|
|
6298
|
+
* The maximum number of locks that should exist on an account.
|
|
6299
|
+
* Not strictly enforced, but used for weight estimation.
|
|
6300
|
+
*
|
|
6301
|
+
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
|
|
6302
|
+
*/
|
|
6303
|
+
MaxLocks: PlainDescriptor<number>;
|
|
6304
|
+
/**
|
|
6305
|
+
* The maximum number of named reserves that can exist on an account.
|
|
6306
|
+
*
|
|
6307
|
+
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
|
|
6308
|
+
*/
|
|
6309
|
+
MaxReserves: PlainDescriptor<number>;
|
|
6310
|
+
/**
|
|
6311
|
+
* The maximum number of individual freeze locks that can exist on an account at any time.
|
|
6312
|
+
*/
|
|
6313
|
+
MaxFreezes: PlainDescriptor<number>;
|
|
6314
|
+
};
|
|
6315
|
+
Referenda: {
|
|
6316
|
+
/**
|
|
6317
|
+
* The minimum amount to be used as a deposit for a public referendum proposal.
|
|
6318
|
+
*/
|
|
6319
|
+
SubmissionDeposit: PlainDescriptor<bigint>;
|
|
6320
|
+
/**
|
|
6321
|
+
* Maximum size of the referendum queue for a single track.
|
|
6322
|
+
*/
|
|
6323
|
+
MaxQueued: PlainDescriptor<number>;
|
|
6324
|
+
/**
|
|
6325
|
+
* The number of blocks after submission that a referendum must begin being decided by.
|
|
6326
|
+
* Once this passes, then anyone may cancel the referendum.
|
|
6327
|
+
*/
|
|
6328
|
+
UndecidingTimeout: PlainDescriptor<number>;
|
|
6329
|
+
/**
|
|
6330
|
+
* Quantization level for the referendum wakeup scheduler. A higher number will result in
|
|
6331
|
+
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
|
|
6332
|
+
* automatic referendum status changes. Explicit servicing instructions are unaffected.
|
|
6333
|
+
*/
|
|
6334
|
+
AlarmInterval: PlainDescriptor<number>;
|
|
6335
|
+
/**
|
|
6336
|
+
* Information concerning the different referendum tracks.
|
|
6337
|
+
*/
|
|
6338
|
+
Tracks: PlainDescriptor<Anonymize<Ibafpkl9hhno69>>;
|
|
6339
|
+
};
|
|
4114
6340
|
Omnipool: {
|
|
4115
6341
|
/**
|
|
4116
6342
|
* Native Asset ID
|
|
@@ -4149,6 +6375,53 @@ type IConstants = {
|
|
|
4149
6375
|
*/
|
|
4150
6376
|
BurnProtocolFee: PlainDescriptor<number>;
|
|
4151
6377
|
};
|
|
6378
|
+
OmnipoolLiquidityMining: {
|
|
6379
|
+
/**
|
|
6380
|
+
* NFT collection id for liquidity mining's deposit nfts.
|
|
6381
|
+
*/
|
|
6382
|
+
NFTCollectionId: PlainDescriptor<bigint>;
|
|
6383
|
+
/**
|
|
6384
|
+
* Identifier of oracle data soruce
|
|
6385
|
+
*/
|
|
6386
|
+
OracleSource: PlainDescriptor<FixedSizeBinary<8>>;
|
|
6387
|
+
/**
|
|
6388
|
+
* Oracle's price aggregation period.
|
|
6389
|
+
*/
|
|
6390
|
+
OraclePeriod: PlainDescriptor<Anonymize<I9m0752cdvui5o>>;
|
|
6391
|
+
};
|
|
6392
|
+
OTC: {
|
|
6393
|
+
/**
|
|
6394
|
+
* Multiplier used to compute minimal amounts of asset_in and asset_out in an OTC.
|
|
6395
|
+
*/
|
|
6396
|
+
ExistentialDepositMultiplier: PlainDescriptor<number>;
|
|
6397
|
+
/**
|
|
6398
|
+
* Fee deducted from amount_out.
|
|
6399
|
+
*/
|
|
6400
|
+
Fee: PlainDescriptor<number>;
|
|
6401
|
+
/**
|
|
6402
|
+
* Fee receiver.
|
|
6403
|
+
*/
|
|
6404
|
+
FeeReceiver: PlainDescriptor<SS58String>;
|
|
6405
|
+
};
|
|
6406
|
+
CircuitBreaker: {
|
|
6407
|
+
/**
|
|
6408
|
+
* The maximum percentage of a pool's liquidity that can be traded in a block.
|
|
6409
|
+
* Represented as a non-zero fraction (nominator, denominator) with the max value being 10_000.
|
|
6410
|
+
*/
|
|
6411
|
+
DefaultMaxNetTradeVolumeLimitPerBlock: PlainDescriptor<Anonymize<I9jd27rnpm8ttv>>;
|
|
6412
|
+
/**
|
|
6413
|
+
* The maximum percentage of a pool's liquidity that can be added in a block.
|
|
6414
|
+
* Represented as an optional non-zero fraction (nominator, denominator) with the max value being 10_000.
|
|
6415
|
+
* If set to None, the limits are not enforced.
|
|
6416
|
+
*/
|
|
6417
|
+
DefaultMaxAddLiquidityLimitPerBlock: PlainDescriptor<Anonymize<Iep7au1720bm0e>>;
|
|
6418
|
+
/**
|
|
6419
|
+
* The maximum percentage of a pool's liquidity that can be removed in a block.
|
|
6420
|
+
* Represented as an optional non-zero fraction (nominator, denominator) with the max value being 10_000.
|
|
6421
|
+
* If set to None, the limits are not enforced.
|
|
6422
|
+
*/
|
|
6423
|
+
DefaultMaxRemoveLiquidityLimitPerBlock: PlainDescriptor<Anonymize<Iep7au1720bm0e>>;
|
|
6424
|
+
};
|
|
4152
6425
|
DynamicFees: {
|
|
4153
6426
|
/**
|
|
4154
6427
|
|
|
@@ -4294,6 +6567,20 @@ type IConstants = {
|
|
|
4294
6567
|
*/
|
|
4295
6568
|
GasLimit: PlainDescriptor<bigint>;
|
|
4296
6569
|
};
|
|
6570
|
+
XYKLiquidityMining: {
|
|
6571
|
+
/**
|
|
6572
|
+
* NFT collection id for liquidity mining's deposit nfts.
|
|
6573
|
+
*/
|
|
6574
|
+
NFTCollectionId: PlainDescriptor<bigint>;
|
|
6575
|
+
/**
|
|
6576
|
+
* Oracle source identifier for this pallet.
|
|
6577
|
+
*/
|
|
6578
|
+
OracleSource: PlainDescriptor<FixedSizeBinary<8>>;
|
|
6579
|
+
/**
|
|
6580
|
+
* Oracle's liquidity aggregation period.
|
|
6581
|
+
*/
|
|
6582
|
+
OraclePeriod: PlainDescriptor<Anonymize<I9m0752cdvui5o>>;
|
|
6583
|
+
};
|
|
4297
6584
|
DCA: {
|
|
4298
6585
|
/**
|
|
4299
6586
|
* Max price difference allowed between blocks
|
|
@@ -4356,6 +6643,28 @@ type IConstants = {
|
|
|
4356
6643
|
};
|
|
4357
6644
|
type IViewFns = {};
|
|
4358
6645
|
type IRuntimeCalls = {
|
|
6646
|
+
/**
|
|
6647
|
+
* The `Metadata` api trait that returns metadata for the runtime.
|
|
6648
|
+
*/
|
|
6649
|
+
Metadata: {
|
|
6650
|
+
/**
|
|
6651
|
+
* Returns the metadata of a runtime.
|
|
6652
|
+
*/
|
|
6653
|
+
metadata: RuntimeDescriptor<[], Binary>;
|
|
6654
|
+
/**
|
|
6655
|
+
* Returns the metadata at a given version.
|
|
6656
|
+
*
|
|
6657
|
+
* If the given `version` isn't supported, this will return `None`.
|
|
6658
|
+
* Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
|
|
6659
|
+
*/
|
|
6660
|
+
metadata_at_version: RuntimeDescriptor<[version: number], Anonymize<Iabpgqcjikia83>>;
|
|
6661
|
+
/**
|
|
6662
|
+
* Returns the supported metadata versions.
|
|
6663
|
+
*
|
|
6664
|
+
* This can be used to call `metadata_at_version`.
|
|
6665
|
+
*/
|
|
6666
|
+
metadata_versions: RuntimeDescriptor<[], Anonymize<Icgljjb6j82uhn>>;
|
|
6667
|
+
};
|
|
4359
6668
|
/**
|
|
4360
6669
|
|
|
4361
6670
|
*/
|
|
@@ -4408,11 +6717,11 @@ type IRuntimeCalls = {
|
|
|
4408
6717
|
/**
|
|
4409
6718
|
|
|
4410
6719
|
*/
|
|
4411
|
-
call: RuntimeDescriptor<[from: FixedSizeBinary<20>, to: FixedSizeBinary<20>, data: Binary, value: Anonymize<I4totqt881mlti>, gas_limit: Anonymize<I4totqt881mlti>, max_fee_per_gas: Anonymize<Ic4rgfgksgmm3e>, max_priority_fee_per_gas: Anonymize<Ic4rgfgksgmm3e>, nonce: Anonymize<Ic4rgfgksgmm3e>, estimate: boolean, access_list: Anonymize<I3dj14b7k3rkm5>], Anonymize<
|
|
6720
|
+
call: RuntimeDescriptor<[from: FixedSizeBinary<20>, to: FixedSizeBinary<20>, data: Binary, value: Anonymize<I4totqt881mlti>, gas_limit: Anonymize<I4totqt881mlti>, max_fee_per_gas: Anonymize<Ic4rgfgksgmm3e>, max_priority_fee_per_gas: Anonymize<Ic4rgfgksgmm3e>, nonce: Anonymize<Ic4rgfgksgmm3e>, estimate: boolean, access_list: Anonymize<I3dj14b7k3rkm5>], Anonymize<I36ted2rh1tok8>>;
|
|
4412
6721
|
/**
|
|
4413
6722
|
|
|
4414
6723
|
*/
|
|
4415
|
-
create: RuntimeDescriptor<[from: FixedSizeBinary<20>, data: Binary, value: Anonymize<I4totqt881mlti>, gas_limit: Anonymize<I4totqt881mlti>, max_fee_per_gas: Anonymize<Ic4rgfgksgmm3e>, max_priority_fee_per_gas: Anonymize<Ic4rgfgksgmm3e>, nonce: Anonymize<Ic4rgfgksgmm3e>, estimate: boolean, access_list: Anonymize<I3dj14b7k3rkm5>], Anonymize<
|
|
6724
|
+
create: RuntimeDescriptor<[from: FixedSizeBinary<20>, data: Binary, value: Anonymize<I4totqt881mlti>, gas_limit: Anonymize<I4totqt881mlti>, max_fee_per_gas: Anonymize<Ic4rgfgksgmm3e>, max_priority_fee_per_gas: Anonymize<Ic4rgfgksgmm3e>, nonce: Anonymize<Ic4rgfgksgmm3e>, estimate: boolean, access_list: Anonymize<I3dj14b7k3rkm5>], Anonymize<Ie624eo5lliskr>>;
|
|
4416
6725
|
/**
|
|
4417
6726
|
* Return the current block.
|
|
4418
6727
|
*/
|
|
@@ -4455,6 +6764,24 @@ type IRuntimeCalls = {
|
|
|
4455
6764
|
*/
|
|
4456
6765
|
initialize_pending_block: RuntimeDescriptor<[header: Anonymize<Ic952bubvq4k7d>], undefined>;
|
|
4457
6766
|
};
|
|
6767
|
+
/**
|
|
6768
|
+
* The API to query EVM account conversions.
|
|
6769
|
+
*/
|
|
6770
|
+
EvmAccountsApi: {
|
|
6771
|
+
/**
|
|
6772
|
+
* get the EVM address from the substrate address.
|
|
6773
|
+
*/
|
|
6774
|
+
evm_address: RuntimeDescriptor<[account_id: SS58String], FixedSizeBinary<20>>;
|
|
6775
|
+
/**
|
|
6776
|
+
* Return the Substrate address bound to the EVM account. If not bound, returns `None`.
|
|
6777
|
+
*/
|
|
6778
|
+
bound_account_id: RuntimeDescriptor<[evm_address: FixedSizeBinary<20>], Anonymize<Ihfphjolmsqq1>>;
|
|
6779
|
+
/**
|
|
6780
|
+
* Get the Substrate address from the EVM address.
|
|
6781
|
+
* Returns the truncated version of the address if the address wasn't bind.
|
|
6782
|
+
*/
|
|
6783
|
+
account_id: RuntimeDescriptor<[evm_address: FixedSizeBinary<20>], SS58String>;
|
|
6784
|
+
};
|
|
4458
6785
|
/**
|
|
4459
6786
|
* A trait of XCM payment API.
|
|
4460
6787
|
*
|
|
@@ -4521,11 +6848,11 @@ type IRuntimeCalls = {
|
|
|
4521
6848
|
/**
|
|
4522
6849
|
* Dry run call.
|
|
4523
6850
|
*/
|
|
4524
|
-
dry_run_call: RuntimeDescriptor<[origin: Anonymize<Iathhdqc4u75dj>, call: Anonymize<Iadi05terfo8g5>], Anonymize<
|
|
6851
|
+
dry_run_call: RuntimeDescriptor<[origin: Anonymize<Iathhdqc4u75dj>, call: Anonymize<Iadi05terfo8g5>], Anonymize<I38sq2abrntuaf>>;
|
|
4525
6852
|
/**
|
|
4526
6853
|
* Dry run XCM program
|
|
4527
6854
|
*/
|
|
4528
|
-
dry_run_xcm: RuntimeDescriptor<[origin_location: HydrationXcmVersionedLocation, xcm: HydrationXcmVersionedXcm], Anonymize<
|
|
6855
|
+
dry_run_xcm: RuntimeDescriptor<[origin_location: HydrationXcmVersionedLocation, xcm: HydrationXcmVersionedXcm], Anonymize<Ifi30q3af4jdm9>>;
|
|
4529
6856
|
};
|
|
4530
6857
|
/**
|
|
4531
6858
|
|
|
@@ -4588,18 +6915,25 @@ export type HydrationCallData = Anonymize<Iadi05terfo8g5> & {
|
|
|
4588
6915
|
type AllInteractions = {
|
|
4589
6916
|
storage: {
|
|
4590
6917
|
System: ['Account', 'ExtrinsicCount', 'InherentsApplied', 'BlockWeight', 'AllExtrinsicsLen', 'BlockHash', 'ExtrinsicData', 'Number', 'ParentHash', 'Digest', 'Events', 'EventCount', 'EventTopics', 'LastRuntimeUpgrade', 'UpgradedToU32RefCount', 'UpgradedToTripleRefCount', 'ExecutionPhase', 'AuthorizedUpgrade'];
|
|
6918
|
+
Timestamp: ['Now', 'DidUpdate'];
|
|
6919
|
+
Balances: ['TotalIssuance', 'InactiveIssuance', 'Account', 'Locks', 'Reserves', 'Holds', 'Freezes'];
|
|
4591
6920
|
MultiTransactionPayment: ['AccountCurrencyMap', 'AcceptedCurrencies', 'AcceptedCurrencyPrice', 'TransactionCurrencyOverride'];
|
|
6921
|
+
Democracy: ['PublicPropCount', 'PublicProps', 'DepositOf', 'ReferendumCount', 'LowestUnbaked', 'ReferendumInfoOf', 'VotingOf', 'LastTabledWasExternal', 'NextExternal', 'Blacklist', 'Cancellations', 'MetadataOf'];
|
|
4592
6922
|
Uniques: ['Account'];
|
|
6923
|
+
ConvictionVoting: ['VotingFor', 'ClassLocksFor'];
|
|
4593
6924
|
Referenda: ['ReferendumCount', 'ReferendumInfoFor', 'TrackQueue', 'DecidingCount', 'MetadataOf'];
|
|
4594
6925
|
AssetRegistry: ['Assets', 'NextAssetId', 'AssetIds', 'AssetLocations', 'BannedAssets', 'LocationAssets', 'ExistentialDepositCounter'];
|
|
4595
6926
|
Omnipool: ['Assets', 'HubAssetTradability', 'Positions', 'NextPositionId'];
|
|
4596
6927
|
OmnipoolWarehouseLM: ['FarmSequencer', 'DepositSequencer', 'GlobalFarm', 'YieldFarm', 'Deposit', 'ActiveYieldFarm'];
|
|
6928
|
+
OmnipoolLiquidityMining: ['OmniPositionId'];
|
|
6929
|
+
OTC: ['NextOrderId', 'Orders'];
|
|
4597
6930
|
DynamicFees: ['AssetFee', 'AssetFeeConfiguration'];
|
|
4598
6931
|
Staking: ['Staking', 'Positions', 'NextPositionId', 'Votes', 'VotesRewarded', 'PositionVotes', 'ProcessedVotes', 'SixSecBlocksSince'];
|
|
4599
6932
|
Stableswap: ['Pools', 'PoolPegs', 'AssetTradability', 'PoolSnapshots'];
|
|
4600
6933
|
Bonds: ['BondIds', 'Bonds'];
|
|
4601
6934
|
LBP: ['PoolData', 'FeeCollectorWithAsset'];
|
|
4602
6935
|
XYK: ['ShareToken', 'TotalLiquidity', 'PoolAssets'];
|
|
6936
|
+
Referrals: ['ReferralCodes', 'ReferralAccounts', 'LinkedAccounts', 'ReferrerShares', 'TraderShares', 'TotalShares', 'Referrer', 'AssetRewards', 'PendingConversions', 'CounterForPendingConversions'];
|
|
4603
6937
|
HSM: ['Collaterals', 'HollarAmountReceived', 'FlashMinter'];
|
|
4604
6938
|
Tokens: ['TotalIssuance', 'Locks', 'Accounts', 'Reserves'];
|
|
4605
6939
|
Ethereum: ['Pending', 'CounterForPending', 'CurrentBlock', 'CurrentReceipts', 'CurrentTransactionStatuses', 'BlockHash'];
|
|
@@ -4608,14 +6942,30 @@ type AllInteractions = {
|
|
|
4608
6942
|
EmaOracle: ['Accumulator', 'Oracles', 'WhitelistedAssets'];
|
|
4609
6943
|
};
|
|
4610
6944
|
tx: {
|
|
6945
|
+
MultiTransactionPayment: ['set_currency', 'add_currency', 'remove_currency', 'reset_payment_currency', 'dispatch_permit'];
|
|
6946
|
+
Utility: ['batch', 'as_derivative', 'batch_all', 'dispatch_as', 'force_batch', 'with_weight'];
|
|
6947
|
+
Democracy: ['propose', 'second', 'vote', 'emergency_cancel', 'external_propose', 'external_propose_majority', 'external_propose_default', 'fast_track', 'veto_external', 'cancel_referendum', 'delegate', 'undelegate', 'clear_public_proposals', 'unlock', 'remove_vote', 'remove_other_vote', 'blacklist', 'cancel_proposal', 'set_metadata', 'force_remove_vote'];
|
|
6948
|
+
ConvictionVoting: ['vote', 'delegate', 'undelegate', 'unlock', 'remove_vote', 'remove_other_vote', 'force_remove_vote'];
|
|
4611
6949
|
Dispatcher: ['dispatch_as_treasury', 'dispatch_as_aave_manager', 'note_aave_manager', 'dispatch_with_extra_gas', 'dispatch_evm_call'];
|
|
4612
6950
|
Omnipool: ['add_token', 'add_liquidity', 'add_liquidity_with_limit', 'remove_liquidity', 'remove_liquidity_with_limit', 'sacrifice_position', 'sell', 'buy', 'set_asset_tradable_state', 'refund_refused_asset', 'set_asset_weight_cap', 'withdraw_protocol_liquidity', 'remove_token'];
|
|
6951
|
+
OmnipoolLiquidityMining: ['create_global_farm', 'terminate_global_farm', 'create_yield_farm', 'update_yield_farm', 'stop_yield_farm', 'resume_yield_farm', 'terminate_yield_farm', 'deposit_shares', 'redeposit_shares', 'claim_rewards', 'withdraw_shares', 'update_global_farm', 'join_farms', 'add_liquidity_and_join_farms', 'exit_farms', 'add_liquidity_stableswap_omnipool_and_join_farms'];
|
|
6952
|
+
OTC: ['place_order', 'partial_fill_order', 'fill_order', 'cancel_order'];
|
|
4613
6953
|
Router: ['sell', 'buy', 'set_route', 'force_insert_route', 'sell_all'];
|
|
6954
|
+
Staking: ['initialize_staking', 'stake', 'increase_stake', 'claim', 'unstake'];
|
|
6955
|
+
Stableswap: ['create_pool', 'update_pool_fee', 'update_amplification', 'add_liquidity', 'add_liquidity_shares', 'remove_liquidity_one_asset', 'withdraw_asset_amount', 'sell', 'buy', 'set_asset_tradable_state', 'remove_liquidity', 'create_pool_with_pegs', 'add_assets_liquidity', 'update_asset_peg_source', 'update_pool_max_peg_update'];
|
|
6956
|
+
XYK: ['create_pool', 'add_liquidity', 'add_liquidity_with_limits', 'remove_liquidity', 'remove_liquidity_with_limits', 'sell', 'buy'];
|
|
6957
|
+
Referrals: ['register_code', 'link_code', 'convert', 'claim_rewards', 'set_reward_percentage'];
|
|
6958
|
+
Tokens: ['transfer', 'transfer_all', 'transfer_keep_alive', 'force_transfer', 'set_balance'];
|
|
6959
|
+
Currencies: ['transfer', 'transfer_native_currency', 'update_balance'];
|
|
6960
|
+
EVM: ['withdraw', 'call', 'create', 'create2'];
|
|
6961
|
+
EVMAccounts: ['bind_evm_address', 'add_contract_deployer', 'remove_contract_deployer', 'renounce_contract_deployer', 'approve_contract', 'disapprove_contract'];
|
|
6962
|
+
XYKLiquidityMining: ['create_global_farm', 'update_global_farm', 'terminate_global_farm', 'create_yield_farm', 'update_yield_farm', 'stop_yield_farm', 'resume_yield_farm', 'terminate_yield_farm', 'deposit_shares', 'join_farms', 'add_liquidity_and_join_farms', 'redeposit_shares', 'claim_rewards', 'withdraw_shares', 'exit_farms'];
|
|
4614
6963
|
DCA: ['schedule', 'terminate', 'unlock_reserves'];
|
|
4615
6964
|
PolkadotXcm: ['send', 'teleport_assets', 'reserve_transfer_assets', 'execute', 'force_xcm_version', 'force_default_xcm_version', 'force_subscribe_version_notify', 'force_unsubscribe_version_notify', 'limited_reserve_transfer_assets', 'limited_teleport_assets', 'force_suspension', 'transfer_assets', 'claim_assets', 'transfer_assets_using_type_and_then'];
|
|
4616
6965
|
};
|
|
4617
6966
|
events: {
|
|
4618
6967
|
Router: ['Executed'];
|
|
6968
|
+
Stableswap: ['PoolCreated', 'FeeUpdated', 'LiquidityAdded', 'LiquidityRemoved', 'SellExecuted', 'BuyExecuted', 'TradableStateUpdated', 'AmplificationChanging', 'PoolDestroyed', 'PoolPegSourceUpdated', 'PoolMaxPegUpdateUpdated'];
|
|
4619
6969
|
EVM: ['Log'];
|
|
4620
6970
|
};
|
|
4621
6971
|
errors: {
|
|
@@ -4683,20 +7033,28 @@ type AllInteractions = {
|
|
|
4683
7033
|
};
|
|
4684
7034
|
constants: {
|
|
4685
7035
|
System: ['BlockWeights', 'BlockLength', 'BlockHashCount', 'DbWeight', 'Version', 'SS58Prefix'];
|
|
7036
|
+
Balances: ['ExistentialDeposit', 'MaxLocks', 'MaxReserves', 'MaxFreezes'];
|
|
7037
|
+
Referenda: ['SubmissionDeposit', 'MaxQueued', 'UndecidingTimeout', 'AlarmInterval', 'Tracks'];
|
|
4686
7038
|
Omnipool: ['HdxAssetId', 'HubAssetId', 'MinWithdrawalFee', 'MinimumTradingLimit', 'MinimumPoolLiquidity', 'MaxInRatio', 'MaxOutRatio', 'NFTCollectionId', 'BurnProtocolFee'];
|
|
7039
|
+
OmnipoolLiquidityMining: ['NFTCollectionId', 'OracleSource', 'OraclePeriod'];
|
|
7040
|
+
OTC: ['ExistentialDepositMultiplier', 'Fee', 'FeeReceiver'];
|
|
7041
|
+
CircuitBreaker: ['DefaultMaxNetTradeVolumeLimitPerBlock', 'DefaultMaxAddLiquidityLimitPerBlock', 'DefaultMaxRemoveLiquidityLimitPerBlock'];
|
|
4687
7042
|
DynamicFees: ['AssetFeeParameters', 'ProtocolFeeParameters'];
|
|
4688
7043
|
Staking: ['PeriodLength', 'PalletId', 'NativeAssetId', 'MinStake', 'TimePointsWeight', 'ActionPointsWeight', 'TimePointsPerPeriod', 'UnclaimablePeriods', 'CurrentStakeWeight', 'MaxVotes', 'NFTCollectionId'];
|
|
4689
7044
|
Stableswap: ['MinPoolLiquidity', 'MinTradingLimit', 'AmplificationRange'];
|
|
4690
7045
|
LBP: ['MinTradingLimit', 'MinPoolLiquidity', 'MaxInRatio', 'MaxOutRatio', 'repay_fee'];
|
|
4691
7046
|
XYK: ['NativeAssetId', 'GetExchangeFee', 'MinTradingLimit', 'MinPoolLiquidity', 'MaxInRatio', 'MaxOutRatio', 'OracleSource'];
|
|
4692
7047
|
HSM: ['HollarId', 'PalletId', 'MinArbitrageAmount', 'FlashLoanReceiver', 'GasLimit'];
|
|
7048
|
+
XYKLiquidityMining: ['NFTCollectionId', 'OracleSource', 'OraclePeriod'];
|
|
4693
7049
|
DCA: ['MaxPriceDifferenceBetweenBlocks', 'MaxConfigurablePriceDifferenceBetweenBlocks', 'MaxSchedulePerBlock', 'MaxNumberOfRetriesOnError', 'MinimalPeriod', 'BumpChance', 'MinimumTradingLimit', 'NativeAssetId', 'PolkadotNativeAssetId', 'MinBudgetInNativeCurrency', 'FeeReceiver', 'NamedReserveId'];
|
|
4694
7050
|
Aura: ['SlotDuration'];
|
|
4695
7051
|
};
|
|
4696
7052
|
viewFns: {};
|
|
4697
7053
|
apis: {
|
|
7054
|
+
Metadata: ['metadata', 'metadata_at_version', 'metadata_versions'];
|
|
4698
7055
|
CurrenciesApi: ['account', 'accounts', 'free_balance', 'minimum_balance'];
|
|
4699
7056
|
EthereumRuntimeRPCApi: ['chain_id', 'account_basic', 'gas_price', 'account_code_at', 'author', 'storage_at', 'call', 'create', 'current_block', 'current_receipts', 'current_transaction_statuses', 'current_all', 'extrinsic_filter', 'elasticity', 'gas_limit_multiplier_support', 'pending_block', 'initialize_pending_block'];
|
|
7057
|
+
EvmAccountsApi: ['evm_address', 'bound_account_id', 'account_id'];
|
|
4700
7058
|
XcmPaymentApi: ['query_acceptable_payment_assets', 'query_xcm_weight', 'query_weight_to_asset_fee', 'query_delivery_fees'];
|
|
4701
7059
|
DryRunApi: ['dry_run_call', 'dry_run_xcm'];
|
|
4702
7060
|
AaveTradeExecutor: ['pairs', 'liquidity_depth', 'pool', 'pools'];
|