New OpenTip structure (#2394)

* New OpenTip structure

* Kusama update
This commit is contained in:
Jaco Greeff
2020-06-29 16:20:43 +02:00
committed by GitHub
parent 8643b5da87
commit 7dfc8625cc
6 changed files with 87 additions and 47 deletions
+7 -4
View File
@@ -39,7 +39,7 @@ import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, Elect
import { ApiId, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/state';
import { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
import { AccountInfo, ApplyExtrinsicResult, ChainProperties, ChainType, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, Phase, RefCount, TransactionValidityError, UnknownTransaction } from '@polkadot/types/interfaces/system';
import { OpenTip, OpenTipFinder, OpenTipTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
import { OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
import { CallHash, Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
import { VestingInfo } from '@polkadot/types/interfaces/vesting';
@@ -1112,9 +1112,12 @@ declare module '@polkadot/types/types/registry' {
OpenTip: OpenTip;
'Option<OpenTip>': Option<OpenTip>;
'Vec<OpenTip>': Vec<OpenTip>;
OpenTipFinder: OpenTipFinder;
'Option<OpenTipFinder>': Option<OpenTipFinder>;
'Vec<OpenTipFinder>': Vec<OpenTipFinder>;
OpenTipTo225: OpenTipTo225;
'Option<OpenTipTo225>': Option<OpenTipTo225>;
'Vec<OpenTipTo225>': Vec<OpenTipTo225>;
OpenTipFinderTo225: OpenTipFinderTo225;
'Option<OpenTipFinderTo225>': Option<OpenTipFinderTo225>;
'Vec<OpenTipFinderTo225>': Vec<OpenTipFinderTo225>;
OpenTipTip: OpenTipTip;
'Option<OpenTipTip>': Option<OpenTipTip>;
'Vec<OpenTipTip>': Vec<OpenTipTip>;
@@ -13,11 +13,20 @@ export default {
OpenTip: {
reason: 'Hash',
who: 'AccountId',
finder: 'Option<OpenTipFinder>',
finder: 'AccountId',
deposit: 'Balance',
closes: 'Option<BlockNumber>',
tips: 'Vec<OpenTipTip>',
findersFee: 'bool'
},
OpenTipTo225: {
reason: 'Hash',
who: 'AccountId',
finder: 'Option<OpenTipFinderTo225>',
closes: 'Option<BlockNumber>',
tips: 'Vec<OpenTipTip>'
},
OpenTipFinder: '(AccountId, Balance)',
OpenTipFinderTo225: '(AccountId, Balance)',
OpenTipTip: '(AccountId, Balance)',
TreasuryProposal: {
proposer: 'AccountId',
@@ -3,23 +3,35 @@
import { ITuple } from '@polkadot/types/types';
import { Option, Struct, Vec } from '@polkadot/types/codec';
import { bool } from '@polkadot/types/primitive';
import { AccountId, Balance, BlockNumber, Hash } from '@polkadot/types/interfaces/runtime';
/** @name OpenTip */
export interface OpenTip extends Struct {
readonly reason: Hash;
readonly who: AccountId;
readonly finder: Option<OpenTipFinder>;
readonly finder: AccountId;
readonly deposit: Balance;
readonly closes: Option<BlockNumber>;
readonly tips: Vec<OpenTipTip>;
readonly findersFee: bool;
}
/** @name OpenTipFinder */
export interface OpenTipFinder extends ITuple<[AccountId, Balance]> {}
/** @name OpenTipFinderTo225 */
export interface OpenTipFinderTo225 extends ITuple<[AccountId, Balance]> {}
/** @name OpenTipTip */
export interface OpenTipTip extends ITuple<[AccountId, Balance]> {}
/** @name OpenTipTo225 */
export interface OpenTipTo225 extends Struct {
readonly reason: Hash;
readonly who: AccountId;
readonly finder: Option<OpenTipFinderTo225>;
readonly closes: Option<BlockNumber>;
readonly tips: Vec<OpenTipTip>;
}
/** @name TreasuryProposal */
export interface TreasuryProposal extends Struct {
readonly proposer: AccountId;