@daostack/client › Globals › CompetitionScheme
-
↳ CompetitionScheme
- competitions
- createProposal
- createProposalErrorHandler
- createProposalTransaction
- createProposalTransactionMap
- fetchStaticState
- getCompetitionContract
- proposals
- redeemSuggestion
- setStaticState
- state
- voteSuggestion
- x
+ new CompetitionScheme(idOrOpts
: Address | ISchemeStaticState, context
: Arc): CompetitionScheme
Inherited from SchemeBase.constructor
Defined in schemes/base.ts:239
Parameters:
Name | Type |
---|---|
idOrOpts |
Address | ISchemeStaticState |
context |
Arc |
Returns: CompetitionScheme
• ReputationFromToken: ReputationFromTokenScheme | null = null
Inherited from SchemeBase.ReputationFromToken
Defined in schemes/base.ts:239
• context: Arc
Inherited from SchemeBase.context
Defined in schemes/base.ts:241
• id: Address
Inherited from SchemeBase.id
Defined in schemes/base.ts:237
• staticState: ISchemeStaticState | null = null
Inherited from SchemeBase.staticState
Defined in schemes/base.ts:238
▸ competitions(options
: IProposalQueryOptions, apolloQueryOptions
: IApolloQueryOptions): Observable‹Competition[]›
Defined in schemes/competition.ts:167
Return a list of competitions in this scheme.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
options |
IProposalQueryOptions | {} | - |
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹Competition[]›
▸ createProposal(options
: IProposalCreateOptionsCompetition): Operation‹Proposal›
Overrides SchemeBase.createProposal
Defined in schemes/competition.ts:277
create a proposal for starting a Competition
memberof
CompetitionScheme
Parameters:
Name | Type |
---|---|
options |
IProposalCreateOptionsCompetition |
▸ createProposalErrorHandler(options
: any): function
Overrides SchemeBase.createProposalErrorHandler
Defined in schemes/competition.ts:253
Parameters:
Name | Type |
---|---|
options |
any |
Returns: function
▸ (err
: Error): Error | Promise‹Error›
Parameters:
Name | Type |
---|---|
err |
Error |
▸ createProposalTransaction(options
: IProposalCreateOptionsCompetition): (Anonymous function)
Overrides SchemeBase.createProposalTransaction
Defined in schemes/competition.ts:187
Parameters:
Name | Type |
---|---|
options |
IProposalCreateOptionsCompetition |
Returns: (Anonymous function)
▸ createProposalTransactionMap(): txMap
Overrides SchemeBase.createProposalTransactionMap
Defined in schemes/competition.ts:244
Returns: txMap
▸ fetchStaticState(): Promise‹ISchemeStaticState›
Inherited from SchemeBase.fetchStaticState
Defined in schemes/base.ts:256
fetch the static state from the subgraph
Returns: Promise‹ISchemeStaticState›
the statatic state
▸ getCompetitionContract(): Promise‹any›
Defined in schemes/competition.ts:281
Returns: Promise‹any›
▸ proposals(options
: IProposalQueryOptions, apolloQueryOptions
: IApolloQueryOptions): Observable‹Proposal[]›
Inherited from SchemeBase.proposals
Defined in schemes/base.ts:467
Parameters:
Name | Type | Default |
---|---|---|
options |
IProposalQueryOptions | {} |
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹Proposal[]›
▸ redeemSuggestion(options
: object): Operation‹boolean›
Defined in schemes/competition.ts:347
Parameters:
▪ options: object
Name | Type |
---|---|
beneficiary |
Address |
suggestionId |
number |
Returns: Operation‹boolean›
▸ setStaticState(opts
: ISchemeStaticState): void
Inherited from SchemeBase.setStaticState
Defined in schemes/base.ts:279
Parameters:
Name | Type |
---|---|
opts |
ISchemeStaticState |
Returns: void
▸ state(apolloQueryOptions
: IApolloQueryOptions): Observable‹ISchemeState›
Overrides SchemeBase.state
Defined in schemes/competition.ts:82
Parameters:
Name | Type | Default |
---|---|---|
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹ISchemeState›
▸ voteSuggestion(options
: object): Operation‹CompetitionVote›
Defined in schemes/competition.ts:296
Vote for the suggestion that is, in the current scheme, identified by suggestionId
memberof
CompetitionScheme
Parameters:
▪ options: object
Name | Type |
---|---|
suggestionId |
number |
Returns: Operation‹CompetitionVote›
▸ x(): void
Inherited from SchemeBase.x
Defined in schemes/base.ts:319
Returns: void
Inherited from SchemeBase.fragments
Defined in schemes/base.ts:106
• SchemeFields: any = gql fragment SchemeFields on ControllerScheme { id address name dao { id } canDelegateCall canRegisterSchemes canUpgradeController canManageGlobalConstraints paramsHash contributionRewardParams { id votingMachine voteParams { id queuedVoteRequiredPercentage queuedVotePeriodLimit boostedVotePeriodLimit preBoostedVotePeriodLimit thresholdConst limitExponentValue quietEndingPeriod proposingRepReward votersReputationLossRatio minimumDaoBounty daoBountyConst activationTime voteOnBehalf } } contributionRewardExtParams { id votingMachine voteParams { id queuedVoteRequiredPercentage queuedVotePeriodLimit boostedVotePeriodLimit preBoostedVotePeriodLimit thresholdConst limitExponentValue quietEndingPeriod proposingRepReward votersReputationLossRatio minimumDaoBounty daoBountyConst activationTime voteOnBehalf } rewarder } genericSchemeParams { votingMachine contractToCall voteParams { queuedVoteRequiredPercentage queuedVotePeriodLimit boostedVotePeriodLimit preBoostedVotePeriodLimit thresholdConst limitExponentValue quietEndingPeriod proposingRepReward votersReputationLossRatio minimumDaoBounty daoBountyConst activationTime voteOnBehalf } } schemeRegistrarParams { votingMachine voteRemoveParams { queuedVoteRequiredPercentage queuedVotePeriodLimit boostedVotePeriodLimit preBoostedVotePeriodLimit thresholdConst limitExponentValue quietEndingPeriod proposingRepReward votersReputationLossRatio minimumDaoBounty daoBountyConst activationTime voteOnBehalf } voteRegisterParams { queuedVoteRequiredPercentage queuedVotePeriodLimit boostedVotePeriodLimit preBoostedVotePeriodLimit thresholdConst limitExponentValue quietEndingPeriod proposingRepReward votersReputationLossRatio minimumDaoBounty daoBountyConst activationTime voteOnBehalf } } numberOfQueuedProposals numberOfPreBoostedProposals numberOfBoostedProposals uGenericSchemeParams { votingMachine contractToCall voteParams { queuedVoteRequiredPercentage queuedVotePeriodLimit boostedVotePeriodLimit preBoostedVotePeriodLimit thresholdConst limitExponentValue quietEndingPeriod proposingRepReward votersReputationLossRatio minimumDaoBounty daoBountyConst activationTime voteOnBehalf } } version }
Defined in schemes/base.ts:107