@dedot/chaintypes 0.42.0 → 0.44.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/astar/consts.d.ts +350 -2
- package/astar/errors.d.ts +661 -5
- package/astar/events.d.ts +949 -4
- package/astar/index.d.ts +1 -1
- package/astar/query.d.ts +662 -42
- package/astar/runtime.d.ts +60 -8
- package/astar/tx.d.ts +3136 -88
- package/astar/types.d.ts +2650 -242
- package/package.json +3 -3
- package/paseo/index.d.ts +1 -1
- package/westend-asset-hub/index.d.ts +1 -1
- package/westend-asset-hub/runtime.d.ts +6 -14
- package/westend-asset-hub/tx.d.ts +1 -1
- package/westend-asset-hub/types.d.ts +34 -5
package/astar/tx.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ import type {
|
|
|
37
37
|
PalletVestingVestingInfo,
|
|
38
38
|
PalletInflationInflationParameters,
|
|
39
39
|
AstarPrimitivesDappStakingSmartContract,
|
|
40
|
-
|
|
40
|
+
PalletDappStakingForcingType,
|
|
41
41
|
AstarPrimitivesOracleCurrencyId,
|
|
42
42
|
AstarRuntimeSessionKeys,
|
|
43
43
|
XcmVersionedLocation,
|
|
@@ -51,6 +51,12 @@ import type {
|
|
|
51
51
|
CumulusPrimitivesCoreAggregateMessageOrigin,
|
|
52
52
|
EthereumTransactionTransactionV2,
|
|
53
53
|
PalletContractsWasmDeterminism,
|
|
54
|
+
FrameSupportPreimagesBounded,
|
|
55
|
+
PalletDemocracyVoteAccountVote,
|
|
56
|
+
PalletDemocracyConviction,
|
|
57
|
+
PalletDemocracyMetadataOwner,
|
|
58
|
+
PalletMigrationsMigrationCursor,
|
|
59
|
+
PalletMigrationsHistoricCleanupSelector,
|
|
54
60
|
} from './types';
|
|
55
61
|
|
|
56
62
|
export type ChainSubmittableExtrinsic<
|
|
@@ -1758,6 +1764,301 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
1758
1764
|
**/
|
|
1759
1765
|
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
1760
1766
|
};
|
|
1767
|
+
/**
|
|
1768
|
+
* Pallet `Scheduler`'s transaction calls
|
|
1769
|
+
**/
|
|
1770
|
+
scheduler: {
|
|
1771
|
+
/**
|
|
1772
|
+
* Anonymously schedule a task.
|
|
1773
|
+
*
|
|
1774
|
+
* @param {number} when
|
|
1775
|
+
* @param {[number, number] | undefined} maybePeriodic
|
|
1776
|
+
* @param {number} priority
|
|
1777
|
+
* @param {AstarRuntimeRuntimeCallLike} call
|
|
1778
|
+
**/
|
|
1779
|
+
schedule: GenericTxCall<
|
|
1780
|
+
Rv,
|
|
1781
|
+
(
|
|
1782
|
+
when: number,
|
|
1783
|
+
maybePeriodic: [number, number] | undefined,
|
|
1784
|
+
priority: number,
|
|
1785
|
+
call: AstarRuntimeRuntimeCallLike,
|
|
1786
|
+
) => ChainSubmittableExtrinsic<
|
|
1787
|
+
Rv,
|
|
1788
|
+
{
|
|
1789
|
+
pallet: 'Scheduler';
|
|
1790
|
+
palletCall: {
|
|
1791
|
+
name: 'Schedule';
|
|
1792
|
+
params: {
|
|
1793
|
+
when: number;
|
|
1794
|
+
maybePeriodic: [number, number] | undefined;
|
|
1795
|
+
priority: number;
|
|
1796
|
+
call: AstarRuntimeRuntimeCallLike;
|
|
1797
|
+
};
|
|
1798
|
+
};
|
|
1799
|
+
}
|
|
1800
|
+
>
|
|
1801
|
+
>;
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* Cancel an anonymously scheduled task.
|
|
1805
|
+
*
|
|
1806
|
+
* @param {number} when
|
|
1807
|
+
* @param {number} index
|
|
1808
|
+
**/
|
|
1809
|
+
cancel: GenericTxCall<
|
|
1810
|
+
Rv,
|
|
1811
|
+
(
|
|
1812
|
+
when: number,
|
|
1813
|
+
index: number,
|
|
1814
|
+
) => ChainSubmittableExtrinsic<
|
|
1815
|
+
Rv,
|
|
1816
|
+
{
|
|
1817
|
+
pallet: 'Scheduler';
|
|
1818
|
+
palletCall: {
|
|
1819
|
+
name: 'Cancel';
|
|
1820
|
+
params: { when: number; index: number };
|
|
1821
|
+
};
|
|
1822
|
+
}
|
|
1823
|
+
>
|
|
1824
|
+
>;
|
|
1825
|
+
|
|
1826
|
+
/**
|
|
1827
|
+
* Schedule a named task.
|
|
1828
|
+
*
|
|
1829
|
+
* @param {FixedBytes<32>} id
|
|
1830
|
+
* @param {number} when
|
|
1831
|
+
* @param {[number, number] | undefined} maybePeriodic
|
|
1832
|
+
* @param {number} priority
|
|
1833
|
+
* @param {AstarRuntimeRuntimeCallLike} call
|
|
1834
|
+
**/
|
|
1835
|
+
scheduleNamed: GenericTxCall<
|
|
1836
|
+
Rv,
|
|
1837
|
+
(
|
|
1838
|
+
id: FixedBytes<32>,
|
|
1839
|
+
when: number,
|
|
1840
|
+
maybePeriodic: [number, number] | undefined,
|
|
1841
|
+
priority: number,
|
|
1842
|
+
call: AstarRuntimeRuntimeCallLike,
|
|
1843
|
+
) => ChainSubmittableExtrinsic<
|
|
1844
|
+
Rv,
|
|
1845
|
+
{
|
|
1846
|
+
pallet: 'Scheduler';
|
|
1847
|
+
palletCall: {
|
|
1848
|
+
name: 'ScheduleNamed';
|
|
1849
|
+
params: {
|
|
1850
|
+
id: FixedBytes<32>;
|
|
1851
|
+
when: number;
|
|
1852
|
+
maybePeriodic: [number, number] | undefined;
|
|
1853
|
+
priority: number;
|
|
1854
|
+
call: AstarRuntimeRuntimeCallLike;
|
|
1855
|
+
};
|
|
1856
|
+
};
|
|
1857
|
+
}
|
|
1858
|
+
>
|
|
1859
|
+
>;
|
|
1860
|
+
|
|
1861
|
+
/**
|
|
1862
|
+
* Cancel a named scheduled task.
|
|
1863
|
+
*
|
|
1864
|
+
* @param {FixedBytes<32>} id
|
|
1865
|
+
**/
|
|
1866
|
+
cancelNamed: GenericTxCall<
|
|
1867
|
+
Rv,
|
|
1868
|
+
(id: FixedBytes<32>) => ChainSubmittableExtrinsic<
|
|
1869
|
+
Rv,
|
|
1870
|
+
{
|
|
1871
|
+
pallet: 'Scheduler';
|
|
1872
|
+
palletCall: {
|
|
1873
|
+
name: 'CancelNamed';
|
|
1874
|
+
params: { id: FixedBytes<32> };
|
|
1875
|
+
};
|
|
1876
|
+
}
|
|
1877
|
+
>
|
|
1878
|
+
>;
|
|
1879
|
+
|
|
1880
|
+
/**
|
|
1881
|
+
* Anonymously schedule a task after a delay.
|
|
1882
|
+
*
|
|
1883
|
+
* @param {number} after
|
|
1884
|
+
* @param {[number, number] | undefined} maybePeriodic
|
|
1885
|
+
* @param {number} priority
|
|
1886
|
+
* @param {AstarRuntimeRuntimeCallLike} call
|
|
1887
|
+
**/
|
|
1888
|
+
scheduleAfter: GenericTxCall<
|
|
1889
|
+
Rv,
|
|
1890
|
+
(
|
|
1891
|
+
after: number,
|
|
1892
|
+
maybePeriodic: [number, number] | undefined,
|
|
1893
|
+
priority: number,
|
|
1894
|
+
call: AstarRuntimeRuntimeCallLike,
|
|
1895
|
+
) => ChainSubmittableExtrinsic<
|
|
1896
|
+
Rv,
|
|
1897
|
+
{
|
|
1898
|
+
pallet: 'Scheduler';
|
|
1899
|
+
palletCall: {
|
|
1900
|
+
name: 'ScheduleAfter';
|
|
1901
|
+
params: {
|
|
1902
|
+
after: number;
|
|
1903
|
+
maybePeriodic: [number, number] | undefined;
|
|
1904
|
+
priority: number;
|
|
1905
|
+
call: AstarRuntimeRuntimeCallLike;
|
|
1906
|
+
};
|
|
1907
|
+
};
|
|
1908
|
+
}
|
|
1909
|
+
>
|
|
1910
|
+
>;
|
|
1911
|
+
|
|
1912
|
+
/**
|
|
1913
|
+
* Schedule a named task after a delay.
|
|
1914
|
+
*
|
|
1915
|
+
* @param {FixedBytes<32>} id
|
|
1916
|
+
* @param {number} after
|
|
1917
|
+
* @param {[number, number] | undefined} maybePeriodic
|
|
1918
|
+
* @param {number} priority
|
|
1919
|
+
* @param {AstarRuntimeRuntimeCallLike} call
|
|
1920
|
+
**/
|
|
1921
|
+
scheduleNamedAfter: GenericTxCall<
|
|
1922
|
+
Rv,
|
|
1923
|
+
(
|
|
1924
|
+
id: FixedBytes<32>,
|
|
1925
|
+
after: number,
|
|
1926
|
+
maybePeriodic: [number, number] | undefined,
|
|
1927
|
+
priority: number,
|
|
1928
|
+
call: AstarRuntimeRuntimeCallLike,
|
|
1929
|
+
) => ChainSubmittableExtrinsic<
|
|
1930
|
+
Rv,
|
|
1931
|
+
{
|
|
1932
|
+
pallet: 'Scheduler';
|
|
1933
|
+
palletCall: {
|
|
1934
|
+
name: 'ScheduleNamedAfter';
|
|
1935
|
+
params: {
|
|
1936
|
+
id: FixedBytes<32>;
|
|
1937
|
+
after: number;
|
|
1938
|
+
maybePeriodic: [number, number] | undefined;
|
|
1939
|
+
priority: number;
|
|
1940
|
+
call: AstarRuntimeRuntimeCallLike;
|
|
1941
|
+
};
|
|
1942
|
+
};
|
|
1943
|
+
}
|
|
1944
|
+
>
|
|
1945
|
+
>;
|
|
1946
|
+
|
|
1947
|
+
/**
|
|
1948
|
+
* Set a retry configuration for a task so that, in case its scheduled run fails, it will
|
|
1949
|
+
* be retried after `period` blocks, for a total amount of `retries` retries or until it
|
|
1950
|
+
* succeeds.
|
|
1951
|
+
*
|
|
1952
|
+
* Tasks which need to be scheduled for a retry are still subject to weight metering and
|
|
1953
|
+
* agenda space, same as a regular task. If a periodic task fails, it will be scheduled
|
|
1954
|
+
* normally while the task is retrying.
|
|
1955
|
+
*
|
|
1956
|
+
* Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic
|
|
1957
|
+
* clones of the original task. Their retry configuration will be derived from the
|
|
1958
|
+
* original task's configuration, but will have a lower value for `remaining` than the
|
|
1959
|
+
* original `total_retries`.
|
|
1960
|
+
*
|
|
1961
|
+
* @param {[number, number]} task
|
|
1962
|
+
* @param {number} retries
|
|
1963
|
+
* @param {number} period
|
|
1964
|
+
**/
|
|
1965
|
+
setRetry: GenericTxCall<
|
|
1966
|
+
Rv,
|
|
1967
|
+
(
|
|
1968
|
+
task: [number, number],
|
|
1969
|
+
retries: number,
|
|
1970
|
+
period: number,
|
|
1971
|
+
) => ChainSubmittableExtrinsic<
|
|
1972
|
+
Rv,
|
|
1973
|
+
{
|
|
1974
|
+
pallet: 'Scheduler';
|
|
1975
|
+
palletCall: {
|
|
1976
|
+
name: 'SetRetry';
|
|
1977
|
+
params: { task: [number, number]; retries: number; period: number };
|
|
1978
|
+
};
|
|
1979
|
+
}
|
|
1980
|
+
>
|
|
1981
|
+
>;
|
|
1982
|
+
|
|
1983
|
+
/**
|
|
1984
|
+
* Set a retry configuration for a named task so that, in case its scheduled run fails, it
|
|
1985
|
+
* will be retried after `period` blocks, for a total amount of `retries` retries or until
|
|
1986
|
+
* it succeeds.
|
|
1987
|
+
*
|
|
1988
|
+
* Tasks which need to be scheduled for a retry are still subject to weight metering and
|
|
1989
|
+
* agenda space, same as a regular task. If a periodic task fails, it will be scheduled
|
|
1990
|
+
* normally while the task is retrying.
|
|
1991
|
+
*
|
|
1992
|
+
* Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic
|
|
1993
|
+
* clones of the original task. Their retry configuration will be derived from the
|
|
1994
|
+
* original task's configuration, but will have a lower value for `remaining` than the
|
|
1995
|
+
* original `total_retries`.
|
|
1996
|
+
*
|
|
1997
|
+
* @param {FixedBytes<32>} id
|
|
1998
|
+
* @param {number} retries
|
|
1999
|
+
* @param {number} period
|
|
2000
|
+
**/
|
|
2001
|
+
setRetryNamed: GenericTxCall<
|
|
2002
|
+
Rv,
|
|
2003
|
+
(
|
|
2004
|
+
id: FixedBytes<32>,
|
|
2005
|
+
retries: number,
|
|
2006
|
+
period: number,
|
|
2007
|
+
) => ChainSubmittableExtrinsic<
|
|
2008
|
+
Rv,
|
|
2009
|
+
{
|
|
2010
|
+
pallet: 'Scheduler';
|
|
2011
|
+
palletCall: {
|
|
2012
|
+
name: 'SetRetryNamed';
|
|
2013
|
+
params: { id: FixedBytes<32>; retries: number; period: number };
|
|
2014
|
+
};
|
|
2015
|
+
}
|
|
2016
|
+
>
|
|
2017
|
+
>;
|
|
2018
|
+
|
|
2019
|
+
/**
|
|
2020
|
+
* Removes the retry configuration of a task.
|
|
2021
|
+
*
|
|
2022
|
+
* @param {[number, number]} task
|
|
2023
|
+
**/
|
|
2024
|
+
cancelRetry: GenericTxCall<
|
|
2025
|
+
Rv,
|
|
2026
|
+
(task: [number, number]) => ChainSubmittableExtrinsic<
|
|
2027
|
+
Rv,
|
|
2028
|
+
{
|
|
2029
|
+
pallet: 'Scheduler';
|
|
2030
|
+
palletCall: {
|
|
2031
|
+
name: 'CancelRetry';
|
|
2032
|
+
params: { task: [number, number] };
|
|
2033
|
+
};
|
|
2034
|
+
}
|
|
2035
|
+
>
|
|
2036
|
+
>;
|
|
2037
|
+
|
|
2038
|
+
/**
|
|
2039
|
+
* Cancel the retry configuration of a named task.
|
|
2040
|
+
*
|
|
2041
|
+
* @param {FixedBytes<32>} id
|
|
2042
|
+
**/
|
|
2043
|
+
cancelRetryNamed: GenericTxCall<
|
|
2044
|
+
Rv,
|
|
2045
|
+
(id: FixedBytes<32>) => ChainSubmittableExtrinsic<
|
|
2046
|
+
Rv,
|
|
2047
|
+
{
|
|
2048
|
+
pallet: 'Scheduler';
|
|
2049
|
+
palletCall: {
|
|
2050
|
+
name: 'CancelRetryNamed';
|
|
2051
|
+
params: { id: FixedBytes<32> };
|
|
2052
|
+
};
|
|
2053
|
+
}
|
|
2054
|
+
>
|
|
2055
|
+
>;
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* Generic pallet tx call
|
|
2059
|
+
**/
|
|
2060
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
2061
|
+
};
|
|
1761
2062
|
/**
|
|
1762
2063
|
* Pallet `ParachainSystem`'s transaction calls
|
|
1763
2064
|
**/
|
|
@@ -2106,22 +2407,29 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
2106
2407
|
>;
|
|
2107
2408
|
|
|
2108
2409
|
/**
|
|
2410
|
+
* Burn the specified liquid free balance from the origin account.
|
|
2411
|
+
*
|
|
2412
|
+
* If the origin's account ends up below the existential deposit as a result
|
|
2413
|
+
* of the burn and `keep_alive` is false, the account will be reaped.
|
|
2414
|
+
*
|
|
2415
|
+
* Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,
|
|
2416
|
+
* this `burn` operation will reduce total issuance by the amount _burned_.
|
|
2109
2417
|
*
|
|
2110
2418
|
* @param {bigint} value
|
|
2111
|
-
* @param {boolean}
|
|
2419
|
+
* @param {boolean} keepAlive
|
|
2112
2420
|
**/
|
|
2113
2421
|
burn: GenericTxCall<
|
|
2114
2422
|
Rv,
|
|
2115
2423
|
(
|
|
2116
2424
|
value: bigint,
|
|
2117
|
-
|
|
2425
|
+
keepAlive: boolean,
|
|
2118
2426
|
) => ChainSubmittableExtrinsic<
|
|
2119
2427
|
Rv,
|
|
2120
2428
|
{
|
|
2121
2429
|
pallet: 'Balances';
|
|
2122
2430
|
palletCall: {
|
|
2123
2431
|
name: 'Burn';
|
|
2124
|
-
params: { value: bigint;
|
|
2432
|
+
params: { value: bigint; keepAlive: boolean };
|
|
2125
2433
|
};
|
|
2126
2434
|
}
|
|
2127
2435
|
>
|
|
@@ -2822,17 +3130,17 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
2822
3130
|
*
|
|
2823
3131
|
* Can only be called by the root origin.
|
|
2824
3132
|
*
|
|
2825
|
-
* @param {
|
|
3133
|
+
* @param {PalletDappStakingForcingType} forcingType
|
|
2826
3134
|
**/
|
|
2827
3135
|
force: GenericTxCall<
|
|
2828
3136
|
Rv,
|
|
2829
|
-
(forcingType:
|
|
3137
|
+
(forcingType: PalletDappStakingForcingType) => ChainSubmittableExtrinsic<
|
|
2830
3138
|
Rv,
|
|
2831
3139
|
{
|
|
2832
3140
|
pallet: 'DappStaking';
|
|
2833
3141
|
palletCall: {
|
|
2834
3142
|
name: 'Force';
|
|
2835
|
-
params: { forcingType:
|
|
3143
|
+
params: { forcingType: PalletDappStakingForcingType };
|
|
2836
3144
|
};
|
|
2837
3145
|
}
|
|
2838
3146
|
>
|
|
@@ -2881,34 +3189,6 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
2881
3189
|
>
|
|
2882
3190
|
>;
|
|
2883
3191
|
|
|
2884
|
-
/**
|
|
2885
|
-
* A call used to fix accounts with inconsistent state, where frozen balance is actually higher than what's available.
|
|
2886
|
-
*
|
|
2887
|
-
* The approach is as simple as possible:
|
|
2888
|
-
* 1. Caller provides an account to fix.
|
|
2889
|
-
* 2. If account is eligible for the fix, all unlocking chunks are modified to be claimable immediately.
|
|
2890
|
-
* 3. The `claim_unlocked` call is executed using the provided account as the origin.
|
|
2891
|
-
* 4. All states are updated accordingly, and the account is no longer in an inconsistent state.
|
|
2892
|
-
*
|
|
2893
|
-
* The benchmarked weight of the `claim_unlocked` call is used as a base, and additional overestimated weight is added.
|
|
2894
|
-
* Call doesn't touch any storage items that aren't already touched by the `claim_unlocked` call, hence the simplified approach.
|
|
2895
|
-
*
|
|
2896
|
-
* @param {AccountId32Like} account
|
|
2897
|
-
**/
|
|
2898
|
-
fixAccount: GenericTxCall<
|
|
2899
|
-
Rv,
|
|
2900
|
-
(account: AccountId32Like) => ChainSubmittableExtrinsic<
|
|
2901
|
-
Rv,
|
|
2902
|
-
{
|
|
2903
|
-
pallet: 'DappStaking';
|
|
2904
|
-
palletCall: {
|
|
2905
|
-
name: 'FixAccount';
|
|
2906
|
-
params: { account: AccountId32Like };
|
|
2907
|
-
};
|
|
2908
|
-
}
|
|
2909
|
-
>
|
|
2910
|
-
>;
|
|
2911
|
-
|
|
2912
3192
|
/**
|
|
2913
3193
|
* Generic pallet tx call
|
|
2914
3194
|
**/
|
|
@@ -2929,7 +3209,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
2929
3209
|
*
|
|
2930
3210
|
* Parameters:
|
|
2931
3211
|
* - `id`: The identifier of the new asset. This must not be currently in use to identify
|
|
2932
|
-
* an existing asset.
|
|
3212
|
+
* an existing asset. If [`NextAssetId`] is set, then this must be equal to it.
|
|
2933
3213
|
* - `admin`: The admin of this class of assets. The admin is the initial address of each
|
|
2934
3214
|
* member of the asset class's admin team.
|
|
2935
3215
|
* - `min_balance`: The minimum balance of this new asset that any single account must
|
|
@@ -2971,7 +3251,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
2971
3251
|
* Unlike `create`, no funds are reserved.
|
|
2972
3252
|
*
|
|
2973
3253
|
* - `id`: The identifier of the new asset. This must not be currently in use to identify
|
|
2974
|
-
* an existing asset.
|
|
3254
|
+
* an existing asset. If [`NextAssetId`] is set, then this must be equal to it.
|
|
2975
3255
|
* - `owner`: The owner of this class of assets. The owner has full superuser permissions
|
|
2976
3256
|
* over this asset, but may later change and configure the permissions using
|
|
2977
3257
|
* `transfer_ownership` and `set_team`.
|
|
@@ -5145,7 +5425,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
5145
5425
|
* - `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
5146
5426
|
* fee on the `dest` (and possibly reserve) chains.
|
|
5147
5427
|
* - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`.
|
|
5148
|
-
* - `remote_fees_id`: One of the included `assets` to be
|
|
5428
|
+
* - `remote_fees_id`: One of the included `assets` to be used to pay fees.
|
|
5149
5429
|
* - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets.
|
|
5150
5430
|
* - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the
|
|
5151
5431
|
* transfer, which also determines what happens to the assets on the destination chain.
|
|
@@ -6319,115 +6599,2883 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
6319
6599
|
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
6320
6600
|
};
|
|
6321
6601
|
/**
|
|
6322
|
-
* Pallet `
|
|
6602
|
+
* Pallet `Preimage`'s transaction calls
|
|
6323
6603
|
**/
|
|
6324
|
-
|
|
6604
|
+
preimage: {
|
|
6325
6605
|
/**
|
|
6326
|
-
*
|
|
6606
|
+
* Register a preimage on-chain.
|
|
6327
6607
|
*
|
|
6328
|
-
*
|
|
6608
|
+
* If the preimage was previously requested, no fees or deposits are taken for providing
|
|
6609
|
+
* the preimage. Otherwise, a deposit is taken proportional to the size of the preimage.
|
|
6610
|
+
*
|
|
6611
|
+
* @param {BytesLike} bytes
|
|
6329
6612
|
**/
|
|
6330
|
-
|
|
6613
|
+
notePreimage: GenericTxCall<
|
|
6331
6614
|
Rv,
|
|
6332
|
-
(
|
|
6615
|
+
(bytes: BytesLike) => ChainSubmittableExtrinsic<
|
|
6333
6616
|
Rv,
|
|
6334
6617
|
{
|
|
6335
|
-
pallet: '
|
|
6618
|
+
pallet: 'Preimage';
|
|
6336
6619
|
palletCall: {
|
|
6337
|
-
name: '
|
|
6338
|
-
params: {
|
|
6620
|
+
name: 'NotePreimage';
|
|
6621
|
+
params: { bytes: BytesLike };
|
|
6339
6622
|
};
|
|
6340
6623
|
}
|
|
6341
6624
|
>
|
|
6342
6625
|
>;
|
|
6343
6626
|
|
|
6344
6627
|
/**
|
|
6345
|
-
*
|
|
6346
|
-
* This function does not check the weight of the call, and instead allows the
|
|
6347
|
-
* Sudo user to specify the weight of the call.
|
|
6628
|
+
* Clear an unrequested preimage from the runtime storage.
|
|
6348
6629
|
*
|
|
6349
|
-
*
|
|
6630
|
+
* If `len` is provided, then it will be a much cheaper operation.
|
|
6350
6631
|
*
|
|
6351
|
-
*
|
|
6352
|
-
*
|
|
6632
|
+
* - `hash`: The hash of the preimage to be removed from the store.
|
|
6633
|
+
* - `len`: The length of the preimage of `hash`.
|
|
6634
|
+
*
|
|
6635
|
+
* @param {H256} hash
|
|
6353
6636
|
**/
|
|
6354
|
-
|
|
6637
|
+
unnotePreimage: GenericTxCall<
|
|
6355
6638
|
Rv,
|
|
6356
|
-
(
|
|
6357
|
-
call: AstarRuntimeRuntimeCallLike,
|
|
6358
|
-
weight: SpWeightsWeightV2Weight,
|
|
6359
|
-
) => ChainSubmittableExtrinsic<
|
|
6639
|
+
(hash: H256) => ChainSubmittableExtrinsic<
|
|
6360
6640
|
Rv,
|
|
6361
6641
|
{
|
|
6362
|
-
pallet: '
|
|
6642
|
+
pallet: 'Preimage';
|
|
6363
6643
|
palletCall: {
|
|
6364
|
-
name: '
|
|
6365
|
-
params: {
|
|
6644
|
+
name: 'UnnotePreimage';
|
|
6645
|
+
params: { hash: H256 };
|
|
6366
6646
|
};
|
|
6367
6647
|
}
|
|
6368
6648
|
>
|
|
6369
6649
|
>;
|
|
6370
6650
|
|
|
6371
6651
|
/**
|
|
6372
|
-
*
|
|
6373
|
-
* key.
|
|
6652
|
+
* Request a preimage be uploaded to the chain without paying any fees or deposits.
|
|
6374
6653
|
*
|
|
6375
|
-
*
|
|
6654
|
+
* If the preimage requests has already been provided on-chain, we unreserve any deposit
|
|
6655
|
+
* a user may have paid, and take the control of the preimage out of their hands.
|
|
6656
|
+
*
|
|
6657
|
+
* @param {H256} hash
|
|
6376
6658
|
**/
|
|
6377
|
-
|
|
6659
|
+
requestPreimage: GenericTxCall<
|
|
6378
6660
|
Rv,
|
|
6379
|
-
(
|
|
6661
|
+
(hash: H256) => ChainSubmittableExtrinsic<
|
|
6380
6662
|
Rv,
|
|
6381
6663
|
{
|
|
6382
|
-
pallet: '
|
|
6664
|
+
pallet: 'Preimage';
|
|
6383
6665
|
palletCall: {
|
|
6384
|
-
name: '
|
|
6385
|
-
params: {
|
|
6666
|
+
name: 'RequestPreimage';
|
|
6667
|
+
params: { hash: H256 };
|
|
6386
6668
|
};
|
|
6387
6669
|
}
|
|
6388
6670
|
>
|
|
6389
6671
|
>;
|
|
6390
6672
|
|
|
6391
6673
|
/**
|
|
6392
|
-
*
|
|
6393
|
-
* a given account.
|
|
6674
|
+
* Clear a previously made request for a preimage.
|
|
6394
6675
|
*
|
|
6395
|
-
*
|
|
6676
|
+
* NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`.
|
|
6396
6677
|
*
|
|
6397
|
-
* @param {
|
|
6398
|
-
* @param {AstarRuntimeRuntimeCallLike} call
|
|
6678
|
+
* @param {H256} hash
|
|
6399
6679
|
**/
|
|
6400
|
-
|
|
6680
|
+
unrequestPreimage: GenericTxCall<
|
|
6401
6681
|
Rv,
|
|
6402
|
-
(
|
|
6403
|
-
who: MultiAddressLike,
|
|
6404
|
-
call: AstarRuntimeRuntimeCallLike,
|
|
6405
|
-
) => ChainSubmittableExtrinsic<
|
|
6682
|
+
(hash: H256) => ChainSubmittableExtrinsic<
|
|
6406
6683
|
Rv,
|
|
6407
6684
|
{
|
|
6408
|
-
pallet: '
|
|
6685
|
+
pallet: 'Preimage';
|
|
6409
6686
|
palletCall: {
|
|
6410
|
-
name: '
|
|
6411
|
-
params: {
|
|
6687
|
+
name: 'UnrequestPreimage';
|
|
6688
|
+
params: { hash: H256 };
|
|
6412
6689
|
};
|
|
6413
6690
|
}
|
|
6414
6691
|
>
|
|
6415
6692
|
>;
|
|
6416
6693
|
|
|
6417
6694
|
/**
|
|
6418
|
-
*
|
|
6695
|
+
* Ensure that the a bulk of pre-images is upgraded.
|
|
6419
6696
|
*
|
|
6420
|
-
*
|
|
6697
|
+
* The caller pays no fee if at least 90% of pre-images were successfully updated.
|
|
6421
6698
|
*
|
|
6699
|
+
* @param {Array<H256>} hashes
|
|
6422
6700
|
**/
|
|
6423
|
-
|
|
6701
|
+
ensureUpdated: GenericTxCall<
|
|
6424
6702
|
Rv,
|
|
6425
|
-
() => ChainSubmittableExtrinsic<
|
|
6703
|
+
(hashes: Array<H256>) => ChainSubmittableExtrinsic<
|
|
6426
6704
|
Rv,
|
|
6427
6705
|
{
|
|
6428
|
-
pallet: '
|
|
6706
|
+
pallet: 'Preimage';
|
|
6429
6707
|
palletCall: {
|
|
6430
|
-
name: '
|
|
6708
|
+
name: 'EnsureUpdated';
|
|
6709
|
+
params: { hashes: Array<H256> };
|
|
6710
|
+
};
|
|
6711
|
+
}
|
|
6712
|
+
>
|
|
6713
|
+
>;
|
|
6714
|
+
|
|
6715
|
+
/**
|
|
6716
|
+
* Generic pallet tx call
|
|
6717
|
+
**/
|
|
6718
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
6719
|
+
};
|
|
6720
|
+
/**
|
|
6721
|
+
* Pallet `Sudo`'s transaction calls
|
|
6722
|
+
**/
|
|
6723
|
+
sudo: {
|
|
6724
|
+
/**
|
|
6725
|
+
* Authenticates the sudo key and dispatches a function call with `Root` origin.
|
|
6726
|
+
*
|
|
6727
|
+
* @param {AstarRuntimeRuntimeCallLike} call
|
|
6728
|
+
**/
|
|
6729
|
+
sudo: GenericTxCall<
|
|
6730
|
+
Rv,
|
|
6731
|
+
(call: AstarRuntimeRuntimeCallLike) => ChainSubmittableExtrinsic<
|
|
6732
|
+
Rv,
|
|
6733
|
+
{
|
|
6734
|
+
pallet: 'Sudo';
|
|
6735
|
+
palletCall: {
|
|
6736
|
+
name: 'Sudo';
|
|
6737
|
+
params: { call: AstarRuntimeRuntimeCallLike };
|
|
6738
|
+
};
|
|
6739
|
+
}
|
|
6740
|
+
>
|
|
6741
|
+
>;
|
|
6742
|
+
|
|
6743
|
+
/**
|
|
6744
|
+
* Authenticates the sudo key and dispatches a function call with `Root` origin.
|
|
6745
|
+
* This function does not check the weight of the call, and instead allows the
|
|
6746
|
+
* Sudo user to specify the weight of the call.
|
|
6747
|
+
*
|
|
6748
|
+
* The dispatch origin for this call must be _Signed_.
|
|
6749
|
+
*
|
|
6750
|
+
* @param {AstarRuntimeRuntimeCallLike} call
|
|
6751
|
+
* @param {SpWeightsWeightV2Weight} weight
|
|
6752
|
+
**/
|
|
6753
|
+
sudoUncheckedWeight: GenericTxCall<
|
|
6754
|
+
Rv,
|
|
6755
|
+
(
|
|
6756
|
+
call: AstarRuntimeRuntimeCallLike,
|
|
6757
|
+
weight: SpWeightsWeightV2Weight,
|
|
6758
|
+
) => ChainSubmittableExtrinsic<
|
|
6759
|
+
Rv,
|
|
6760
|
+
{
|
|
6761
|
+
pallet: 'Sudo';
|
|
6762
|
+
palletCall: {
|
|
6763
|
+
name: 'SudoUncheckedWeight';
|
|
6764
|
+
params: { call: AstarRuntimeRuntimeCallLike; weight: SpWeightsWeightV2Weight };
|
|
6765
|
+
};
|
|
6766
|
+
}
|
|
6767
|
+
>
|
|
6768
|
+
>;
|
|
6769
|
+
|
|
6770
|
+
/**
|
|
6771
|
+
* Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo
|
|
6772
|
+
* key.
|
|
6773
|
+
*
|
|
6774
|
+
* @param {MultiAddressLike} new_
|
|
6775
|
+
**/
|
|
6776
|
+
setKey: GenericTxCall<
|
|
6777
|
+
Rv,
|
|
6778
|
+
(new_: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
6779
|
+
Rv,
|
|
6780
|
+
{
|
|
6781
|
+
pallet: 'Sudo';
|
|
6782
|
+
palletCall: {
|
|
6783
|
+
name: 'SetKey';
|
|
6784
|
+
params: { new: MultiAddressLike };
|
|
6785
|
+
};
|
|
6786
|
+
}
|
|
6787
|
+
>
|
|
6788
|
+
>;
|
|
6789
|
+
|
|
6790
|
+
/**
|
|
6791
|
+
* Authenticates the sudo key and dispatches a function call with `Signed` origin from
|
|
6792
|
+
* a given account.
|
|
6793
|
+
*
|
|
6794
|
+
* The dispatch origin for this call must be _Signed_.
|
|
6795
|
+
*
|
|
6796
|
+
* @param {MultiAddressLike} who
|
|
6797
|
+
* @param {AstarRuntimeRuntimeCallLike} call
|
|
6798
|
+
**/
|
|
6799
|
+
sudoAs: GenericTxCall<
|
|
6800
|
+
Rv,
|
|
6801
|
+
(
|
|
6802
|
+
who: MultiAddressLike,
|
|
6803
|
+
call: AstarRuntimeRuntimeCallLike,
|
|
6804
|
+
) => ChainSubmittableExtrinsic<
|
|
6805
|
+
Rv,
|
|
6806
|
+
{
|
|
6807
|
+
pallet: 'Sudo';
|
|
6808
|
+
palletCall: {
|
|
6809
|
+
name: 'SudoAs';
|
|
6810
|
+
params: { who: MultiAddressLike; call: AstarRuntimeRuntimeCallLike };
|
|
6811
|
+
};
|
|
6812
|
+
}
|
|
6813
|
+
>
|
|
6814
|
+
>;
|
|
6815
|
+
|
|
6816
|
+
/**
|
|
6817
|
+
* Permanently removes the sudo key.
|
|
6818
|
+
*
|
|
6819
|
+
* **This cannot be un-done.**
|
|
6820
|
+
*
|
|
6821
|
+
**/
|
|
6822
|
+
removeKey: GenericTxCall<
|
|
6823
|
+
Rv,
|
|
6824
|
+
() => ChainSubmittableExtrinsic<
|
|
6825
|
+
Rv,
|
|
6826
|
+
{
|
|
6827
|
+
pallet: 'Sudo';
|
|
6828
|
+
palletCall: {
|
|
6829
|
+
name: 'RemoveKey';
|
|
6830
|
+
};
|
|
6831
|
+
}
|
|
6832
|
+
>
|
|
6833
|
+
>;
|
|
6834
|
+
|
|
6835
|
+
/**
|
|
6836
|
+
* Generic pallet tx call
|
|
6837
|
+
**/
|
|
6838
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
6839
|
+
};
|
|
6840
|
+
/**
|
|
6841
|
+
* Pallet `CouncilMembership`'s transaction calls
|
|
6842
|
+
**/
|
|
6843
|
+
councilMembership: {
|
|
6844
|
+
/**
|
|
6845
|
+
* Add a member `who` to the set.
|
|
6846
|
+
*
|
|
6847
|
+
* May only be called from `T::AddOrigin`.
|
|
6848
|
+
*
|
|
6849
|
+
* @param {MultiAddressLike} who
|
|
6850
|
+
**/
|
|
6851
|
+
addMember: GenericTxCall<
|
|
6852
|
+
Rv,
|
|
6853
|
+
(who: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
6854
|
+
Rv,
|
|
6855
|
+
{
|
|
6856
|
+
pallet: 'CouncilMembership';
|
|
6857
|
+
palletCall: {
|
|
6858
|
+
name: 'AddMember';
|
|
6859
|
+
params: { who: MultiAddressLike };
|
|
6860
|
+
};
|
|
6861
|
+
}
|
|
6862
|
+
>
|
|
6863
|
+
>;
|
|
6864
|
+
|
|
6865
|
+
/**
|
|
6866
|
+
* Remove a member `who` from the set.
|
|
6867
|
+
*
|
|
6868
|
+
* May only be called from `T::RemoveOrigin`.
|
|
6869
|
+
*
|
|
6870
|
+
* @param {MultiAddressLike} who
|
|
6871
|
+
**/
|
|
6872
|
+
removeMember: GenericTxCall<
|
|
6873
|
+
Rv,
|
|
6874
|
+
(who: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
6875
|
+
Rv,
|
|
6876
|
+
{
|
|
6877
|
+
pallet: 'CouncilMembership';
|
|
6878
|
+
palletCall: {
|
|
6879
|
+
name: 'RemoveMember';
|
|
6880
|
+
params: { who: MultiAddressLike };
|
|
6881
|
+
};
|
|
6882
|
+
}
|
|
6883
|
+
>
|
|
6884
|
+
>;
|
|
6885
|
+
|
|
6886
|
+
/**
|
|
6887
|
+
* Swap out one member `remove` for another `add`.
|
|
6888
|
+
*
|
|
6889
|
+
* May only be called from `T::SwapOrigin`.
|
|
6890
|
+
*
|
|
6891
|
+
* Prime membership is *not* passed from `remove` to `add`, if extant.
|
|
6892
|
+
*
|
|
6893
|
+
* @param {MultiAddressLike} remove
|
|
6894
|
+
* @param {MultiAddressLike} add
|
|
6895
|
+
**/
|
|
6896
|
+
swapMember: GenericTxCall<
|
|
6897
|
+
Rv,
|
|
6898
|
+
(
|
|
6899
|
+
remove: MultiAddressLike,
|
|
6900
|
+
add: MultiAddressLike,
|
|
6901
|
+
) => ChainSubmittableExtrinsic<
|
|
6902
|
+
Rv,
|
|
6903
|
+
{
|
|
6904
|
+
pallet: 'CouncilMembership';
|
|
6905
|
+
palletCall: {
|
|
6906
|
+
name: 'SwapMember';
|
|
6907
|
+
params: { remove: MultiAddressLike; add: MultiAddressLike };
|
|
6908
|
+
};
|
|
6909
|
+
}
|
|
6910
|
+
>
|
|
6911
|
+
>;
|
|
6912
|
+
|
|
6913
|
+
/**
|
|
6914
|
+
* Change the membership to a new set, disregarding the existing membership. Be nice and
|
|
6915
|
+
* pass `members` pre-sorted.
|
|
6916
|
+
*
|
|
6917
|
+
* May only be called from `T::ResetOrigin`.
|
|
6918
|
+
*
|
|
6919
|
+
* @param {Array<AccountId32Like>} members
|
|
6920
|
+
**/
|
|
6921
|
+
resetMembers: GenericTxCall<
|
|
6922
|
+
Rv,
|
|
6923
|
+
(members: Array<AccountId32Like>) => ChainSubmittableExtrinsic<
|
|
6924
|
+
Rv,
|
|
6925
|
+
{
|
|
6926
|
+
pallet: 'CouncilMembership';
|
|
6927
|
+
palletCall: {
|
|
6928
|
+
name: 'ResetMembers';
|
|
6929
|
+
params: { members: Array<AccountId32Like> };
|
|
6930
|
+
};
|
|
6931
|
+
}
|
|
6932
|
+
>
|
|
6933
|
+
>;
|
|
6934
|
+
|
|
6935
|
+
/**
|
|
6936
|
+
* Swap out the sending member for some other key `new`.
|
|
6937
|
+
*
|
|
6938
|
+
* May only be called from `Signed` origin of a current member.
|
|
6939
|
+
*
|
|
6940
|
+
* Prime membership is passed from the origin account to `new`, if extant.
|
|
6941
|
+
*
|
|
6942
|
+
* @param {MultiAddressLike} new_
|
|
6943
|
+
**/
|
|
6944
|
+
changeKey: GenericTxCall<
|
|
6945
|
+
Rv,
|
|
6946
|
+
(new_: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
6947
|
+
Rv,
|
|
6948
|
+
{
|
|
6949
|
+
pallet: 'CouncilMembership';
|
|
6950
|
+
palletCall: {
|
|
6951
|
+
name: 'ChangeKey';
|
|
6952
|
+
params: { new: MultiAddressLike };
|
|
6953
|
+
};
|
|
6954
|
+
}
|
|
6955
|
+
>
|
|
6956
|
+
>;
|
|
6957
|
+
|
|
6958
|
+
/**
|
|
6959
|
+
* Set the prime member. Must be a current member.
|
|
6960
|
+
*
|
|
6961
|
+
* May only be called from `T::PrimeOrigin`.
|
|
6962
|
+
*
|
|
6963
|
+
* @param {MultiAddressLike} who
|
|
6964
|
+
**/
|
|
6965
|
+
setPrime: GenericTxCall<
|
|
6966
|
+
Rv,
|
|
6967
|
+
(who: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
6968
|
+
Rv,
|
|
6969
|
+
{
|
|
6970
|
+
pallet: 'CouncilMembership';
|
|
6971
|
+
palletCall: {
|
|
6972
|
+
name: 'SetPrime';
|
|
6973
|
+
params: { who: MultiAddressLike };
|
|
6974
|
+
};
|
|
6975
|
+
}
|
|
6976
|
+
>
|
|
6977
|
+
>;
|
|
6978
|
+
|
|
6979
|
+
/**
|
|
6980
|
+
* Remove the prime member if it exists.
|
|
6981
|
+
*
|
|
6982
|
+
* May only be called from `T::PrimeOrigin`.
|
|
6983
|
+
*
|
|
6984
|
+
**/
|
|
6985
|
+
clearPrime: GenericTxCall<
|
|
6986
|
+
Rv,
|
|
6987
|
+
() => ChainSubmittableExtrinsic<
|
|
6988
|
+
Rv,
|
|
6989
|
+
{
|
|
6990
|
+
pallet: 'CouncilMembership';
|
|
6991
|
+
palletCall: {
|
|
6992
|
+
name: 'ClearPrime';
|
|
6993
|
+
};
|
|
6994
|
+
}
|
|
6995
|
+
>
|
|
6996
|
+
>;
|
|
6997
|
+
|
|
6998
|
+
/**
|
|
6999
|
+
* Generic pallet tx call
|
|
7000
|
+
**/
|
|
7001
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
7002
|
+
};
|
|
7003
|
+
/**
|
|
7004
|
+
* Pallet `TechnicalCommitteeMembership`'s transaction calls
|
|
7005
|
+
**/
|
|
7006
|
+
technicalCommitteeMembership: {
|
|
7007
|
+
/**
|
|
7008
|
+
* Add a member `who` to the set.
|
|
7009
|
+
*
|
|
7010
|
+
* May only be called from `T::AddOrigin`.
|
|
7011
|
+
*
|
|
7012
|
+
* @param {MultiAddressLike} who
|
|
7013
|
+
**/
|
|
7014
|
+
addMember: GenericTxCall<
|
|
7015
|
+
Rv,
|
|
7016
|
+
(who: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
7017
|
+
Rv,
|
|
7018
|
+
{
|
|
7019
|
+
pallet: 'TechnicalCommitteeMembership';
|
|
7020
|
+
palletCall: {
|
|
7021
|
+
name: 'AddMember';
|
|
7022
|
+
params: { who: MultiAddressLike };
|
|
7023
|
+
};
|
|
7024
|
+
}
|
|
7025
|
+
>
|
|
7026
|
+
>;
|
|
7027
|
+
|
|
7028
|
+
/**
|
|
7029
|
+
* Remove a member `who` from the set.
|
|
7030
|
+
*
|
|
7031
|
+
* May only be called from `T::RemoveOrigin`.
|
|
7032
|
+
*
|
|
7033
|
+
* @param {MultiAddressLike} who
|
|
7034
|
+
**/
|
|
7035
|
+
removeMember: GenericTxCall<
|
|
7036
|
+
Rv,
|
|
7037
|
+
(who: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
7038
|
+
Rv,
|
|
7039
|
+
{
|
|
7040
|
+
pallet: 'TechnicalCommitteeMembership';
|
|
7041
|
+
palletCall: {
|
|
7042
|
+
name: 'RemoveMember';
|
|
7043
|
+
params: { who: MultiAddressLike };
|
|
7044
|
+
};
|
|
7045
|
+
}
|
|
7046
|
+
>
|
|
7047
|
+
>;
|
|
7048
|
+
|
|
7049
|
+
/**
|
|
7050
|
+
* Swap out one member `remove` for another `add`.
|
|
7051
|
+
*
|
|
7052
|
+
* May only be called from `T::SwapOrigin`.
|
|
7053
|
+
*
|
|
7054
|
+
* Prime membership is *not* passed from `remove` to `add`, if extant.
|
|
7055
|
+
*
|
|
7056
|
+
* @param {MultiAddressLike} remove
|
|
7057
|
+
* @param {MultiAddressLike} add
|
|
7058
|
+
**/
|
|
7059
|
+
swapMember: GenericTxCall<
|
|
7060
|
+
Rv,
|
|
7061
|
+
(
|
|
7062
|
+
remove: MultiAddressLike,
|
|
7063
|
+
add: MultiAddressLike,
|
|
7064
|
+
) => ChainSubmittableExtrinsic<
|
|
7065
|
+
Rv,
|
|
7066
|
+
{
|
|
7067
|
+
pallet: 'TechnicalCommitteeMembership';
|
|
7068
|
+
palletCall: {
|
|
7069
|
+
name: 'SwapMember';
|
|
7070
|
+
params: { remove: MultiAddressLike; add: MultiAddressLike };
|
|
7071
|
+
};
|
|
7072
|
+
}
|
|
7073
|
+
>
|
|
7074
|
+
>;
|
|
7075
|
+
|
|
7076
|
+
/**
|
|
7077
|
+
* Change the membership to a new set, disregarding the existing membership. Be nice and
|
|
7078
|
+
* pass `members` pre-sorted.
|
|
7079
|
+
*
|
|
7080
|
+
* May only be called from `T::ResetOrigin`.
|
|
7081
|
+
*
|
|
7082
|
+
* @param {Array<AccountId32Like>} members
|
|
7083
|
+
**/
|
|
7084
|
+
resetMembers: GenericTxCall<
|
|
7085
|
+
Rv,
|
|
7086
|
+
(members: Array<AccountId32Like>) => ChainSubmittableExtrinsic<
|
|
7087
|
+
Rv,
|
|
7088
|
+
{
|
|
7089
|
+
pallet: 'TechnicalCommitteeMembership';
|
|
7090
|
+
palletCall: {
|
|
7091
|
+
name: 'ResetMembers';
|
|
7092
|
+
params: { members: Array<AccountId32Like> };
|
|
7093
|
+
};
|
|
7094
|
+
}
|
|
7095
|
+
>
|
|
7096
|
+
>;
|
|
7097
|
+
|
|
7098
|
+
/**
|
|
7099
|
+
* Swap out the sending member for some other key `new`.
|
|
7100
|
+
*
|
|
7101
|
+
* May only be called from `Signed` origin of a current member.
|
|
7102
|
+
*
|
|
7103
|
+
* Prime membership is passed from the origin account to `new`, if extant.
|
|
7104
|
+
*
|
|
7105
|
+
* @param {MultiAddressLike} new_
|
|
7106
|
+
**/
|
|
7107
|
+
changeKey: GenericTxCall<
|
|
7108
|
+
Rv,
|
|
7109
|
+
(new_: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
7110
|
+
Rv,
|
|
7111
|
+
{
|
|
7112
|
+
pallet: 'TechnicalCommitteeMembership';
|
|
7113
|
+
palletCall: {
|
|
7114
|
+
name: 'ChangeKey';
|
|
7115
|
+
params: { new: MultiAddressLike };
|
|
7116
|
+
};
|
|
7117
|
+
}
|
|
7118
|
+
>
|
|
7119
|
+
>;
|
|
7120
|
+
|
|
7121
|
+
/**
|
|
7122
|
+
* Set the prime member. Must be a current member.
|
|
7123
|
+
*
|
|
7124
|
+
* May only be called from `T::PrimeOrigin`.
|
|
7125
|
+
*
|
|
7126
|
+
* @param {MultiAddressLike} who
|
|
7127
|
+
**/
|
|
7128
|
+
setPrime: GenericTxCall<
|
|
7129
|
+
Rv,
|
|
7130
|
+
(who: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
7131
|
+
Rv,
|
|
7132
|
+
{
|
|
7133
|
+
pallet: 'TechnicalCommitteeMembership';
|
|
7134
|
+
palletCall: {
|
|
7135
|
+
name: 'SetPrime';
|
|
7136
|
+
params: { who: MultiAddressLike };
|
|
7137
|
+
};
|
|
7138
|
+
}
|
|
7139
|
+
>
|
|
7140
|
+
>;
|
|
7141
|
+
|
|
7142
|
+
/**
|
|
7143
|
+
* Remove the prime member if it exists.
|
|
7144
|
+
*
|
|
7145
|
+
* May only be called from `T::PrimeOrigin`.
|
|
7146
|
+
*
|
|
7147
|
+
**/
|
|
7148
|
+
clearPrime: GenericTxCall<
|
|
7149
|
+
Rv,
|
|
7150
|
+
() => ChainSubmittableExtrinsic<
|
|
7151
|
+
Rv,
|
|
7152
|
+
{
|
|
7153
|
+
pallet: 'TechnicalCommitteeMembership';
|
|
7154
|
+
palletCall: {
|
|
7155
|
+
name: 'ClearPrime';
|
|
7156
|
+
};
|
|
7157
|
+
}
|
|
7158
|
+
>
|
|
7159
|
+
>;
|
|
7160
|
+
|
|
7161
|
+
/**
|
|
7162
|
+
* Generic pallet tx call
|
|
7163
|
+
**/
|
|
7164
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
7165
|
+
};
|
|
7166
|
+
/**
|
|
7167
|
+
* Pallet `CommunityCouncilMembership`'s transaction calls
|
|
7168
|
+
**/
|
|
7169
|
+
communityCouncilMembership: {
|
|
7170
|
+
/**
|
|
7171
|
+
* Add a member `who` to the set.
|
|
7172
|
+
*
|
|
7173
|
+
* May only be called from `T::AddOrigin`.
|
|
7174
|
+
*
|
|
7175
|
+
* @param {MultiAddressLike} who
|
|
7176
|
+
**/
|
|
7177
|
+
addMember: GenericTxCall<
|
|
7178
|
+
Rv,
|
|
7179
|
+
(who: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
7180
|
+
Rv,
|
|
7181
|
+
{
|
|
7182
|
+
pallet: 'CommunityCouncilMembership';
|
|
7183
|
+
palletCall: {
|
|
7184
|
+
name: 'AddMember';
|
|
7185
|
+
params: { who: MultiAddressLike };
|
|
7186
|
+
};
|
|
7187
|
+
}
|
|
7188
|
+
>
|
|
7189
|
+
>;
|
|
7190
|
+
|
|
7191
|
+
/**
|
|
7192
|
+
* Remove a member `who` from the set.
|
|
7193
|
+
*
|
|
7194
|
+
* May only be called from `T::RemoveOrigin`.
|
|
7195
|
+
*
|
|
7196
|
+
* @param {MultiAddressLike} who
|
|
7197
|
+
**/
|
|
7198
|
+
removeMember: GenericTxCall<
|
|
7199
|
+
Rv,
|
|
7200
|
+
(who: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
7201
|
+
Rv,
|
|
7202
|
+
{
|
|
7203
|
+
pallet: 'CommunityCouncilMembership';
|
|
7204
|
+
palletCall: {
|
|
7205
|
+
name: 'RemoveMember';
|
|
7206
|
+
params: { who: MultiAddressLike };
|
|
7207
|
+
};
|
|
7208
|
+
}
|
|
7209
|
+
>
|
|
7210
|
+
>;
|
|
7211
|
+
|
|
7212
|
+
/**
|
|
7213
|
+
* Swap out one member `remove` for another `add`.
|
|
7214
|
+
*
|
|
7215
|
+
* May only be called from `T::SwapOrigin`.
|
|
7216
|
+
*
|
|
7217
|
+
* Prime membership is *not* passed from `remove` to `add`, if extant.
|
|
7218
|
+
*
|
|
7219
|
+
* @param {MultiAddressLike} remove
|
|
7220
|
+
* @param {MultiAddressLike} add
|
|
7221
|
+
**/
|
|
7222
|
+
swapMember: GenericTxCall<
|
|
7223
|
+
Rv,
|
|
7224
|
+
(
|
|
7225
|
+
remove: MultiAddressLike,
|
|
7226
|
+
add: MultiAddressLike,
|
|
7227
|
+
) => ChainSubmittableExtrinsic<
|
|
7228
|
+
Rv,
|
|
7229
|
+
{
|
|
7230
|
+
pallet: 'CommunityCouncilMembership';
|
|
7231
|
+
palletCall: {
|
|
7232
|
+
name: 'SwapMember';
|
|
7233
|
+
params: { remove: MultiAddressLike; add: MultiAddressLike };
|
|
7234
|
+
};
|
|
7235
|
+
}
|
|
7236
|
+
>
|
|
7237
|
+
>;
|
|
7238
|
+
|
|
7239
|
+
/**
|
|
7240
|
+
* Change the membership to a new set, disregarding the existing membership. Be nice and
|
|
7241
|
+
* pass `members` pre-sorted.
|
|
7242
|
+
*
|
|
7243
|
+
* May only be called from `T::ResetOrigin`.
|
|
7244
|
+
*
|
|
7245
|
+
* @param {Array<AccountId32Like>} members
|
|
7246
|
+
**/
|
|
7247
|
+
resetMembers: GenericTxCall<
|
|
7248
|
+
Rv,
|
|
7249
|
+
(members: Array<AccountId32Like>) => ChainSubmittableExtrinsic<
|
|
7250
|
+
Rv,
|
|
7251
|
+
{
|
|
7252
|
+
pallet: 'CommunityCouncilMembership';
|
|
7253
|
+
palletCall: {
|
|
7254
|
+
name: 'ResetMembers';
|
|
7255
|
+
params: { members: Array<AccountId32Like> };
|
|
7256
|
+
};
|
|
7257
|
+
}
|
|
7258
|
+
>
|
|
7259
|
+
>;
|
|
7260
|
+
|
|
7261
|
+
/**
|
|
7262
|
+
* Swap out the sending member for some other key `new`.
|
|
7263
|
+
*
|
|
7264
|
+
* May only be called from `Signed` origin of a current member.
|
|
7265
|
+
*
|
|
7266
|
+
* Prime membership is passed from the origin account to `new`, if extant.
|
|
7267
|
+
*
|
|
7268
|
+
* @param {MultiAddressLike} new_
|
|
7269
|
+
**/
|
|
7270
|
+
changeKey: GenericTxCall<
|
|
7271
|
+
Rv,
|
|
7272
|
+
(new_: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
7273
|
+
Rv,
|
|
7274
|
+
{
|
|
7275
|
+
pallet: 'CommunityCouncilMembership';
|
|
7276
|
+
palletCall: {
|
|
7277
|
+
name: 'ChangeKey';
|
|
7278
|
+
params: { new: MultiAddressLike };
|
|
7279
|
+
};
|
|
7280
|
+
}
|
|
7281
|
+
>
|
|
7282
|
+
>;
|
|
7283
|
+
|
|
7284
|
+
/**
|
|
7285
|
+
* Set the prime member. Must be a current member.
|
|
7286
|
+
*
|
|
7287
|
+
* May only be called from `T::PrimeOrigin`.
|
|
7288
|
+
*
|
|
7289
|
+
* @param {MultiAddressLike} who
|
|
7290
|
+
**/
|
|
7291
|
+
setPrime: GenericTxCall<
|
|
7292
|
+
Rv,
|
|
7293
|
+
(who: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
7294
|
+
Rv,
|
|
7295
|
+
{
|
|
7296
|
+
pallet: 'CommunityCouncilMembership';
|
|
7297
|
+
palletCall: {
|
|
7298
|
+
name: 'SetPrime';
|
|
7299
|
+
params: { who: MultiAddressLike };
|
|
7300
|
+
};
|
|
7301
|
+
}
|
|
7302
|
+
>
|
|
7303
|
+
>;
|
|
7304
|
+
|
|
7305
|
+
/**
|
|
7306
|
+
* Remove the prime member if it exists.
|
|
7307
|
+
*
|
|
7308
|
+
* May only be called from `T::PrimeOrigin`.
|
|
7309
|
+
*
|
|
7310
|
+
**/
|
|
7311
|
+
clearPrime: GenericTxCall<
|
|
7312
|
+
Rv,
|
|
7313
|
+
() => ChainSubmittableExtrinsic<
|
|
7314
|
+
Rv,
|
|
7315
|
+
{
|
|
7316
|
+
pallet: 'CommunityCouncilMembership';
|
|
7317
|
+
palletCall: {
|
|
7318
|
+
name: 'ClearPrime';
|
|
7319
|
+
};
|
|
7320
|
+
}
|
|
7321
|
+
>
|
|
7322
|
+
>;
|
|
7323
|
+
|
|
7324
|
+
/**
|
|
7325
|
+
* Generic pallet tx call
|
|
7326
|
+
**/
|
|
7327
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
7328
|
+
};
|
|
7329
|
+
/**
|
|
7330
|
+
* Pallet `Council`'s transaction calls
|
|
7331
|
+
**/
|
|
7332
|
+
council: {
|
|
7333
|
+
/**
|
|
7334
|
+
* Set the collective's membership.
|
|
7335
|
+
*
|
|
7336
|
+
* - `new_members`: The new member list. Be nice to the chain and provide it sorted.
|
|
7337
|
+
* - `prime`: The prime member whose vote sets the default.
|
|
7338
|
+
* - `old_count`: The upper bound for the previous number of members in storage. Used for
|
|
7339
|
+
* weight estimation.
|
|
7340
|
+
*
|
|
7341
|
+
* The dispatch of this call must be `SetMembersOrigin`.
|
|
7342
|
+
*
|
|
7343
|
+
* NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but
|
|
7344
|
+
* the weight estimations rely on it to estimate dispatchable weight.
|
|
7345
|
+
*
|
|
7346
|
+
* # WARNING:
|
|
7347
|
+
*
|
|
7348
|
+
* The `pallet-collective` can also be managed by logic outside of the pallet through the
|
|
7349
|
+
* implementation of the trait [`ChangeMembers`].
|
|
7350
|
+
* Any call to `set_members` must be careful that the member set doesn't get out of sync
|
|
7351
|
+
* with other logic managing the member set.
|
|
7352
|
+
*
|
|
7353
|
+
* ## Complexity:
|
|
7354
|
+
* - `O(MP + N)` where:
|
|
7355
|
+
* - `M` old-members-count (code- and governance-bounded)
|
|
7356
|
+
* - `N` new-members-count (code- and governance-bounded)
|
|
7357
|
+
* - `P` proposals-count (code-bounded)
|
|
7358
|
+
*
|
|
7359
|
+
* @param {Array<AccountId32Like>} newMembers
|
|
7360
|
+
* @param {AccountId32Like | undefined} prime
|
|
7361
|
+
* @param {number} oldCount
|
|
7362
|
+
**/
|
|
7363
|
+
setMembers: GenericTxCall<
|
|
7364
|
+
Rv,
|
|
7365
|
+
(
|
|
7366
|
+
newMembers: Array<AccountId32Like>,
|
|
7367
|
+
prime: AccountId32Like | undefined,
|
|
7368
|
+
oldCount: number,
|
|
7369
|
+
) => ChainSubmittableExtrinsic<
|
|
7370
|
+
Rv,
|
|
7371
|
+
{
|
|
7372
|
+
pallet: 'Council';
|
|
7373
|
+
palletCall: {
|
|
7374
|
+
name: 'SetMembers';
|
|
7375
|
+
params: { newMembers: Array<AccountId32Like>; prime: AccountId32Like | undefined; oldCount: number };
|
|
7376
|
+
};
|
|
7377
|
+
}
|
|
7378
|
+
>
|
|
7379
|
+
>;
|
|
7380
|
+
|
|
7381
|
+
/**
|
|
7382
|
+
* Dispatch a proposal from a member using the `Member` origin.
|
|
7383
|
+
*
|
|
7384
|
+
* Origin must be a member of the collective.
|
|
7385
|
+
*
|
|
7386
|
+
* ## Complexity:
|
|
7387
|
+
* - `O(B + M + P)` where:
|
|
7388
|
+
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
|
7389
|
+
* - `M` members-count (code-bounded)
|
|
7390
|
+
* - `P` complexity of dispatching `proposal`
|
|
7391
|
+
*
|
|
7392
|
+
* @param {AstarRuntimeRuntimeCallLike} proposal
|
|
7393
|
+
* @param {number} lengthBound
|
|
7394
|
+
**/
|
|
7395
|
+
execute: GenericTxCall<
|
|
7396
|
+
Rv,
|
|
7397
|
+
(
|
|
7398
|
+
proposal: AstarRuntimeRuntimeCallLike,
|
|
7399
|
+
lengthBound: number,
|
|
7400
|
+
) => ChainSubmittableExtrinsic<
|
|
7401
|
+
Rv,
|
|
7402
|
+
{
|
|
7403
|
+
pallet: 'Council';
|
|
7404
|
+
palletCall: {
|
|
7405
|
+
name: 'Execute';
|
|
7406
|
+
params: { proposal: AstarRuntimeRuntimeCallLike; lengthBound: number };
|
|
7407
|
+
};
|
|
7408
|
+
}
|
|
7409
|
+
>
|
|
7410
|
+
>;
|
|
7411
|
+
|
|
7412
|
+
/**
|
|
7413
|
+
* Add a new proposal to either be voted on or executed directly.
|
|
7414
|
+
*
|
|
7415
|
+
* Requires the sender to be member.
|
|
7416
|
+
*
|
|
7417
|
+
* `threshold` determines whether `proposal` is executed directly (`threshold < 2`)
|
|
7418
|
+
* or put up for voting.
|
|
7419
|
+
*
|
|
7420
|
+
* ## Complexity
|
|
7421
|
+
* - `O(B + M + P1)` or `O(B + M + P2)` where:
|
|
7422
|
+
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
|
7423
|
+
* - `M` is members-count (code- and governance-bounded)
|
|
7424
|
+
* - branching is influenced by `threshold` where:
|
|
7425
|
+
* - `P1` is proposal execution complexity (`threshold < 2`)
|
|
7426
|
+
* - `P2` is proposals-count (code-bounded) (`threshold >= 2`)
|
|
7427
|
+
*
|
|
7428
|
+
* @param {number} threshold
|
|
7429
|
+
* @param {AstarRuntimeRuntimeCallLike} proposal
|
|
7430
|
+
* @param {number} lengthBound
|
|
7431
|
+
**/
|
|
7432
|
+
propose: GenericTxCall<
|
|
7433
|
+
Rv,
|
|
7434
|
+
(
|
|
7435
|
+
threshold: number,
|
|
7436
|
+
proposal: AstarRuntimeRuntimeCallLike,
|
|
7437
|
+
lengthBound: number,
|
|
7438
|
+
) => ChainSubmittableExtrinsic<
|
|
7439
|
+
Rv,
|
|
7440
|
+
{
|
|
7441
|
+
pallet: 'Council';
|
|
7442
|
+
palletCall: {
|
|
7443
|
+
name: 'Propose';
|
|
7444
|
+
params: { threshold: number; proposal: AstarRuntimeRuntimeCallLike; lengthBound: number };
|
|
7445
|
+
};
|
|
7446
|
+
}
|
|
7447
|
+
>
|
|
7448
|
+
>;
|
|
7449
|
+
|
|
7450
|
+
/**
|
|
7451
|
+
* Add an aye or nay vote for the sender to the given proposal.
|
|
7452
|
+
*
|
|
7453
|
+
* Requires the sender to be a member.
|
|
7454
|
+
*
|
|
7455
|
+
* Transaction fees will be waived if the member is voting on any particular proposal
|
|
7456
|
+
* for the first time and the call is successful. Subsequent vote changes will charge a
|
|
7457
|
+
* fee.
|
|
7458
|
+
* ## Complexity
|
|
7459
|
+
* - `O(M)` where `M` is members-count (code- and governance-bounded)
|
|
7460
|
+
*
|
|
7461
|
+
* @param {H256} proposal
|
|
7462
|
+
* @param {number} index
|
|
7463
|
+
* @param {boolean} approve
|
|
7464
|
+
**/
|
|
7465
|
+
vote: GenericTxCall<
|
|
7466
|
+
Rv,
|
|
7467
|
+
(
|
|
7468
|
+
proposal: H256,
|
|
7469
|
+
index: number,
|
|
7470
|
+
approve: boolean,
|
|
7471
|
+
) => ChainSubmittableExtrinsic<
|
|
7472
|
+
Rv,
|
|
7473
|
+
{
|
|
7474
|
+
pallet: 'Council';
|
|
7475
|
+
palletCall: {
|
|
7476
|
+
name: 'Vote';
|
|
7477
|
+
params: { proposal: H256; index: number; approve: boolean };
|
|
7478
|
+
};
|
|
7479
|
+
}
|
|
7480
|
+
>
|
|
7481
|
+
>;
|
|
7482
|
+
|
|
7483
|
+
/**
|
|
7484
|
+
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
|
7485
|
+
* state.
|
|
7486
|
+
*
|
|
7487
|
+
* Must be called by the Root origin.
|
|
7488
|
+
*
|
|
7489
|
+
* Parameters:
|
|
7490
|
+
* * `proposal_hash`: The hash of the proposal that should be disapproved.
|
|
7491
|
+
*
|
|
7492
|
+
* ## Complexity
|
|
7493
|
+
* O(P) where P is the number of max proposals
|
|
7494
|
+
*
|
|
7495
|
+
* @param {H256} proposalHash
|
|
7496
|
+
**/
|
|
7497
|
+
disapproveProposal: GenericTxCall<
|
|
7498
|
+
Rv,
|
|
7499
|
+
(proposalHash: H256) => ChainSubmittableExtrinsic<
|
|
7500
|
+
Rv,
|
|
7501
|
+
{
|
|
7502
|
+
pallet: 'Council';
|
|
7503
|
+
palletCall: {
|
|
7504
|
+
name: 'DisapproveProposal';
|
|
7505
|
+
params: { proposalHash: H256 };
|
|
7506
|
+
};
|
|
7507
|
+
}
|
|
7508
|
+
>
|
|
7509
|
+
>;
|
|
7510
|
+
|
|
7511
|
+
/**
|
|
7512
|
+
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
|
7513
|
+
*
|
|
7514
|
+
* May be called by any signed account in order to finish voting and close the proposal.
|
|
7515
|
+
*
|
|
7516
|
+
* If called before the end of the voting period it will only close the vote if it is
|
|
7517
|
+
* has enough votes to be approved or disapproved.
|
|
7518
|
+
*
|
|
7519
|
+
* If called after the end of the voting period abstentions are counted as rejections
|
|
7520
|
+
* unless there is a prime member set and the prime member cast an approval.
|
|
7521
|
+
*
|
|
7522
|
+
* If the close operation completes successfully with disapproval, the transaction fee will
|
|
7523
|
+
* be waived. Otherwise execution of the approved operation will be charged to the caller.
|
|
7524
|
+
*
|
|
7525
|
+
* + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed
|
|
7526
|
+
* proposal.
|
|
7527
|
+
* + `length_bound`: The upper bound for the length of the proposal in storage. Checked via
|
|
7528
|
+
* `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.
|
|
7529
|
+
*
|
|
7530
|
+
* ## Complexity
|
|
7531
|
+
* - `O(B + M + P1 + P2)` where:
|
|
7532
|
+
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
|
7533
|
+
* - `M` is members-count (code- and governance-bounded)
|
|
7534
|
+
* - `P1` is the complexity of `proposal` preimage.
|
|
7535
|
+
* - `P2` is proposal-count (code-bounded)
|
|
7536
|
+
*
|
|
7537
|
+
* @param {H256} proposalHash
|
|
7538
|
+
* @param {number} index
|
|
7539
|
+
* @param {SpWeightsWeightV2Weight} proposalWeightBound
|
|
7540
|
+
* @param {number} lengthBound
|
|
7541
|
+
**/
|
|
7542
|
+
close: GenericTxCall<
|
|
7543
|
+
Rv,
|
|
7544
|
+
(
|
|
7545
|
+
proposalHash: H256,
|
|
7546
|
+
index: number,
|
|
7547
|
+
proposalWeightBound: SpWeightsWeightV2Weight,
|
|
7548
|
+
lengthBound: number,
|
|
7549
|
+
) => ChainSubmittableExtrinsic<
|
|
7550
|
+
Rv,
|
|
7551
|
+
{
|
|
7552
|
+
pallet: 'Council';
|
|
7553
|
+
palletCall: {
|
|
7554
|
+
name: 'Close';
|
|
7555
|
+
params: {
|
|
7556
|
+
proposalHash: H256;
|
|
7557
|
+
index: number;
|
|
7558
|
+
proposalWeightBound: SpWeightsWeightV2Weight;
|
|
7559
|
+
lengthBound: number;
|
|
7560
|
+
};
|
|
7561
|
+
};
|
|
7562
|
+
}
|
|
7563
|
+
>
|
|
7564
|
+
>;
|
|
7565
|
+
|
|
7566
|
+
/**
|
|
7567
|
+
* Generic pallet tx call
|
|
7568
|
+
**/
|
|
7569
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
7570
|
+
};
|
|
7571
|
+
/**
|
|
7572
|
+
* Pallet `TechnicalCommittee`'s transaction calls
|
|
7573
|
+
**/
|
|
7574
|
+
technicalCommittee: {
|
|
7575
|
+
/**
|
|
7576
|
+
* Set the collective's membership.
|
|
7577
|
+
*
|
|
7578
|
+
* - `new_members`: The new member list. Be nice to the chain and provide it sorted.
|
|
7579
|
+
* - `prime`: The prime member whose vote sets the default.
|
|
7580
|
+
* - `old_count`: The upper bound for the previous number of members in storage. Used for
|
|
7581
|
+
* weight estimation.
|
|
7582
|
+
*
|
|
7583
|
+
* The dispatch of this call must be `SetMembersOrigin`.
|
|
7584
|
+
*
|
|
7585
|
+
* NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but
|
|
7586
|
+
* the weight estimations rely on it to estimate dispatchable weight.
|
|
7587
|
+
*
|
|
7588
|
+
* # WARNING:
|
|
7589
|
+
*
|
|
7590
|
+
* The `pallet-collective` can also be managed by logic outside of the pallet through the
|
|
7591
|
+
* implementation of the trait [`ChangeMembers`].
|
|
7592
|
+
* Any call to `set_members` must be careful that the member set doesn't get out of sync
|
|
7593
|
+
* with other logic managing the member set.
|
|
7594
|
+
*
|
|
7595
|
+
* ## Complexity:
|
|
7596
|
+
* - `O(MP + N)` where:
|
|
7597
|
+
* - `M` old-members-count (code- and governance-bounded)
|
|
7598
|
+
* - `N` new-members-count (code- and governance-bounded)
|
|
7599
|
+
* - `P` proposals-count (code-bounded)
|
|
7600
|
+
*
|
|
7601
|
+
* @param {Array<AccountId32Like>} newMembers
|
|
7602
|
+
* @param {AccountId32Like | undefined} prime
|
|
7603
|
+
* @param {number} oldCount
|
|
7604
|
+
**/
|
|
7605
|
+
setMembers: GenericTxCall<
|
|
7606
|
+
Rv,
|
|
7607
|
+
(
|
|
7608
|
+
newMembers: Array<AccountId32Like>,
|
|
7609
|
+
prime: AccountId32Like | undefined,
|
|
7610
|
+
oldCount: number,
|
|
7611
|
+
) => ChainSubmittableExtrinsic<
|
|
7612
|
+
Rv,
|
|
7613
|
+
{
|
|
7614
|
+
pallet: 'TechnicalCommittee';
|
|
7615
|
+
palletCall: {
|
|
7616
|
+
name: 'SetMembers';
|
|
7617
|
+
params: { newMembers: Array<AccountId32Like>; prime: AccountId32Like | undefined; oldCount: number };
|
|
7618
|
+
};
|
|
7619
|
+
}
|
|
7620
|
+
>
|
|
7621
|
+
>;
|
|
7622
|
+
|
|
7623
|
+
/**
|
|
7624
|
+
* Dispatch a proposal from a member using the `Member` origin.
|
|
7625
|
+
*
|
|
7626
|
+
* Origin must be a member of the collective.
|
|
7627
|
+
*
|
|
7628
|
+
* ## Complexity:
|
|
7629
|
+
* - `O(B + M + P)` where:
|
|
7630
|
+
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
|
7631
|
+
* - `M` members-count (code-bounded)
|
|
7632
|
+
* - `P` complexity of dispatching `proposal`
|
|
7633
|
+
*
|
|
7634
|
+
* @param {AstarRuntimeRuntimeCallLike} proposal
|
|
7635
|
+
* @param {number} lengthBound
|
|
7636
|
+
**/
|
|
7637
|
+
execute: GenericTxCall<
|
|
7638
|
+
Rv,
|
|
7639
|
+
(
|
|
7640
|
+
proposal: AstarRuntimeRuntimeCallLike,
|
|
7641
|
+
lengthBound: number,
|
|
7642
|
+
) => ChainSubmittableExtrinsic<
|
|
7643
|
+
Rv,
|
|
7644
|
+
{
|
|
7645
|
+
pallet: 'TechnicalCommittee';
|
|
7646
|
+
palletCall: {
|
|
7647
|
+
name: 'Execute';
|
|
7648
|
+
params: { proposal: AstarRuntimeRuntimeCallLike; lengthBound: number };
|
|
7649
|
+
};
|
|
7650
|
+
}
|
|
7651
|
+
>
|
|
7652
|
+
>;
|
|
7653
|
+
|
|
7654
|
+
/**
|
|
7655
|
+
* Add a new proposal to either be voted on or executed directly.
|
|
7656
|
+
*
|
|
7657
|
+
* Requires the sender to be member.
|
|
7658
|
+
*
|
|
7659
|
+
* `threshold` determines whether `proposal` is executed directly (`threshold < 2`)
|
|
7660
|
+
* or put up for voting.
|
|
7661
|
+
*
|
|
7662
|
+
* ## Complexity
|
|
7663
|
+
* - `O(B + M + P1)` or `O(B + M + P2)` where:
|
|
7664
|
+
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
|
7665
|
+
* - `M` is members-count (code- and governance-bounded)
|
|
7666
|
+
* - branching is influenced by `threshold` where:
|
|
7667
|
+
* - `P1` is proposal execution complexity (`threshold < 2`)
|
|
7668
|
+
* - `P2` is proposals-count (code-bounded) (`threshold >= 2`)
|
|
7669
|
+
*
|
|
7670
|
+
* @param {number} threshold
|
|
7671
|
+
* @param {AstarRuntimeRuntimeCallLike} proposal
|
|
7672
|
+
* @param {number} lengthBound
|
|
7673
|
+
**/
|
|
7674
|
+
propose: GenericTxCall<
|
|
7675
|
+
Rv,
|
|
7676
|
+
(
|
|
7677
|
+
threshold: number,
|
|
7678
|
+
proposal: AstarRuntimeRuntimeCallLike,
|
|
7679
|
+
lengthBound: number,
|
|
7680
|
+
) => ChainSubmittableExtrinsic<
|
|
7681
|
+
Rv,
|
|
7682
|
+
{
|
|
7683
|
+
pallet: 'TechnicalCommittee';
|
|
7684
|
+
palletCall: {
|
|
7685
|
+
name: 'Propose';
|
|
7686
|
+
params: { threshold: number; proposal: AstarRuntimeRuntimeCallLike; lengthBound: number };
|
|
7687
|
+
};
|
|
7688
|
+
}
|
|
7689
|
+
>
|
|
7690
|
+
>;
|
|
7691
|
+
|
|
7692
|
+
/**
|
|
7693
|
+
* Add an aye or nay vote for the sender to the given proposal.
|
|
7694
|
+
*
|
|
7695
|
+
* Requires the sender to be a member.
|
|
7696
|
+
*
|
|
7697
|
+
* Transaction fees will be waived if the member is voting on any particular proposal
|
|
7698
|
+
* for the first time and the call is successful. Subsequent vote changes will charge a
|
|
7699
|
+
* fee.
|
|
7700
|
+
* ## Complexity
|
|
7701
|
+
* - `O(M)` where `M` is members-count (code- and governance-bounded)
|
|
7702
|
+
*
|
|
7703
|
+
* @param {H256} proposal
|
|
7704
|
+
* @param {number} index
|
|
7705
|
+
* @param {boolean} approve
|
|
7706
|
+
**/
|
|
7707
|
+
vote: GenericTxCall<
|
|
7708
|
+
Rv,
|
|
7709
|
+
(
|
|
7710
|
+
proposal: H256,
|
|
7711
|
+
index: number,
|
|
7712
|
+
approve: boolean,
|
|
7713
|
+
) => ChainSubmittableExtrinsic<
|
|
7714
|
+
Rv,
|
|
7715
|
+
{
|
|
7716
|
+
pallet: 'TechnicalCommittee';
|
|
7717
|
+
palletCall: {
|
|
7718
|
+
name: 'Vote';
|
|
7719
|
+
params: { proposal: H256; index: number; approve: boolean };
|
|
7720
|
+
};
|
|
7721
|
+
}
|
|
7722
|
+
>
|
|
7723
|
+
>;
|
|
7724
|
+
|
|
7725
|
+
/**
|
|
7726
|
+
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
|
7727
|
+
* state.
|
|
7728
|
+
*
|
|
7729
|
+
* Must be called by the Root origin.
|
|
7730
|
+
*
|
|
7731
|
+
* Parameters:
|
|
7732
|
+
* * `proposal_hash`: The hash of the proposal that should be disapproved.
|
|
7733
|
+
*
|
|
7734
|
+
* ## Complexity
|
|
7735
|
+
* O(P) where P is the number of max proposals
|
|
7736
|
+
*
|
|
7737
|
+
* @param {H256} proposalHash
|
|
7738
|
+
**/
|
|
7739
|
+
disapproveProposal: GenericTxCall<
|
|
7740
|
+
Rv,
|
|
7741
|
+
(proposalHash: H256) => ChainSubmittableExtrinsic<
|
|
7742
|
+
Rv,
|
|
7743
|
+
{
|
|
7744
|
+
pallet: 'TechnicalCommittee';
|
|
7745
|
+
palletCall: {
|
|
7746
|
+
name: 'DisapproveProposal';
|
|
7747
|
+
params: { proposalHash: H256 };
|
|
7748
|
+
};
|
|
7749
|
+
}
|
|
7750
|
+
>
|
|
7751
|
+
>;
|
|
7752
|
+
|
|
7753
|
+
/**
|
|
7754
|
+
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
|
7755
|
+
*
|
|
7756
|
+
* May be called by any signed account in order to finish voting and close the proposal.
|
|
7757
|
+
*
|
|
7758
|
+
* If called before the end of the voting period it will only close the vote if it is
|
|
7759
|
+
* has enough votes to be approved or disapproved.
|
|
7760
|
+
*
|
|
7761
|
+
* If called after the end of the voting period abstentions are counted as rejections
|
|
7762
|
+
* unless there is a prime member set and the prime member cast an approval.
|
|
7763
|
+
*
|
|
7764
|
+
* If the close operation completes successfully with disapproval, the transaction fee will
|
|
7765
|
+
* be waived. Otherwise execution of the approved operation will be charged to the caller.
|
|
7766
|
+
*
|
|
7767
|
+
* + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed
|
|
7768
|
+
* proposal.
|
|
7769
|
+
* + `length_bound`: The upper bound for the length of the proposal in storage. Checked via
|
|
7770
|
+
* `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.
|
|
7771
|
+
*
|
|
7772
|
+
* ## Complexity
|
|
7773
|
+
* - `O(B + M + P1 + P2)` where:
|
|
7774
|
+
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
|
7775
|
+
* - `M` is members-count (code- and governance-bounded)
|
|
7776
|
+
* - `P1` is the complexity of `proposal` preimage.
|
|
7777
|
+
* - `P2` is proposal-count (code-bounded)
|
|
7778
|
+
*
|
|
7779
|
+
* @param {H256} proposalHash
|
|
7780
|
+
* @param {number} index
|
|
7781
|
+
* @param {SpWeightsWeightV2Weight} proposalWeightBound
|
|
7782
|
+
* @param {number} lengthBound
|
|
7783
|
+
**/
|
|
7784
|
+
close: GenericTxCall<
|
|
7785
|
+
Rv,
|
|
7786
|
+
(
|
|
7787
|
+
proposalHash: H256,
|
|
7788
|
+
index: number,
|
|
7789
|
+
proposalWeightBound: SpWeightsWeightV2Weight,
|
|
7790
|
+
lengthBound: number,
|
|
7791
|
+
) => ChainSubmittableExtrinsic<
|
|
7792
|
+
Rv,
|
|
7793
|
+
{
|
|
7794
|
+
pallet: 'TechnicalCommittee';
|
|
7795
|
+
palletCall: {
|
|
7796
|
+
name: 'Close';
|
|
7797
|
+
params: {
|
|
7798
|
+
proposalHash: H256;
|
|
7799
|
+
index: number;
|
|
7800
|
+
proposalWeightBound: SpWeightsWeightV2Weight;
|
|
7801
|
+
lengthBound: number;
|
|
7802
|
+
};
|
|
7803
|
+
};
|
|
7804
|
+
}
|
|
7805
|
+
>
|
|
7806
|
+
>;
|
|
7807
|
+
|
|
7808
|
+
/**
|
|
7809
|
+
* Generic pallet tx call
|
|
7810
|
+
**/
|
|
7811
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
7812
|
+
};
|
|
7813
|
+
/**
|
|
7814
|
+
* Pallet `CommunityCouncil`'s transaction calls
|
|
7815
|
+
**/
|
|
7816
|
+
communityCouncil: {
|
|
7817
|
+
/**
|
|
7818
|
+
* Set the collective's membership.
|
|
7819
|
+
*
|
|
7820
|
+
* - `new_members`: The new member list. Be nice to the chain and provide it sorted.
|
|
7821
|
+
* - `prime`: The prime member whose vote sets the default.
|
|
7822
|
+
* - `old_count`: The upper bound for the previous number of members in storage. Used for
|
|
7823
|
+
* weight estimation.
|
|
7824
|
+
*
|
|
7825
|
+
* The dispatch of this call must be `SetMembersOrigin`.
|
|
7826
|
+
*
|
|
7827
|
+
* NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but
|
|
7828
|
+
* the weight estimations rely on it to estimate dispatchable weight.
|
|
7829
|
+
*
|
|
7830
|
+
* # WARNING:
|
|
7831
|
+
*
|
|
7832
|
+
* The `pallet-collective` can also be managed by logic outside of the pallet through the
|
|
7833
|
+
* implementation of the trait [`ChangeMembers`].
|
|
7834
|
+
* Any call to `set_members` must be careful that the member set doesn't get out of sync
|
|
7835
|
+
* with other logic managing the member set.
|
|
7836
|
+
*
|
|
7837
|
+
* ## Complexity:
|
|
7838
|
+
* - `O(MP + N)` where:
|
|
7839
|
+
* - `M` old-members-count (code- and governance-bounded)
|
|
7840
|
+
* - `N` new-members-count (code- and governance-bounded)
|
|
7841
|
+
* - `P` proposals-count (code-bounded)
|
|
7842
|
+
*
|
|
7843
|
+
* @param {Array<AccountId32Like>} newMembers
|
|
7844
|
+
* @param {AccountId32Like | undefined} prime
|
|
7845
|
+
* @param {number} oldCount
|
|
7846
|
+
**/
|
|
7847
|
+
setMembers: GenericTxCall<
|
|
7848
|
+
Rv,
|
|
7849
|
+
(
|
|
7850
|
+
newMembers: Array<AccountId32Like>,
|
|
7851
|
+
prime: AccountId32Like | undefined,
|
|
7852
|
+
oldCount: number,
|
|
7853
|
+
) => ChainSubmittableExtrinsic<
|
|
7854
|
+
Rv,
|
|
7855
|
+
{
|
|
7856
|
+
pallet: 'CommunityCouncil';
|
|
7857
|
+
palletCall: {
|
|
7858
|
+
name: 'SetMembers';
|
|
7859
|
+
params: { newMembers: Array<AccountId32Like>; prime: AccountId32Like | undefined; oldCount: number };
|
|
7860
|
+
};
|
|
7861
|
+
}
|
|
7862
|
+
>
|
|
7863
|
+
>;
|
|
7864
|
+
|
|
7865
|
+
/**
|
|
7866
|
+
* Dispatch a proposal from a member using the `Member` origin.
|
|
7867
|
+
*
|
|
7868
|
+
* Origin must be a member of the collective.
|
|
7869
|
+
*
|
|
7870
|
+
* ## Complexity:
|
|
7871
|
+
* - `O(B + M + P)` where:
|
|
7872
|
+
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
|
7873
|
+
* - `M` members-count (code-bounded)
|
|
7874
|
+
* - `P` complexity of dispatching `proposal`
|
|
7875
|
+
*
|
|
7876
|
+
* @param {AstarRuntimeRuntimeCallLike} proposal
|
|
7877
|
+
* @param {number} lengthBound
|
|
7878
|
+
**/
|
|
7879
|
+
execute: GenericTxCall<
|
|
7880
|
+
Rv,
|
|
7881
|
+
(
|
|
7882
|
+
proposal: AstarRuntimeRuntimeCallLike,
|
|
7883
|
+
lengthBound: number,
|
|
7884
|
+
) => ChainSubmittableExtrinsic<
|
|
7885
|
+
Rv,
|
|
7886
|
+
{
|
|
7887
|
+
pallet: 'CommunityCouncil';
|
|
7888
|
+
palletCall: {
|
|
7889
|
+
name: 'Execute';
|
|
7890
|
+
params: { proposal: AstarRuntimeRuntimeCallLike; lengthBound: number };
|
|
7891
|
+
};
|
|
7892
|
+
}
|
|
7893
|
+
>
|
|
7894
|
+
>;
|
|
7895
|
+
|
|
7896
|
+
/**
|
|
7897
|
+
* Add a new proposal to either be voted on or executed directly.
|
|
7898
|
+
*
|
|
7899
|
+
* Requires the sender to be member.
|
|
7900
|
+
*
|
|
7901
|
+
* `threshold` determines whether `proposal` is executed directly (`threshold < 2`)
|
|
7902
|
+
* or put up for voting.
|
|
7903
|
+
*
|
|
7904
|
+
* ## Complexity
|
|
7905
|
+
* - `O(B + M + P1)` or `O(B + M + P2)` where:
|
|
7906
|
+
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
|
7907
|
+
* - `M` is members-count (code- and governance-bounded)
|
|
7908
|
+
* - branching is influenced by `threshold` where:
|
|
7909
|
+
* - `P1` is proposal execution complexity (`threshold < 2`)
|
|
7910
|
+
* - `P2` is proposals-count (code-bounded) (`threshold >= 2`)
|
|
7911
|
+
*
|
|
7912
|
+
* @param {number} threshold
|
|
7913
|
+
* @param {AstarRuntimeRuntimeCallLike} proposal
|
|
7914
|
+
* @param {number} lengthBound
|
|
7915
|
+
**/
|
|
7916
|
+
propose: GenericTxCall<
|
|
7917
|
+
Rv,
|
|
7918
|
+
(
|
|
7919
|
+
threshold: number,
|
|
7920
|
+
proposal: AstarRuntimeRuntimeCallLike,
|
|
7921
|
+
lengthBound: number,
|
|
7922
|
+
) => ChainSubmittableExtrinsic<
|
|
7923
|
+
Rv,
|
|
7924
|
+
{
|
|
7925
|
+
pallet: 'CommunityCouncil';
|
|
7926
|
+
palletCall: {
|
|
7927
|
+
name: 'Propose';
|
|
7928
|
+
params: { threshold: number; proposal: AstarRuntimeRuntimeCallLike; lengthBound: number };
|
|
7929
|
+
};
|
|
7930
|
+
}
|
|
7931
|
+
>
|
|
7932
|
+
>;
|
|
7933
|
+
|
|
7934
|
+
/**
|
|
7935
|
+
* Add an aye or nay vote for the sender to the given proposal.
|
|
7936
|
+
*
|
|
7937
|
+
* Requires the sender to be a member.
|
|
7938
|
+
*
|
|
7939
|
+
* Transaction fees will be waived if the member is voting on any particular proposal
|
|
7940
|
+
* for the first time and the call is successful. Subsequent vote changes will charge a
|
|
7941
|
+
* fee.
|
|
7942
|
+
* ## Complexity
|
|
7943
|
+
* - `O(M)` where `M` is members-count (code- and governance-bounded)
|
|
7944
|
+
*
|
|
7945
|
+
* @param {H256} proposal
|
|
7946
|
+
* @param {number} index
|
|
7947
|
+
* @param {boolean} approve
|
|
7948
|
+
**/
|
|
7949
|
+
vote: GenericTxCall<
|
|
7950
|
+
Rv,
|
|
7951
|
+
(
|
|
7952
|
+
proposal: H256,
|
|
7953
|
+
index: number,
|
|
7954
|
+
approve: boolean,
|
|
7955
|
+
) => ChainSubmittableExtrinsic<
|
|
7956
|
+
Rv,
|
|
7957
|
+
{
|
|
7958
|
+
pallet: 'CommunityCouncil';
|
|
7959
|
+
palletCall: {
|
|
7960
|
+
name: 'Vote';
|
|
7961
|
+
params: { proposal: H256; index: number; approve: boolean };
|
|
7962
|
+
};
|
|
7963
|
+
}
|
|
7964
|
+
>
|
|
7965
|
+
>;
|
|
7966
|
+
|
|
7967
|
+
/**
|
|
7968
|
+
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
|
7969
|
+
* state.
|
|
7970
|
+
*
|
|
7971
|
+
* Must be called by the Root origin.
|
|
7972
|
+
*
|
|
7973
|
+
* Parameters:
|
|
7974
|
+
* * `proposal_hash`: The hash of the proposal that should be disapproved.
|
|
7975
|
+
*
|
|
7976
|
+
* ## Complexity
|
|
7977
|
+
* O(P) where P is the number of max proposals
|
|
7978
|
+
*
|
|
7979
|
+
* @param {H256} proposalHash
|
|
7980
|
+
**/
|
|
7981
|
+
disapproveProposal: GenericTxCall<
|
|
7982
|
+
Rv,
|
|
7983
|
+
(proposalHash: H256) => ChainSubmittableExtrinsic<
|
|
7984
|
+
Rv,
|
|
7985
|
+
{
|
|
7986
|
+
pallet: 'CommunityCouncil';
|
|
7987
|
+
palletCall: {
|
|
7988
|
+
name: 'DisapproveProposal';
|
|
7989
|
+
params: { proposalHash: H256 };
|
|
7990
|
+
};
|
|
7991
|
+
}
|
|
7992
|
+
>
|
|
7993
|
+
>;
|
|
7994
|
+
|
|
7995
|
+
/**
|
|
7996
|
+
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
|
7997
|
+
*
|
|
7998
|
+
* May be called by any signed account in order to finish voting and close the proposal.
|
|
7999
|
+
*
|
|
8000
|
+
* If called before the end of the voting period it will only close the vote if it is
|
|
8001
|
+
* has enough votes to be approved or disapproved.
|
|
8002
|
+
*
|
|
8003
|
+
* If called after the end of the voting period abstentions are counted as rejections
|
|
8004
|
+
* unless there is a prime member set and the prime member cast an approval.
|
|
8005
|
+
*
|
|
8006
|
+
* If the close operation completes successfully with disapproval, the transaction fee will
|
|
8007
|
+
* be waived. Otherwise execution of the approved operation will be charged to the caller.
|
|
8008
|
+
*
|
|
8009
|
+
* + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed
|
|
8010
|
+
* proposal.
|
|
8011
|
+
* + `length_bound`: The upper bound for the length of the proposal in storage. Checked via
|
|
8012
|
+
* `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.
|
|
8013
|
+
*
|
|
8014
|
+
* ## Complexity
|
|
8015
|
+
* - `O(B + M + P1 + P2)` where:
|
|
8016
|
+
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
|
8017
|
+
* - `M` is members-count (code- and governance-bounded)
|
|
8018
|
+
* - `P1` is the complexity of `proposal` preimage.
|
|
8019
|
+
* - `P2` is proposal-count (code-bounded)
|
|
8020
|
+
*
|
|
8021
|
+
* @param {H256} proposalHash
|
|
8022
|
+
* @param {number} index
|
|
8023
|
+
* @param {SpWeightsWeightV2Weight} proposalWeightBound
|
|
8024
|
+
* @param {number} lengthBound
|
|
8025
|
+
**/
|
|
8026
|
+
close: GenericTxCall<
|
|
8027
|
+
Rv,
|
|
8028
|
+
(
|
|
8029
|
+
proposalHash: H256,
|
|
8030
|
+
index: number,
|
|
8031
|
+
proposalWeightBound: SpWeightsWeightV2Weight,
|
|
8032
|
+
lengthBound: number,
|
|
8033
|
+
) => ChainSubmittableExtrinsic<
|
|
8034
|
+
Rv,
|
|
8035
|
+
{
|
|
8036
|
+
pallet: 'CommunityCouncil';
|
|
8037
|
+
palletCall: {
|
|
8038
|
+
name: 'Close';
|
|
8039
|
+
params: {
|
|
8040
|
+
proposalHash: H256;
|
|
8041
|
+
index: number;
|
|
8042
|
+
proposalWeightBound: SpWeightsWeightV2Weight;
|
|
8043
|
+
lengthBound: number;
|
|
8044
|
+
};
|
|
8045
|
+
};
|
|
8046
|
+
}
|
|
8047
|
+
>
|
|
8048
|
+
>;
|
|
8049
|
+
|
|
8050
|
+
/**
|
|
8051
|
+
* Generic pallet tx call
|
|
8052
|
+
**/
|
|
8053
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
8054
|
+
};
|
|
8055
|
+
/**
|
|
8056
|
+
* Pallet `Democracy`'s transaction calls
|
|
8057
|
+
**/
|
|
8058
|
+
democracy: {
|
|
8059
|
+
/**
|
|
8060
|
+
* Propose a sensitive action to be taken.
|
|
8061
|
+
*
|
|
8062
|
+
* The dispatch origin of this call must be _Signed_ and the sender must
|
|
8063
|
+
* have funds to cover the deposit.
|
|
8064
|
+
*
|
|
8065
|
+
* - `proposal_hash`: The hash of the proposal preimage.
|
|
8066
|
+
* - `value`: The amount of deposit (must be at least `MinimumDeposit`).
|
|
8067
|
+
*
|
|
8068
|
+
* Emits `Proposed`.
|
|
8069
|
+
*
|
|
8070
|
+
* @param {FrameSupportPreimagesBounded} proposal
|
|
8071
|
+
* @param {bigint} value
|
|
8072
|
+
**/
|
|
8073
|
+
propose: GenericTxCall<
|
|
8074
|
+
Rv,
|
|
8075
|
+
(
|
|
8076
|
+
proposal: FrameSupportPreimagesBounded,
|
|
8077
|
+
value: bigint,
|
|
8078
|
+
) => ChainSubmittableExtrinsic<
|
|
8079
|
+
Rv,
|
|
8080
|
+
{
|
|
8081
|
+
pallet: 'Democracy';
|
|
8082
|
+
palletCall: {
|
|
8083
|
+
name: 'Propose';
|
|
8084
|
+
params: { proposal: FrameSupportPreimagesBounded; value: bigint };
|
|
8085
|
+
};
|
|
8086
|
+
}
|
|
8087
|
+
>
|
|
8088
|
+
>;
|
|
8089
|
+
|
|
8090
|
+
/**
|
|
8091
|
+
* Signals agreement with a particular proposal.
|
|
8092
|
+
*
|
|
8093
|
+
* The dispatch origin of this call must be _Signed_ and the sender
|
|
8094
|
+
* must have funds to cover the deposit, equal to the original deposit.
|
|
8095
|
+
*
|
|
8096
|
+
* - `proposal`: The index of the proposal to second.
|
|
8097
|
+
*
|
|
8098
|
+
* @param {number} proposal
|
|
8099
|
+
**/
|
|
8100
|
+
second: GenericTxCall<
|
|
8101
|
+
Rv,
|
|
8102
|
+
(proposal: number) => ChainSubmittableExtrinsic<
|
|
8103
|
+
Rv,
|
|
8104
|
+
{
|
|
8105
|
+
pallet: 'Democracy';
|
|
8106
|
+
palletCall: {
|
|
8107
|
+
name: 'Second';
|
|
8108
|
+
params: { proposal: number };
|
|
8109
|
+
};
|
|
8110
|
+
}
|
|
8111
|
+
>
|
|
8112
|
+
>;
|
|
8113
|
+
|
|
8114
|
+
/**
|
|
8115
|
+
* Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;
|
|
8116
|
+
* otherwise it is a vote to keep the status quo.
|
|
8117
|
+
*
|
|
8118
|
+
* The dispatch origin of this call must be _Signed_.
|
|
8119
|
+
*
|
|
8120
|
+
* - `ref_index`: The index of the referendum to vote for.
|
|
8121
|
+
* - `vote`: The vote configuration.
|
|
8122
|
+
*
|
|
8123
|
+
* @param {number} refIndex
|
|
8124
|
+
* @param {PalletDemocracyVoteAccountVote} vote
|
|
8125
|
+
**/
|
|
8126
|
+
vote: GenericTxCall<
|
|
8127
|
+
Rv,
|
|
8128
|
+
(
|
|
8129
|
+
refIndex: number,
|
|
8130
|
+
vote: PalletDemocracyVoteAccountVote,
|
|
8131
|
+
) => ChainSubmittableExtrinsic<
|
|
8132
|
+
Rv,
|
|
8133
|
+
{
|
|
8134
|
+
pallet: 'Democracy';
|
|
8135
|
+
palletCall: {
|
|
8136
|
+
name: 'Vote';
|
|
8137
|
+
params: { refIndex: number; vote: PalletDemocracyVoteAccountVote };
|
|
8138
|
+
};
|
|
8139
|
+
}
|
|
8140
|
+
>
|
|
8141
|
+
>;
|
|
8142
|
+
|
|
8143
|
+
/**
|
|
8144
|
+
* Schedule an emergency cancellation of a referendum. Cannot happen twice to the same
|
|
8145
|
+
* referendum.
|
|
8146
|
+
*
|
|
8147
|
+
* The dispatch origin of this call must be `CancellationOrigin`.
|
|
8148
|
+
*
|
|
8149
|
+
* -`ref_index`: The index of the referendum to cancel.
|
|
8150
|
+
*
|
|
8151
|
+
* Weight: `O(1)`.
|
|
8152
|
+
*
|
|
8153
|
+
* @param {number} refIndex
|
|
8154
|
+
**/
|
|
8155
|
+
emergencyCancel: GenericTxCall<
|
|
8156
|
+
Rv,
|
|
8157
|
+
(refIndex: number) => ChainSubmittableExtrinsic<
|
|
8158
|
+
Rv,
|
|
8159
|
+
{
|
|
8160
|
+
pallet: 'Democracy';
|
|
8161
|
+
palletCall: {
|
|
8162
|
+
name: 'EmergencyCancel';
|
|
8163
|
+
params: { refIndex: number };
|
|
8164
|
+
};
|
|
8165
|
+
}
|
|
8166
|
+
>
|
|
8167
|
+
>;
|
|
8168
|
+
|
|
8169
|
+
/**
|
|
8170
|
+
* Schedule a referendum to be tabled once it is legal to schedule an external
|
|
8171
|
+
* referendum.
|
|
8172
|
+
*
|
|
8173
|
+
* The dispatch origin of this call must be `ExternalOrigin`.
|
|
8174
|
+
*
|
|
8175
|
+
* - `proposal_hash`: The preimage hash of the proposal.
|
|
8176
|
+
*
|
|
8177
|
+
* @param {FrameSupportPreimagesBounded} proposal
|
|
8178
|
+
**/
|
|
8179
|
+
externalPropose: GenericTxCall<
|
|
8180
|
+
Rv,
|
|
8181
|
+
(proposal: FrameSupportPreimagesBounded) => ChainSubmittableExtrinsic<
|
|
8182
|
+
Rv,
|
|
8183
|
+
{
|
|
8184
|
+
pallet: 'Democracy';
|
|
8185
|
+
palletCall: {
|
|
8186
|
+
name: 'ExternalPropose';
|
|
8187
|
+
params: { proposal: FrameSupportPreimagesBounded };
|
|
8188
|
+
};
|
|
8189
|
+
}
|
|
8190
|
+
>
|
|
8191
|
+
>;
|
|
8192
|
+
|
|
8193
|
+
/**
|
|
8194
|
+
* Schedule a majority-carries referendum to be tabled next once it is legal to schedule
|
|
8195
|
+
* an external referendum.
|
|
8196
|
+
*
|
|
8197
|
+
* The dispatch of this call must be `ExternalMajorityOrigin`.
|
|
8198
|
+
*
|
|
8199
|
+
* - `proposal_hash`: The preimage hash of the proposal.
|
|
8200
|
+
*
|
|
8201
|
+
* Unlike `external_propose`, blacklisting has no effect on this and it may replace a
|
|
8202
|
+
* pre-scheduled `external_propose` call.
|
|
8203
|
+
*
|
|
8204
|
+
* Weight: `O(1)`
|
|
8205
|
+
*
|
|
8206
|
+
* @param {FrameSupportPreimagesBounded} proposal
|
|
8207
|
+
**/
|
|
8208
|
+
externalProposeMajority: GenericTxCall<
|
|
8209
|
+
Rv,
|
|
8210
|
+
(proposal: FrameSupportPreimagesBounded) => ChainSubmittableExtrinsic<
|
|
8211
|
+
Rv,
|
|
8212
|
+
{
|
|
8213
|
+
pallet: 'Democracy';
|
|
8214
|
+
palletCall: {
|
|
8215
|
+
name: 'ExternalProposeMajority';
|
|
8216
|
+
params: { proposal: FrameSupportPreimagesBounded };
|
|
8217
|
+
};
|
|
8218
|
+
}
|
|
8219
|
+
>
|
|
8220
|
+
>;
|
|
8221
|
+
|
|
8222
|
+
/**
|
|
8223
|
+
* Schedule a negative-turnout-bias referendum to be tabled next once it is legal to
|
|
8224
|
+
* schedule an external referendum.
|
|
8225
|
+
*
|
|
8226
|
+
* The dispatch of this call must be `ExternalDefaultOrigin`.
|
|
8227
|
+
*
|
|
8228
|
+
* - `proposal_hash`: The preimage hash of the proposal.
|
|
8229
|
+
*
|
|
8230
|
+
* Unlike `external_propose`, blacklisting has no effect on this and it may replace a
|
|
8231
|
+
* pre-scheduled `external_propose` call.
|
|
8232
|
+
*
|
|
8233
|
+
* Weight: `O(1)`
|
|
8234
|
+
*
|
|
8235
|
+
* @param {FrameSupportPreimagesBounded} proposal
|
|
8236
|
+
**/
|
|
8237
|
+
externalProposeDefault: GenericTxCall<
|
|
8238
|
+
Rv,
|
|
8239
|
+
(proposal: FrameSupportPreimagesBounded) => ChainSubmittableExtrinsic<
|
|
8240
|
+
Rv,
|
|
8241
|
+
{
|
|
8242
|
+
pallet: 'Democracy';
|
|
8243
|
+
palletCall: {
|
|
8244
|
+
name: 'ExternalProposeDefault';
|
|
8245
|
+
params: { proposal: FrameSupportPreimagesBounded };
|
|
8246
|
+
};
|
|
8247
|
+
}
|
|
8248
|
+
>
|
|
8249
|
+
>;
|
|
8250
|
+
|
|
8251
|
+
/**
|
|
8252
|
+
* Schedule the currently externally-proposed majority-carries referendum to be tabled
|
|
8253
|
+
* immediately. If there is no externally-proposed referendum currently, or if there is one
|
|
8254
|
+
* but it is not a majority-carries referendum then it fails.
|
|
8255
|
+
*
|
|
8256
|
+
* The dispatch of this call must be `FastTrackOrigin`.
|
|
8257
|
+
*
|
|
8258
|
+
* - `proposal_hash`: The hash of the current external proposal.
|
|
8259
|
+
* - `voting_period`: The period that is allowed for voting on this proposal. Increased to
|
|
8260
|
+
* Must be always greater than zero.
|
|
8261
|
+
* For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.
|
|
8262
|
+
* - `delay`: The number of block after voting has ended in approval and this should be
|
|
8263
|
+
* enacted. This doesn't have a minimum amount.
|
|
8264
|
+
*
|
|
8265
|
+
* Emits `Started`.
|
|
8266
|
+
*
|
|
8267
|
+
* Weight: `O(1)`
|
|
8268
|
+
*
|
|
8269
|
+
* @param {H256} proposalHash
|
|
8270
|
+
* @param {number} votingPeriod
|
|
8271
|
+
* @param {number} delay
|
|
8272
|
+
**/
|
|
8273
|
+
fastTrack: GenericTxCall<
|
|
8274
|
+
Rv,
|
|
8275
|
+
(
|
|
8276
|
+
proposalHash: H256,
|
|
8277
|
+
votingPeriod: number,
|
|
8278
|
+
delay: number,
|
|
8279
|
+
) => ChainSubmittableExtrinsic<
|
|
8280
|
+
Rv,
|
|
8281
|
+
{
|
|
8282
|
+
pallet: 'Democracy';
|
|
8283
|
+
palletCall: {
|
|
8284
|
+
name: 'FastTrack';
|
|
8285
|
+
params: { proposalHash: H256; votingPeriod: number; delay: number };
|
|
8286
|
+
};
|
|
8287
|
+
}
|
|
8288
|
+
>
|
|
8289
|
+
>;
|
|
8290
|
+
|
|
8291
|
+
/**
|
|
8292
|
+
* Veto and blacklist the external proposal hash.
|
|
8293
|
+
*
|
|
8294
|
+
* The dispatch origin of this call must be `VetoOrigin`.
|
|
8295
|
+
*
|
|
8296
|
+
* - `proposal_hash`: The preimage hash of the proposal to veto and blacklist.
|
|
8297
|
+
*
|
|
8298
|
+
* Emits `Vetoed`.
|
|
8299
|
+
*
|
|
8300
|
+
* Weight: `O(V + log(V))` where V is number of `existing vetoers`
|
|
8301
|
+
*
|
|
8302
|
+
* @param {H256} proposalHash
|
|
8303
|
+
**/
|
|
8304
|
+
vetoExternal: GenericTxCall<
|
|
8305
|
+
Rv,
|
|
8306
|
+
(proposalHash: H256) => ChainSubmittableExtrinsic<
|
|
8307
|
+
Rv,
|
|
8308
|
+
{
|
|
8309
|
+
pallet: 'Democracy';
|
|
8310
|
+
palletCall: {
|
|
8311
|
+
name: 'VetoExternal';
|
|
8312
|
+
params: { proposalHash: H256 };
|
|
8313
|
+
};
|
|
8314
|
+
}
|
|
8315
|
+
>
|
|
8316
|
+
>;
|
|
8317
|
+
|
|
8318
|
+
/**
|
|
8319
|
+
* Remove a referendum.
|
|
8320
|
+
*
|
|
8321
|
+
* The dispatch origin of this call must be _Root_.
|
|
8322
|
+
*
|
|
8323
|
+
* - `ref_index`: The index of the referendum to cancel.
|
|
8324
|
+
*
|
|
8325
|
+
* # Weight: `O(1)`.
|
|
8326
|
+
*
|
|
8327
|
+
* @param {number} refIndex
|
|
8328
|
+
**/
|
|
8329
|
+
cancelReferendum: GenericTxCall<
|
|
8330
|
+
Rv,
|
|
8331
|
+
(refIndex: number) => ChainSubmittableExtrinsic<
|
|
8332
|
+
Rv,
|
|
8333
|
+
{
|
|
8334
|
+
pallet: 'Democracy';
|
|
8335
|
+
palletCall: {
|
|
8336
|
+
name: 'CancelReferendum';
|
|
8337
|
+
params: { refIndex: number };
|
|
8338
|
+
};
|
|
8339
|
+
}
|
|
8340
|
+
>
|
|
8341
|
+
>;
|
|
8342
|
+
|
|
8343
|
+
/**
|
|
8344
|
+
* Delegate the voting power (with some given conviction) of the sending account.
|
|
8345
|
+
*
|
|
8346
|
+
* The balance delegated is locked for as long as it's delegated, and thereafter for the
|
|
8347
|
+
* time appropriate for the conviction's lock period.
|
|
8348
|
+
*
|
|
8349
|
+
* The dispatch origin of this call must be _Signed_, and the signing account must either:
|
|
8350
|
+
* - be delegating already; or
|
|
8351
|
+
* - have no voting activity (if there is, then it will need to be removed/consolidated
|
|
8352
|
+
* through `reap_vote` or `unvote`).
|
|
8353
|
+
*
|
|
8354
|
+
* - `to`: The account whose voting the `target` account's voting power will follow.
|
|
8355
|
+
* - `conviction`: The conviction that will be attached to the delegated votes. When the
|
|
8356
|
+
* account is undelegated, the funds will be locked for the corresponding period.
|
|
8357
|
+
* - `balance`: The amount of the account's balance to be used in delegating. This must not
|
|
8358
|
+
* be more than the account's current balance.
|
|
8359
|
+
*
|
|
8360
|
+
* Emits `Delegated`.
|
|
8361
|
+
*
|
|
8362
|
+
* Weight: `O(R)` where R is the number of referendums the voter delegating to has
|
|
8363
|
+
* voted on. Weight is charged as if maximum votes.
|
|
8364
|
+
*
|
|
8365
|
+
* @param {MultiAddressLike} to
|
|
8366
|
+
* @param {PalletDemocracyConviction} conviction
|
|
8367
|
+
* @param {bigint} balance
|
|
8368
|
+
**/
|
|
8369
|
+
delegate: GenericTxCall<
|
|
8370
|
+
Rv,
|
|
8371
|
+
(
|
|
8372
|
+
to: MultiAddressLike,
|
|
8373
|
+
conviction: PalletDemocracyConviction,
|
|
8374
|
+
balance: bigint,
|
|
8375
|
+
) => ChainSubmittableExtrinsic<
|
|
8376
|
+
Rv,
|
|
8377
|
+
{
|
|
8378
|
+
pallet: 'Democracy';
|
|
8379
|
+
palletCall: {
|
|
8380
|
+
name: 'Delegate';
|
|
8381
|
+
params: { to: MultiAddressLike; conviction: PalletDemocracyConviction; balance: bigint };
|
|
8382
|
+
};
|
|
8383
|
+
}
|
|
8384
|
+
>
|
|
8385
|
+
>;
|
|
8386
|
+
|
|
8387
|
+
/**
|
|
8388
|
+
* Undelegate the voting power of the sending account.
|
|
8389
|
+
*
|
|
8390
|
+
* Tokens may be unlocked following once an amount of time consistent with the lock period
|
|
8391
|
+
* of the conviction with which the delegation was issued.
|
|
8392
|
+
*
|
|
8393
|
+
* The dispatch origin of this call must be _Signed_ and the signing account must be
|
|
8394
|
+
* currently delegating.
|
|
8395
|
+
*
|
|
8396
|
+
* Emits `Undelegated`.
|
|
8397
|
+
*
|
|
8398
|
+
* Weight: `O(R)` where R is the number of referendums the voter delegating to has
|
|
8399
|
+
* voted on. Weight is charged as if maximum votes.
|
|
8400
|
+
*
|
|
8401
|
+
**/
|
|
8402
|
+
undelegate: GenericTxCall<
|
|
8403
|
+
Rv,
|
|
8404
|
+
() => ChainSubmittableExtrinsic<
|
|
8405
|
+
Rv,
|
|
8406
|
+
{
|
|
8407
|
+
pallet: 'Democracy';
|
|
8408
|
+
palletCall: {
|
|
8409
|
+
name: 'Undelegate';
|
|
8410
|
+
};
|
|
8411
|
+
}
|
|
8412
|
+
>
|
|
8413
|
+
>;
|
|
8414
|
+
|
|
8415
|
+
/**
|
|
8416
|
+
* Clears all public proposals.
|
|
8417
|
+
*
|
|
8418
|
+
* The dispatch origin of this call must be _Root_.
|
|
8419
|
+
*
|
|
8420
|
+
* Weight: `O(1)`.
|
|
8421
|
+
*
|
|
8422
|
+
**/
|
|
8423
|
+
clearPublicProposals: GenericTxCall<
|
|
8424
|
+
Rv,
|
|
8425
|
+
() => ChainSubmittableExtrinsic<
|
|
8426
|
+
Rv,
|
|
8427
|
+
{
|
|
8428
|
+
pallet: 'Democracy';
|
|
8429
|
+
palletCall: {
|
|
8430
|
+
name: 'ClearPublicProposals';
|
|
8431
|
+
};
|
|
8432
|
+
}
|
|
8433
|
+
>
|
|
8434
|
+
>;
|
|
8435
|
+
|
|
8436
|
+
/**
|
|
8437
|
+
* Unlock tokens that have an expired lock.
|
|
8438
|
+
*
|
|
8439
|
+
* The dispatch origin of this call must be _Signed_.
|
|
8440
|
+
*
|
|
8441
|
+
* - `target`: The account to remove the lock on.
|
|
8442
|
+
*
|
|
8443
|
+
* Weight: `O(R)` with R number of vote of target.
|
|
8444
|
+
*
|
|
8445
|
+
* @param {MultiAddressLike} target
|
|
8446
|
+
**/
|
|
8447
|
+
unlock: GenericTxCall<
|
|
8448
|
+
Rv,
|
|
8449
|
+
(target: MultiAddressLike) => ChainSubmittableExtrinsic<
|
|
8450
|
+
Rv,
|
|
8451
|
+
{
|
|
8452
|
+
pallet: 'Democracy';
|
|
8453
|
+
palletCall: {
|
|
8454
|
+
name: 'Unlock';
|
|
8455
|
+
params: { target: MultiAddressLike };
|
|
8456
|
+
};
|
|
8457
|
+
}
|
|
8458
|
+
>
|
|
8459
|
+
>;
|
|
8460
|
+
|
|
8461
|
+
/**
|
|
8462
|
+
* Remove a vote for a referendum.
|
|
8463
|
+
*
|
|
8464
|
+
* If:
|
|
8465
|
+
* - the referendum was cancelled, or
|
|
8466
|
+
* - the referendum is ongoing, or
|
|
8467
|
+
* - the referendum has ended such that
|
|
8468
|
+
* - the vote of the account was in opposition to the result; or
|
|
8469
|
+
* - there was no conviction to the account's vote; or
|
|
8470
|
+
* - the account made a split vote
|
|
8471
|
+
* ...then the vote is removed cleanly and a following call to `unlock` may result in more
|
|
8472
|
+
* funds being available.
|
|
8473
|
+
*
|
|
8474
|
+
* If, however, the referendum has ended and:
|
|
8475
|
+
* - it finished corresponding to the vote of the account, and
|
|
8476
|
+
* - the account made a standard vote with conviction, and
|
|
8477
|
+
* - the lock period of the conviction is not over
|
|
8478
|
+
* ...then the lock will be aggregated into the overall account's lock, which may involve
|
|
8479
|
+
* *overlocking* (where the two locks are combined into a single lock that is the maximum
|
|
8480
|
+
* of both the amount locked and the time is it locked for).
|
|
8481
|
+
*
|
|
8482
|
+
* The dispatch origin of this call must be _Signed_, and the signer must have a vote
|
|
8483
|
+
* registered for referendum `index`.
|
|
8484
|
+
*
|
|
8485
|
+
* - `index`: The index of referendum of the vote to be removed.
|
|
8486
|
+
*
|
|
8487
|
+
* Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.
|
|
8488
|
+
* Weight is calculated for the maximum number of vote.
|
|
8489
|
+
*
|
|
8490
|
+
* @param {number} index
|
|
8491
|
+
**/
|
|
8492
|
+
removeVote: GenericTxCall<
|
|
8493
|
+
Rv,
|
|
8494
|
+
(index: number) => ChainSubmittableExtrinsic<
|
|
8495
|
+
Rv,
|
|
8496
|
+
{
|
|
8497
|
+
pallet: 'Democracy';
|
|
8498
|
+
palletCall: {
|
|
8499
|
+
name: 'RemoveVote';
|
|
8500
|
+
params: { index: number };
|
|
8501
|
+
};
|
|
8502
|
+
}
|
|
8503
|
+
>
|
|
8504
|
+
>;
|
|
8505
|
+
|
|
8506
|
+
/**
|
|
8507
|
+
* Remove a vote for a referendum.
|
|
8508
|
+
*
|
|
8509
|
+
* If the `target` is equal to the signer, then this function is exactly equivalent to
|
|
8510
|
+
* `remove_vote`. If not equal to the signer, then the vote must have expired,
|
|
8511
|
+
* either because the referendum was cancelled, because the voter lost the referendum or
|
|
8512
|
+
* because the conviction period is over.
|
|
8513
|
+
*
|
|
8514
|
+
* The dispatch origin of this call must be _Signed_.
|
|
8515
|
+
*
|
|
8516
|
+
* - `target`: The account of the vote to be removed; this account must have voted for
|
|
8517
|
+
* referendum `index`.
|
|
8518
|
+
* - `index`: The index of referendum of the vote to be removed.
|
|
8519
|
+
*
|
|
8520
|
+
* Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.
|
|
8521
|
+
* Weight is calculated for the maximum number of vote.
|
|
8522
|
+
*
|
|
8523
|
+
* @param {MultiAddressLike} target
|
|
8524
|
+
* @param {number} index
|
|
8525
|
+
**/
|
|
8526
|
+
removeOtherVote: GenericTxCall<
|
|
8527
|
+
Rv,
|
|
8528
|
+
(
|
|
8529
|
+
target: MultiAddressLike,
|
|
8530
|
+
index: number,
|
|
8531
|
+
) => ChainSubmittableExtrinsic<
|
|
8532
|
+
Rv,
|
|
8533
|
+
{
|
|
8534
|
+
pallet: 'Democracy';
|
|
8535
|
+
palletCall: {
|
|
8536
|
+
name: 'RemoveOtherVote';
|
|
8537
|
+
params: { target: MultiAddressLike; index: number };
|
|
8538
|
+
};
|
|
8539
|
+
}
|
|
8540
|
+
>
|
|
8541
|
+
>;
|
|
8542
|
+
|
|
8543
|
+
/**
|
|
8544
|
+
* Permanently place a proposal into the blacklist. This prevents it from ever being
|
|
8545
|
+
* proposed again.
|
|
8546
|
+
*
|
|
8547
|
+
* If called on a queued public or external proposal, then this will result in it being
|
|
8548
|
+
* removed. If the `ref_index` supplied is an active referendum with the proposal hash,
|
|
8549
|
+
* then it will be cancelled.
|
|
8550
|
+
*
|
|
8551
|
+
* The dispatch origin of this call must be `BlacklistOrigin`.
|
|
8552
|
+
*
|
|
8553
|
+
* - `proposal_hash`: The proposal hash to blacklist permanently.
|
|
8554
|
+
* - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be
|
|
8555
|
+
* cancelled.
|
|
8556
|
+
*
|
|
8557
|
+
* Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a
|
|
8558
|
+
* reasonable value).
|
|
8559
|
+
*
|
|
8560
|
+
* @param {H256} proposalHash
|
|
8561
|
+
* @param {number | undefined} maybeRefIndex
|
|
8562
|
+
**/
|
|
8563
|
+
blacklist: GenericTxCall<
|
|
8564
|
+
Rv,
|
|
8565
|
+
(
|
|
8566
|
+
proposalHash: H256,
|
|
8567
|
+
maybeRefIndex: number | undefined,
|
|
8568
|
+
) => ChainSubmittableExtrinsic<
|
|
8569
|
+
Rv,
|
|
8570
|
+
{
|
|
8571
|
+
pallet: 'Democracy';
|
|
8572
|
+
palletCall: {
|
|
8573
|
+
name: 'Blacklist';
|
|
8574
|
+
params: { proposalHash: H256; maybeRefIndex: number | undefined };
|
|
8575
|
+
};
|
|
8576
|
+
}
|
|
8577
|
+
>
|
|
8578
|
+
>;
|
|
8579
|
+
|
|
8580
|
+
/**
|
|
8581
|
+
* Remove a proposal.
|
|
8582
|
+
*
|
|
8583
|
+
* The dispatch origin of this call must be `CancelProposalOrigin`.
|
|
8584
|
+
*
|
|
8585
|
+
* - `prop_index`: The index of the proposal to cancel.
|
|
8586
|
+
*
|
|
8587
|
+
* Weight: `O(p)` where `p = PublicProps::<T>::decode_len()`
|
|
8588
|
+
*
|
|
8589
|
+
* @param {number} propIndex
|
|
8590
|
+
**/
|
|
8591
|
+
cancelProposal: GenericTxCall<
|
|
8592
|
+
Rv,
|
|
8593
|
+
(propIndex: number) => ChainSubmittableExtrinsic<
|
|
8594
|
+
Rv,
|
|
8595
|
+
{
|
|
8596
|
+
pallet: 'Democracy';
|
|
8597
|
+
palletCall: {
|
|
8598
|
+
name: 'CancelProposal';
|
|
8599
|
+
params: { propIndex: number };
|
|
8600
|
+
};
|
|
8601
|
+
}
|
|
8602
|
+
>
|
|
8603
|
+
>;
|
|
8604
|
+
|
|
8605
|
+
/**
|
|
8606
|
+
* Set or clear a metadata of a proposal or a referendum.
|
|
8607
|
+
*
|
|
8608
|
+
* Parameters:
|
|
8609
|
+
* - `origin`: Must correspond to the `MetadataOwner`.
|
|
8610
|
+
* - `ExternalOrigin` for an external proposal with the `SuperMajorityApprove`
|
|
8611
|
+
* threshold.
|
|
8612
|
+
* - `ExternalDefaultOrigin` for an external proposal with the `SuperMajorityAgainst`
|
|
8613
|
+
* threshold.
|
|
8614
|
+
* - `ExternalMajorityOrigin` for an external proposal with the `SimpleMajority`
|
|
8615
|
+
* threshold.
|
|
8616
|
+
* - `Signed` by a creator for a public proposal.
|
|
8617
|
+
* - `Signed` to clear a metadata for a finished referendum.
|
|
8618
|
+
* - `Root` to set a metadata for an ongoing referendum.
|
|
8619
|
+
* - `owner`: an identifier of a metadata owner.
|
|
8620
|
+
* - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata.
|
|
8621
|
+
*
|
|
8622
|
+
* @param {PalletDemocracyMetadataOwner} owner
|
|
8623
|
+
* @param {H256 | undefined} maybeHash
|
|
8624
|
+
**/
|
|
8625
|
+
setMetadata: GenericTxCall<
|
|
8626
|
+
Rv,
|
|
8627
|
+
(
|
|
8628
|
+
owner: PalletDemocracyMetadataOwner,
|
|
8629
|
+
maybeHash: H256 | undefined,
|
|
8630
|
+
) => ChainSubmittableExtrinsic<
|
|
8631
|
+
Rv,
|
|
8632
|
+
{
|
|
8633
|
+
pallet: 'Democracy';
|
|
8634
|
+
palletCall: {
|
|
8635
|
+
name: 'SetMetadata';
|
|
8636
|
+
params: { owner: PalletDemocracyMetadataOwner; maybeHash: H256 | undefined };
|
|
8637
|
+
};
|
|
8638
|
+
}
|
|
8639
|
+
>
|
|
8640
|
+
>;
|
|
8641
|
+
|
|
8642
|
+
/**
|
|
8643
|
+
* Generic pallet tx call
|
|
8644
|
+
**/
|
|
8645
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
8646
|
+
};
|
|
8647
|
+
/**
|
|
8648
|
+
* Pallet `Treasury`'s transaction calls
|
|
8649
|
+
**/
|
|
8650
|
+
treasury: {
|
|
8651
|
+
/**
|
|
8652
|
+
* Put forward a suggestion for spending.
|
|
8653
|
+
*
|
|
8654
|
+
* ## Dispatch Origin
|
|
8655
|
+
*
|
|
8656
|
+
* Must be signed.
|
|
8657
|
+
*
|
|
8658
|
+
* ## Details
|
|
8659
|
+
* A deposit proportional to the value is reserved and slashed if the proposal is rejected.
|
|
8660
|
+
* It is returned once the proposal is awarded.
|
|
8661
|
+
*
|
|
8662
|
+
* ### Complexity
|
|
8663
|
+
* - O(1)
|
|
8664
|
+
*
|
|
8665
|
+
* ## Events
|
|
8666
|
+
*
|
|
8667
|
+
* Emits [`Event::Proposed`] if successful.
|
|
8668
|
+
*
|
|
8669
|
+
* @param {bigint} value
|
|
8670
|
+
* @param {MultiAddressLike} beneficiary
|
|
8671
|
+
**/
|
|
8672
|
+
proposeSpend: GenericTxCall<
|
|
8673
|
+
Rv,
|
|
8674
|
+
(
|
|
8675
|
+
value: bigint,
|
|
8676
|
+
beneficiary: MultiAddressLike,
|
|
8677
|
+
) => ChainSubmittableExtrinsic<
|
|
8678
|
+
Rv,
|
|
8679
|
+
{
|
|
8680
|
+
pallet: 'Treasury';
|
|
8681
|
+
palletCall: {
|
|
8682
|
+
name: 'ProposeSpend';
|
|
8683
|
+
params: { value: bigint; beneficiary: MultiAddressLike };
|
|
8684
|
+
};
|
|
8685
|
+
}
|
|
8686
|
+
>
|
|
8687
|
+
>;
|
|
8688
|
+
|
|
8689
|
+
/**
|
|
8690
|
+
* Reject a proposed spend.
|
|
8691
|
+
*
|
|
8692
|
+
* ## Dispatch Origin
|
|
8693
|
+
*
|
|
8694
|
+
* Must be [`Config::RejectOrigin`].
|
|
8695
|
+
*
|
|
8696
|
+
* ## Details
|
|
8697
|
+
* The original deposit will be slashed.
|
|
8698
|
+
*
|
|
8699
|
+
* ### Complexity
|
|
8700
|
+
* - O(1)
|
|
8701
|
+
*
|
|
8702
|
+
* ## Events
|
|
8703
|
+
*
|
|
8704
|
+
* Emits [`Event::Rejected`] if successful.
|
|
8705
|
+
*
|
|
8706
|
+
* @param {number} proposalId
|
|
8707
|
+
**/
|
|
8708
|
+
rejectProposal: GenericTxCall<
|
|
8709
|
+
Rv,
|
|
8710
|
+
(proposalId: number) => ChainSubmittableExtrinsic<
|
|
8711
|
+
Rv,
|
|
8712
|
+
{
|
|
8713
|
+
pallet: 'Treasury';
|
|
8714
|
+
palletCall: {
|
|
8715
|
+
name: 'RejectProposal';
|
|
8716
|
+
params: { proposalId: number };
|
|
8717
|
+
};
|
|
8718
|
+
}
|
|
8719
|
+
>
|
|
8720
|
+
>;
|
|
8721
|
+
|
|
8722
|
+
/**
|
|
8723
|
+
* Approve a proposal.
|
|
8724
|
+
*
|
|
8725
|
+
* ## Dispatch Origin
|
|
8726
|
+
*
|
|
8727
|
+
* Must be [`Config::ApproveOrigin`].
|
|
8728
|
+
*
|
|
8729
|
+
* ## Details
|
|
8730
|
+
*
|
|
8731
|
+
* At a later time, the proposal will be allocated to the beneficiary and the original
|
|
8732
|
+
* deposit will be returned.
|
|
8733
|
+
*
|
|
8734
|
+
* ### Complexity
|
|
8735
|
+
* - O(1).
|
|
8736
|
+
*
|
|
8737
|
+
* ## Events
|
|
8738
|
+
*
|
|
8739
|
+
* No events are emitted from this dispatch.
|
|
8740
|
+
*
|
|
8741
|
+
* @param {number} proposalId
|
|
8742
|
+
**/
|
|
8743
|
+
approveProposal: GenericTxCall<
|
|
8744
|
+
Rv,
|
|
8745
|
+
(proposalId: number) => ChainSubmittableExtrinsic<
|
|
8746
|
+
Rv,
|
|
8747
|
+
{
|
|
8748
|
+
pallet: 'Treasury';
|
|
8749
|
+
palletCall: {
|
|
8750
|
+
name: 'ApproveProposal';
|
|
8751
|
+
params: { proposalId: number };
|
|
8752
|
+
};
|
|
8753
|
+
}
|
|
8754
|
+
>
|
|
8755
|
+
>;
|
|
8756
|
+
|
|
8757
|
+
/**
|
|
8758
|
+
* Propose and approve a spend of treasury funds.
|
|
8759
|
+
*
|
|
8760
|
+
* ## Dispatch Origin
|
|
8761
|
+
*
|
|
8762
|
+
* Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`.
|
|
8763
|
+
*
|
|
8764
|
+
* ### Details
|
|
8765
|
+
* NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the
|
|
8766
|
+
* beneficiary.
|
|
8767
|
+
*
|
|
8768
|
+
* ### Parameters
|
|
8769
|
+
* - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
|
|
8770
|
+
* - `beneficiary`: The destination account for the transfer.
|
|
8771
|
+
*
|
|
8772
|
+
* ## Events
|
|
8773
|
+
*
|
|
8774
|
+
* Emits [`Event::SpendApproved`] if successful.
|
|
8775
|
+
*
|
|
8776
|
+
* @param {bigint} amount
|
|
8777
|
+
* @param {MultiAddressLike} beneficiary
|
|
8778
|
+
**/
|
|
8779
|
+
spendLocal: GenericTxCall<
|
|
8780
|
+
Rv,
|
|
8781
|
+
(
|
|
8782
|
+
amount: bigint,
|
|
8783
|
+
beneficiary: MultiAddressLike,
|
|
8784
|
+
) => ChainSubmittableExtrinsic<
|
|
8785
|
+
Rv,
|
|
8786
|
+
{
|
|
8787
|
+
pallet: 'Treasury';
|
|
8788
|
+
palletCall: {
|
|
8789
|
+
name: 'SpendLocal';
|
|
8790
|
+
params: { amount: bigint; beneficiary: MultiAddressLike };
|
|
8791
|
+
};
|
|
8792
|
+
}
|
|
8793
|
+
>
|
|
8794
|
+
>;
|
|
8795
|
+
|
|
8796
|
+
/**
|
|
8797
|
+
* Force a previously approved proposal to be removed from the approval queue.
|
|
8798
|
+
*
|
|
8799
|
+
* ## Dispatch Origin
|
|
8800
|
+
*
|
|
8801
|
+
* Must be [`Config::RejectOrigin`].
|
|
8802
|
+
*
|
|
8803
|
+
* ## Details
|
|
8804
|
+
*
|
|
8805
|
+
* The original deposit will no longer be returned.
|
|
8806
|
+
*
|
|
8807
|
+
* ### Parameters
|
|
8808
|
+
* - `proposal_id`: The index of a proposal
|
|
8809
|
+
*
|
|
8810
|
+
* ### Complexity
|
|
8811
|
+
* - O(A) where `A` is the number of approvals
|
|
8812
|
+
*
|
|
8813
|
+
* ### Errors
|
|
8814
|
+
* - [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the
|
|
8815
|
+
* approval queue, i.e., the proposal has not been approved. This could also mean the
|
|
8816
|
+
* proposal does not exist altogether, thus there is no way it would have been approved
|
|
8817
|
+
* in the first place.
|
|
8818
|
+
*
|
|
8819
|
+
* @param {number} proposalId
|
|
8820
|
+
**/
|
|
8821
|
+
removeApproval: GenericTxCall<
|
|
8822
|
+
Rv,
|
|
8823
|
+
(proposalId: number) => ChainSubmittableExtrinsic<
|
|
8824
|
+
Rv,
|
|
8825
|
+
{
|
|
8826
|
+
pallet: 'Treasury';
|
|
8827
|
+
palletCall: {
|
|
8828
|
+
name: 'RemoveApproval';
|
|
8829
|
+
params: { proposalId: number };
|
|
8830
|
+
};
|
|
8831
|
+
}
|
|
8832
|
+
>
|
|
8833
|
+
>;
|
|
8834
|
+
|
|
8835
|
+
/**
|
|
8836
|
+
* Propose and approve a spend of treasury funds.
|
|
8837
|
+
*
|
|
8838
|
+
* ## Dispatch Origin
|
|
8839
|
+
*
|
|
8840
|
+
* Must be [`Config::SpendOrigin`] with the `Success` value being at least
|
|
8841
|
+
* `amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted
|
|
8842
|
+
* for assertion using the [`Config::BalanceConverter`].
|
|
8843
|
+
*
|
|
8844
|
+
* ## Details
|
|
8845
|
+
*
|
|
8846
|
+
* Create an approved spend for transferring a specific `amount` of `asset_kind` to a
|
|
8847
|
+
* designated beneficiary. The spend must be claimed using the `payout` dispatchable within
|
|
8848
|
+
* the [`Config::PayoutPeriod`].
|
|
8849
|
+
*
|
|
8850
|
+
* ### Parameters
|
|
8851
|
+
* - `asset_kind`: An indicator of the specific asset class to be spent.
|
|
8852
|
+
* - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
|
|
8853
|
+
* - `beneficiary`: The beneficiary of the spend.
|
|
8854
|
+
* - `valid_from`: The block number from which the spend can be claimed. It can refer to
|
|
8855
|
+
* the past if the resulting spend has not yet expired according to the
|
|
8856
|
+
* [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after
|
|
8857
|
+
* approval.
|
|
8858
|
+
*
|
|
8859
|
+
* ## Events
|
|
8860
|
+
*
|
|
8861
|
+
* Emits [`Event::AssetSpendApproved`] if successful.
|
|
8862
|
+
*
|
|
8863
|
+
* @param {[]} assetKind
|
|
8864
|
+
* @param {bigint} amount
|
|
8865
|
+
* @param {AccountId32Like} beneficiary
|
|
8866
|
+
* @param {number | undefined} validFrom
|
|
8867
|
+
**/
|
|
8868
|
+
spend: GenericTxCall<
|
|
8869
|
+
Rv,
|
|
8870
|
+
(
|
|
8871
|
+
assetKind: [],
|
|
8872
|
+
amount: bigint,
|
|
8873
|
+
beneficiary: AccountId32Like,
|
|
8874
|
+
validFrom: number | undefined,
|
|
8875
|
+
) => ChainSubmittableExtrinsic<
|
|
8876
|
+
Rv,
|
|
8877
|
+
{
|
|
8878
|
+
pallet: 'Treasury';
|
|
8879
|
+
palletCall: {
|
|
8880
|
+
name: 'Spend';
|
|
8881
|
+
params: { assetKind: []; amount: bigint; beneficiary: AccountId32Like; validFrom: number | undefined };
|
|
8882
|
+
};
|
|
8883
|
+
}
|
|
8884
|
+
>
|
|
8885
|
+
>;
|
|
8886
|
+
|
|
8887
|
+
/**
|
|
8888
|
+
* Claim a spend.
|
|
8889
|
+
*
|
|
8890
|
+
* ## Dispatch Origin
|
|
8891
|
+
*
|
|
8892
|
+
* Must be signed.
|
|
8893
|
+
*
|
|
8894
|
+
* ## Details
|
|
8895
|
+
*
|
|
8896
|
+
* Spends must be claimed within some temporal bounds. A spend may be claimed within one
|
|
8897
|
+
* [`Config::PayoutPeriod`] from the `valid_from` block.
|
|
8898
|
+
* In case of a payout failure, the spend status must be updated with the `check_status`
|
|
8899
|
+
* dispatchable before retrying with the current function.
|
|
8900
|
+
*
|
|
8901
|
+
* ### Parameters
|
|
8902
|
+
* - `index`: The spend index.
|
|
8903
|
+
*
|
|
8904
|
+
* ## Events
|
|
8905
|
+
*
|
|
8906
|
+
* Emits [`Event::Paid`] if successful.
|
|
8907
|
+
*
|
|
8908
|
+
* @param {number} index
|
|
8909
|
+
**/
|
|
8910
|
+
payout: GenericTxCall<
|
|
8911
|
+
Rv,
|
|
8912
|
+
(index: number) => ChainSubmittableExtrinsic<
|
|
8913
|
+
Rv,
|
|
8914
|
+
{
|
|
8915
|
+
pallet: 'Treasury';
|
|
8916
|
+
palletCall: {
|
|
8917
|
+
name: 'Payout';
|
|
8918
|
+
params: { index: number };
|
|
8919
|
+
};
|
|
8920
|
+
}
|
|
8921
|
+
>
|
|
8922
|
+
>;
|
|
8923
|
+
|
|
8924
|
+
/**
|
|
8925
|
+
* Check the status of the spend and remove it from the storage if processed.
|
|
8926
|
+
*
|
|
8927
|
+
* ## Dispatch Origin
|
|
8928
|
+
*
|
|
8929
|
+
* Must be signed.
|
|
8930
|
+
*
|
|
8931
|
+
* ## Details
|
|
8932
|
+
*
|
|
8933
|
+
* The status check is a prerequisite for retrying a failed payout.
|
|
8934
|
+
* If a spend has either succeeded or expired, it is removed from the storage by this
|
|
8935
|
+
* function. In such instances, transaction fees are refunded.
|
|
8936
|
+
*
|
|
8937
|
+
* ### Parameters
|
|
8938
|
+
* - `index`: The spend index.
|
|
8939
|
+
*
|
|
8940
|
+
* ## Events
|
|
8941
|
+
*
|
|
8942
|
+
* Emits [`Event::PaymentFailed`] if the spend payout has failed.
|
|
8943
|
+
* Emits [`Event::SpendProcessed`] if the spend payout has succeed.
|
|
8944
|
+
*
|
|
8945
|
+
* @param {number} index
|
|
8946
|
+
**/
|
|
8947
|
+
checkStatus: GenericTxCall<
|
|
8948
|
+
Rv,
|
|
8949
|
+
(index: number) => ChainSubmittableExtrinsic<
|
|
8950
|
+
Rv,
|
|
8951
|
+
{
|
|
8952
|
+
pallet: 'Treasury';
|
|
8953
|
+
palletCall: {
|
|
8954
|
+
name: 'CheckStatus';
|
|
8955
|
+
params: { index: number };
|
|
8956
|
+
};
|
|
8957
|
+
}
|
|
8958
|
+
>
|
|
8959
|
+
>;
|
|
8960
|
+
|
|
8961
|
+
/**
|
|
8962
|
+
* Void previously approved spend.
|
|
8963
|
+
*
|
|
8964
|
+
* ## Dispatch Origin
|
|
8965
|
+
*
|
|
8966
|
+
* Must be [`Config::RejectOrigin`].
|
|
8967
|
+
*
|
|
8968
|
+
* ## Details
|
|
8969
|
+
*
|
|
8970
|
+
* A spend void is only possible if the payout has not been attempted yet.
|
|
8971
|
+
*
|
|
8972
|
+
* ### Parameters
|
|
8973
|
+
* - `index`: The spend index.
|
|
8974
|
+
*
|
|
8975
|
+
* ## Events
|
|
8976
|
+
*
|
|
8977
|
+
* Emits [`Event::AssetSpendVoided`] if successful.
|
|
8978
|
+
*
|
|
8979
|
+
* @param {number} index
|
|
8980
|
+
**/
|
|
8981
|
+
voidSpend: GenericTxCall<
|
|
8982
|
+
Rv,
|
|
8983
|
+
(index: number) => ChainSubmittableExtrinsic<
|
|
8984
|
+
Rv,
|
|
8985
|
+
{
|
|
8986
|
+
pallet: 'Treasury';
|
|
8987
|
+
palletCall: {
|
|
8988
|
+
name: 'VoidSpend';
|
|
8989
|
+
params: { index: number };
|
|
8990
|
+
};
|
|
8991
|
+
}
|
|
8992
|
+
>
|
|
8993
|
+
>;
|
|
8994
|
+
|
|
8995
|
+
/**
|
|
8996
|
+
* Generic pallet tx call
|
|
8997
|
+
**/
|
|
8998
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
8999
|
+
};
|
|
9000
|
+
/**
|
|
9001
|
+
* Pallet `CommunityTreasury`'s transaction calls
|
|
9002
|
+
**/
|
|
9003
|
+
communityTreasury: {
|
|
9004
|
+
/**
|
|
9005
|
+
* Put forward a suggestion for spending.
|
|
9006
|
+
*
|
|
9007
|
+
* ## Dispatch Origin
|
|
9008
|
+
*
|
|
9009
|
+
* Must be signed.
|
|
9010
|
+
*
|
|
9011
|
+
* ## Details
|
|
9012
|
+
* A deposit proportional to the value is reserved and slashed if the proposal is rejected.
|
|
9013
|
+
* It is returned once the proposal is awarded.
|
|
9014
|
+
*
|
|
9015
|
+
* ### Complexity
|
|
9016
|
+
* - O(1)
|
|
9017
|
+
*
|
|
9018
|
+
* ## Events
|
|
9019
|
+
*
|
|
9020
|
+
* Emits [`Event::Proposed`] if successful.
|
|
9021
|
+
*
|
|
9022
|
+
* @param {bigint} value
|
|
9023
|
+
* @param {MultiAddressLike} beneficiary
|
|
9024
|
+
**/
|
|
9025
|
+
proposeSpend: GenericTxCall<
|
|
9026
|
+
Rv,
|
|
9027
|
+
(
|
|
9028
|
+
value: bigint,
|
|
9029
|
+
beneficiary: MultiAddressLike,
|
|
9030
|
+
) => ChainSubmittableExtrinsic<
|
|
9031
|
+
Rv,
|
|
9032
|
+
{
|
|
9033
|
+
pallet: 'CommunityTreasury';
|
|
9034
|
+
palletCall: {
|
|
9035
|
+
name: 'ProposeSpend';
|
|
9036
|
+
params: { value: bigint; beneficiary: MultiAddressLike };
|
|
9037
|
+
};
|
|
9038
|
+
}
|
|
9039
|
+
>
|
|
9040
|
+
>;
|
|
9041
|
+
|
|
9042
|
+
/**
|
|
9043
|
+
* Reject a proposed spend.
|
|
9044
|
+
*
|
|
9045
|
+
* ## Dispatch Origin
|
|
9046
|
+
*
|
|
9047
|
+
* Must be [`Config::RejectOrigin`].
|
|
9048
|
+
*
|
|
9049
|
+
* ## Details
|
|
9050
|
+
* The original deposit will be slashed.
|
|
9051
|
+
*
|
|
9052
|
+
* ### Complexity
|
|
9053
|
+
* - O(1)
|
|
9054
|
+
*
|
|
9055
|
+
* ## Events
|
|
9056
|
+
*
|
|
9057
|
+
* Emits [`Event::Rejected`] if successful.
|
|
9058
|
+
*
|
|
9059
|
+
* @param {number} proposalId
|
|
9060
|
+
**/
|
|
9061
|
+
rejectProposal: GenericTxCall<
|
|
9062
|
+
Rv,
|
|
9063
|
+
(proposalId: number) => ChainSubmittableExtrinsic<
|
|
9064
|
+
Rv,
|
|
9065
|
+
{
|
|
9066
|
+
pallet: 'CommunityTreasury';
|
|
9067
|
+
palletCall: {
|
|
9068
|
+
name: 'RejectProposal';
|
|
9069
|
+
params: { proposalId: number };
|
|
9070
|
+
};
|
|
9071
|
+
}
|
|
9072
|
+
>
|
|
9073
|
+
>;
|
|
9074
|
+
|
|
9075
|
+
/**
|
|
9076
|
+
* Approve a proposal.
|
|
9077
|
+
*
|
|
9078
|
+
* ## Dispatch Origin
|
|
9079
|
+
*
|
|
9080
|
+
* Must be [`Config::ApproveOrigin`].
|
|
9081
|
+
*
|
|
9082
|
+
* ## Details
|
|
9083
|
+
*
|
|
9084
|
+
* At a later time, the proposal will be allocated to the beneficiary and the original
|
|
9085
|
+
* deposit will be returned.
|
|
9086
|
+
*
|
|
9087
|
+
* ### Complexity
|
|
9088
|
+
* - O(1).
|
|
9089
|
+
*
|
|
9090
|
+
* ## Events
|
|
9091
|
+
*
|
|
9092
|
+
* No events are emitted from this dispatch.
|
|
9093
|
+
*
|
|
9094
|
+
* @param {number} proposalId
|
|
9095
|
+
**/
|
|
9096
|
+
approveProposal: GenericTxCall<
|
|
9097
|
+
Rv,
|
|
9098
|
+
(proposalId: number) => ChainSubmittableExtrinsic<
|
|
9099
|
+
Rv,
|
|
9100
|
+
{
|
|
9101
|
+
pallet: 'CommunityTreasury';
|
|
9102
|
+
palletCall: {
|
|
9103
|
+
name: 'ApproveProposal';
|
|
9104
|
+
params: { proposalId: number };
|
|
9105
|
+
};
|
|
9106
|
+
}
|
|
9107
|
+
>
|
|
9108
|
+
>;
|
|
9109
|
+
|
|
9110
|
+
/**
|
|
9111
|
+
* Propose and approve a spend of treasury funds.
|
|
9112
|
+
*
|
|
9113
|
+
* ## Dispatch Origin
|
|
9114
|
+
*
|
|
9115
|
+
* Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`.
|
|
9116
|
+
*
|
|
9117
|
+
* ### Details
|
|
9118
|
+
* NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the
|
|
9119
|
+
* beneficiary.
|
|
9120
|
+
*
|
|
9121
|
+
* ### Parameters
|
|
9122
|
+
* - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
|
|
9123
|
+
* - `beneficiary`: The destination account for the transfer.
|
|
9124
|
+
*
|
|
9125
|
+
* ## Events
|
|
9126
|
+
*
|
|
9127
|
+
* Emits [`Event::SpendApproved`] if successful.
|
|
9128
|
+
*
|
|
9129
|
+
* @param {bigint} amount
|
|
9130
|
+
* @param {MultiAddressLike} beneficiary
|
|
9131
|
+
**/
|
|
9132
|
+
spendLocal: GenericTxCall<
|
|
9133
|
+
Rv,
|
|
9134
|
+
(
|
|
9135
|
+
amount: bigint,
|
|
9136
|
+
beneficiary: MultiAddressLike,
|
|
9137
|
+
) => ChainSubmittableExtrinsic<
|
|
9138
|
+
Rv,
|
|
9139
|
+
{
|
|
9140
|
+
pallet: 'CommunityTreasury';
|
|
9141
|
+
palletCall: {
|
|
9142
|
+
name: 'SpendLocal';
|
|
9143
|
+
params: { amount: bigint; beneficiary: MultiAddressLike };
|
|
9144
|
+
};
|
|
9145
|
+
}
|
|
9146
|
+
>
|
|
9147
|
+
>;
|
|
9148
|
+
|
|
9149
|
+
/**
|
|
9150
|
+
* Force a previously approved proposal to be removed from the approval queue.
|
|
9151
|
+
*
|
|
9152
|
+
* ## Dispatch Origin
|
|
9153
|
+
*
|
|
9154
|
+
* Must be [`Config::RejectOrigin`].
|
|
9155
|
+
*
|
|
9156
|
+
* ## Details
|
|
9157
|
+
*
|
|
9158
|
+
* The original deposit will no longer be returned.
|
|
9159
|
+
*
|
|
9160
|
+
* ### Parameters
|
|
9161
|
+
* - `proposal_id`: The index of a proposal
|
|
9162
|
+
*
|
|
9163
|
+
* ### Complexity
|
|
9164
|
+
* - O(A) where `A` is the number of approvals
|
|
9165
|
+
*
|
|
9166
|
+
* ### Errors
|
|
9167
|
+
* - [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the
|
|
9168
|
+
* approval queue, i.e., the proposal has not been approved. This could also mean the
|
|
9169
|
+
* proposal does not exist altogether, thus there is no way it would have been approved
|
|
9170
|
+
* in the first place.
|
|
9171
|
+
*
|
|
9172
|
+
* @param {number} proposalId
|
|
9173
|
+
**/
|
|
9174
|
+
removeApproval: GenericTxCall<
|
|
9175
|
+
Rv,
|
|
9176
|
+
(proposalId: number) => ChainSubmittableExtrinsic<
|
|
9177
|
+
Rv,
|
|
9178
|
+
{
|
|
9179
|
+
pallet: 'CommunityTreasury';
|
|
9180
|
+
palletCall: {
|
|
9181
|
+
name: 'RemoveApproval';
|
|
9182
|
+
params: { proposalId: number };
|
|
9183
|
+
};
|
|
9184
|
+
}
|
|
9185
|
+
>
|
|
9186
|
+
>;
|
|
9187
|
+
|
|
9188
|
+
/**
|
|
9189
|
+
* Propose and approve a spend of treasury funds.
|
|
9190
|
+
*
|
|
9191
|
+
* ## Dispatch Origin
|
|
9192
|
+
*
|
|
9193
|
+
* Must be [`Config::SpendOrigin`] with the `Success` value being at least
|
|
9194
|
+
* `amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted
|
|
9195
|
+
* for assertion using the [`Config::BalanceConverter`].
|
|
9196
|
+
*
|
|
9197
|
+
* ## Details
|
|
9198
|
+
*
|
|
9199
|
+
* Create an approved spend for transferring a specific `amount` of `asset_kind` to a
|
|
9200
|
+
* designated beneficiary. The spend must be claimed using the `payout` dispatchable within
|
|
9201
|
+
* the [`Config::PayoutPeriod`].
|
|
9202
|
+
*
|
|
9203
|
+
* ### Parameters
|
|
9204
|
+
* - `asset_kind`: An indicator of the specific asset class to be spent.
|
|
9205
|
+
* - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
|
|
9206
|
+
* - `beneficiary`: The beneficiary of the spend.
|
|
9207
|
+
* - `valid_from`: The block number from which the spend can be claimed. It can refer to
|
|
9208
|
+
* the past if the resulting spend has not yet expired according to the
|
|
9209
|
+
* [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after
|
|
9210
|
+
* approval.
|
|
9211
|
+
*
|
|
9212
|
+
* ## Events
|
|
9213
|
+
*
|
|
9214
|
+
* Emits [`Event::AssetSpendApproved`] if successful.
|
|
9215
|
+
*
|
|
9216
|
+
* @param {[]} assetKind
|
|
9217
|
+
* @param {bigint} amount
|
|
9218
|
+
* @param {AccountId32Like} beneficiary
|
|
9219
|
+
* @param {number | undefined} validFrom
|
|
9220
|
+
**/
|
|
9221
|
+
spend: GenericTxCall<
|
|
9222
|
+
Rv,
|
|
9223
|
+
(
|
|
9224
|
+
assetKind: [],
|
|
9225
|
+
amount: bigint,
|
|
9226
|
+
beneficiary: AccountId32Like,
|
|
9227
|
+
validFrom: number | undefined,
|
|
9228
|
+
) => ChainSubmittableExtrinsic<
|
|
9229
|
+
Rv,
|
|
9230
|
+
{
|
|
9231
|
+
pallet: 'CommunityTreasury';
|
|
9232
|
+
palletCall: {
|
|
9233
|
+
name: 'Spend';
|
|
9234
|
+
params: { assetKind: []; amount: bigint; beneficiary: AccountId32Like; validFrom: number | undefined };
|
|
9235
|
+
};
|
|
9236
|
+
}
|
|
9237
|
+
>
|
|
9238
|
+
>;
|
|
9239
|
+
|
|
9240
|
+
/**
|
|
9241
|
+
* Claim a spend.
|
|
9242
|
+
*
|
|
9243
|
+
* ## Dispatch Origin
|
|
9244
|
+
*
|
|
9245
|
+
* Must be signed.
|
|
9246
|
+
*
|
|
9247
|
+
* ## Details
|
|
9248
|
+
*
|
|
9249
|
+
* Spends must be claimed within some temporal bounds. A spend may be claimed within one
|
|
9250
|
+
* [`Config::PayoutPeriod`] from the `valid_from` block.
|
|
9251
|
+
* In case of a payout failure, the spend status must be updated with the `check_status`
|
|
9252
|
+
* dispatchable before retrying with the current function.
|
|
9253
|
+
*
|
|
9254
|
+
* ### Parameters
|
|
9255
|
+
* - `index`: The spend index.
|
|
9256
|
+
*
|
|
9257
|
+
* ## Events
|
|
9258
|
+
*
|
|
9259
|
+
* Emits [`Event::Paid`] if successful.
|
|
9260
|
+
*
|
|
9261
|
+
* @param {number} index
|
|
9262
|
+
**/
|
|
9263
|
+
payout: GenericTxCall<
|
|
9264
|
+
Rv,
|
|
9265
|
+
(index: number) => ChainSubmittableExtrinsic<
|
|
9266
|
+
Rv,
|
|
9267
|
+
{
|
|
9268
|
+
pallet: 'CommunityTreasury';
|
|
9269
|
+
palletCall: {
|
|
9270
|
+
name: 'Payout';
|
|
9271
|
+
params: { index: number };
|
|
9272
|
+
};
|
|
9273
|
+
}
|
|
9274
|
+
>
|
|
9275
|
+
>;
|
|
9276
|
+
|
|
9277
|
+
/**
|
|
9278
|
+
* Check the status of the spend and remove it from the storage if processed.
|
|
9279
|
+
*
|
|
9280
|
+
* ## Dispatch Origin
|
|
9281
|
+
*
|
|
9282
|
+
* Must be signed.
|
|
9283
|
+
*
|
|
9284
|
+
* ## Details
|
|
9285
|
+
*
|
|
9286
|
+
* The status check is a prerequisite for retrying a failed payout.
|
|
9287
|
+
* If a spend has either succeeded or expired, it is removed from the storage by this
|
|
9288
|
+
* function. In such instances, transaction fees are refunded.
|
|
9289
|
+
*
|
|
9290
|
+
* ### Parameters
|
|
9291
|
+
* - `index`: The spend index.
|
|
9292
|
+
*
|
|
9293
|
+
* ## Events
|
|
9294
|
+
*
|
|
9295
|
+
* Emits [`Event::PaymentFailed`] if the spend payout has failed.
|
|
9296
|
+
* Emits [`Event::SpendProcessed`] if the spend payout has succeed.
|
|
9297
|
+
*
|
|
9298
|
+
* @param {number} index
|
|
9299
|
+
**/
|
|
9300
|
+
checkStatus: GenericTxCall<
|
|
9301
|
+
Rv,
|
|
9302
|
+
(index: number) => ChainSubmittableExtrinsic<
|
|
9303
|
+
Rv,
|
|
9304
|
+
{
|
|
9305
|
+
pallet: 'CommunityTreasury';
|
|
9306
|
+
palletCall: {
|
|
9307
|
+
name: 'CheckStatus';
|
|
9308
|
+
params: { index: number };
|
|
9309
|
+
};
|
|
9310
|
+
}
|
|
9311
|
+
>
|
|
9312
|
+
>;
|
|
9313
|
+
|
|
9314
|
+
/**
|
|
9315
|
+
* Void previously approved spend.
|
|
9316
|
+
*
|
|
9317
|
+
* ## Dispatch Origin
|
|
9318
|
+
*
|
|
9319
|
+
* Must be [`Config::RejectOrigin`].
|
|
9320
|
+
*
|
|
9321
|
+
* ## Details
|
|
9322
|
+
*
|
|
9323
|
+
* A spend void is only possible if the payout has not been attempted yet.
|
|
9324
|
+
*
|
|
9325
|
+
* ### Parameters
|
|
9326
|
+
* - `index`: The spend index.
|
|
9327
|
+
*
|
|
9328
|
+
* ## Events
|
|
9329
|
+
*
|
|
9330
|
+
* Emits [`Event::AssetSpendVoided`] if successful.
|
|
9331
|
+
*
|
|
9332
|
+
* @param {number} index
|
|
9333
|
+
**/
|
|
9334
|
+
voidSpend: GenericTxCall<
|
|
9335
|
+
Rv,
|
|
9336
|
+
(index: number) => ChainSubmittableExtrinsic<
|
|
9337
|
+
Rv,
|
|
9338
|
+
{
|
|
9339
|
+
pallet: 'CommunityTreasury';
|
|
9340
|
+
palletCall: {
|
|
9341
|
+
name: 'VoidSpend';
|
|
9342
|
+
params: { index: number };
|
|
9343
|
+
};
|
|
9344
|
+
}
|
|
9345
|
+
>
|
|
9346
|
+
>;
|
|
9347
|
+
|
|
9348
|
+
/**
|
|
9349
|
+
* Generic pallet tx call
|
|
9350
|
+
**/
|
|
9351
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
9352
|
+
};
|
|
9353
|
+
/**
|
|
9354
|
+
* Pallet `CollectiveProxy`'s transaction calls
|
|
9355
|
+
**/
|
|
9356
|
+
collectiveProxy: {
|
|
9357
|
+
/**
|
|
9358
|
+
* Executes the call on a behalf of an aliased account.
|
|
9359
|
+
*
|
|
9360
|
+
* The `origin` of the call is supposed to be a _collective_ (but can be anything) which can dispatch `call` on behalf of the aliased account.
|
|
9361
|
+
* It's essentially a proxy call that can be made by arbitrary origin type.
|
|
9362
|
+
*
|
|
9363
|
+
* @param {AstarRuntimeRuntimeCallLike} call
|
|
9364
|
+
**/
|
|
9365
|
+
executeCall: GenericTxCall<
|
|
9366
|
+
Rv,
|
|
9367
|
+
(call: AstarRuntimeRuntimeCallLike) => ChainSubmittableExtrinsic<
|
|
9368
|
+
Rv,
|
|
9369
|
+
{
|
|
9370
|
+
pallet: 'CollectiveProxy';
|
|
9371
|
+
palletCall: {
|
|
9372
|
+
name: 'ExecuteCall';
|
|
9373
|
+
params: { call: AstarRuntimeRuntimeCallLike };
|
|
9374
|
+
};
|
|
9375
|
+
}
|
|
9376
|
+
>
|
|
9377
|
+
>;
|
|
9378
|
+
|
|
9379
|
+
/**
|
|
9380
|
+
* Generic pallet tx call
|
|
9381
|
+
**/
|
|
9382
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
9383
|
+
};
|
|
9384
|
+
/**
|
|
9385
|
+
* Pallet `MultiBlockMigrations`'s transaction calls
|
|
9386
|
+
**/
|
|
9387
|
+
multiBlockMigrations: {
|
|
9388
|
+
/**
|
|
9389
|
+
* Allows root to set a cursor to forcefully start, stop or forward the migration process.
|
|
9390
|
+
*
|
|
9391
|
+
* Should normally not be needed and is only in place as emergency measure. Note that
|
|
9392
|
+
* restarting the migration process in this manner will not call the
|
|
9393
|
+
* [`MigrationStatusHandler::started`] hook or emit an `UpgradeStarted` event.
|
|
9394
|
+
*
|
|
9395
|
+
* @param {PalletMigrationsMigrationCursor | undefined} cursor
|
|
9396
|
+
**/
|
|
9397
|
+
forceSetCursor: GenericTxCall<
|
|
9398
|
+
Rv,
|
|
9399
|
+
(cursor: PalletMigrationsMigrationCursor | undefined) => ChainSubmittableExtrinsic<
|
|
9400
|
+
Rv,
|
|
9401
|
+
{
|
|
9402
|
+
pallet: 'MultiBlockMigrations';
|
|
9403
|
+
palletCall: {
|
|
9404
|
+
name: 'ForceSetCursor';
|
|
9405
|
+
params: { cursor: PalletMigrationsMigrationCursor | undefined };
|
|
9406
|
+
};
|
|
9407
|
+
}
|
|
9408
|
+
>
|
|
9409
|
+
>;
|
|
9410
|
+
|
|
9411
|
+
/**
|
|
9412
|
+
* Allows root to set an active cursor to forcefully start/forward the migration process.
|
|
9413
|
+
*
|
|
9414
|
+
* This is an edge-case version of [`Self::force_set_cursor`] that allows to set the
|
|
9415
|
+
* `started_at` value to the next block number. Otherwise this would not be possible, since
|
|
9416
|
+
* `force_set_cursor` takes an absolute block number. Setting `started_at` to `None`
|
|
9417
|
+
* indicates that the current block number plus one should be used.
|
|
9418
|
+
*
|
|
9419
|
+
* @param {number} index
|
|
9420
|
+
* @param {BytesLike | undefined} innerCursor
|
|
9421
|
+
* @param {number | undefined} startedAt
|
|
9422
|
+
**/
|
|
9423
|
+
forceSetActiveCursor: GenericTxCall<
|
|
9424
|
+
Rv,
|
|
9425
|
+
(
|
|
9426
|
+
index: number,
|
|
9427
|
+
innerCursor: BytesLike | undefined,
|
|
9428
|
+
startedAt: number | undefined,
|
|
9429
|
+
) => ChainSubmittableExtrinsic<
|
|
9430
|
+
Rv,
|
|
9431
|
+
{
|
|
9432
|
+
pallet: 'MultiBlockMigrations';
|
|
9433
|
+
palletCall: {
|
|
9434
|
+
name: 'ForceSetActiveCursor';
|
|
9435
|
+
params: { index: number; innerCursor: BytesLike | undefined; startedAt: number | undefined };
|
|
9436
|
+
};
|
|
9437
|
+
}
|
|
9438
|
+
>
|
|
9439
|
+
>;
|
|
9440
|
+
|
|
9441
|
+
/**
|
|
9442
|
+
* Forces the onboarding of the migrations.
|
|
9443
|
+
*
|
|
9444
|
+
* This process happens automatically on a runtime upgrade. It is in place as an emergency
|
|
9445
|
+
* measurement. The cursor needs to be `None` for this to succeed.
|
|
9446
|
+
*
|
|
9447
|
+
**/
|
|
9448
|
+
forceOnboardMbms: GenericTxCall<
|
|
9449
|
+
Rv,
|
|
9450
|
+
() => ChainSubmittableExtrinsic<
|
|
9451
|
+
Rv,
|
|
9452
|
+
{
|
|
9453
|
+
pallet: 'MultiBlockMigrations';
|
|
9454
|
+
palletCall: {
|
|
9455
|
+
name: 'ForceOnboardMbms';
|
|
9456
|
+
};
|
|
9457
|
+
}
|
|
9458
|
+
>
|
|
9459
|
+
>;
|
|
9460
|
+
|
|
9461
|
+
/**
|
|
9462
|
+
* Clears the `Historic` set.
|
|
9463
|
+
*
|
|
9464
|
+
* `map_cursor` must be set to the last value that was returned by the
|
|
9465
|
+
* `HistoricCleared` event. The first time `None` can be used. `limit` must be chosen in a
|
|
9466
|
+
* way that will result in a sensible weight.
|
|
9467
|
+
*
|
|
9468
|
+
* @param {PalletMigrationsHistoricCleanupSelector} selector
|
|
9469
|
+
**/
|
|
9470
|
+
clearHistoric: GenericTxCall<
|
|
9471
|
+
Rv,
|
|
9472
|
+
(selector: PalletMigrationsHistoricCleanupSelector) => ChainSubmittableExtrinsic<
|
|
9473
|
+
Rv,
|
|
9474
|
+
{
|
|
9475
|
+
pallet: 'MultiBlockMigrations';
|
|
9476
|
+
palletCall: {
|
|
9477
|
+
name: 'ClearHistoric';
|
|
9478
|
+
params: { selector: PalletMigrationsHistoricCleanupSelector };
|
|
6431
9479
|
};
|
|
6432
9480
|
}
|
|
6433
9481
|
>
|