@daostack/client › Globals › CompetitionScheme
Class: CompetitionScheme
Hierarchy
-
↳ CompetitionScheme
Implements
Index
Constructors
Properties
Methods
- competitions
- createProposal
- createProposalErrorHandler
- createProposalTransaction
- createProposalTransactionMap
- fetchStaticState
- getCompetitionContract
- proposals
- redeemSuggestion
- setStaticState
- state
- voteSuggestion
- x
Object literals
Constructors
constructor
+ 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
Properties
ReputationFromToken
• ReputationFromToken: *ReputationFromTokenScheme | null* = null |
Inherited from SchemeBase.ReputationFromToken
Defined in schemes/base.ts:239
context
• context: Arc
Inherited from SchemeBase.context
Defined in schemes/base.ts:241
id
• id: Address
Inherited from SchemeBase.id
Defined in schemes/base.ts:237
staticState
• staticState: *ISchemeStaticState | null* = null |
Inherited from SchemeBase.staticState
Defined in schemes/base.ts:238
Methods
competitions
▸ 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
▸ 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
▸ 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
▸ createProposalTransaction(options
: IProposalCreateOptionsCompetition): (Anonymous function)
Overrides SchemeBase.createProposalTransaction
Defined in schemes/competition.ts:187
Parameters:
Name | Type |
---|---|
options |
IProposalCreateOptionsCompetition |
Returns: (Anonymous function)
createProposalTransactionMap
▸ createProposalTransactionMap(): txMap
Overrides SchemeBase.createProposalTransactionMap
Defined in schemes/competition.ts:244
Returns: txMap
fetchStaticState
▸ 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
▸ getCompetitionContract(): Promise‹any›
Defined in schemes/competition.ts:281
Returns: Promise‹any›
proposals
▸ 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
▸ redeemSuggestion(options
: object): Operation‹boolean›
Defined in schemes/competition.ts:347
Parameters:
▪ options: object
Name | Type |
---|---|
beneficiary |
Address |
suggestionId |
number |
Returns: Operation‹boolean›
setStaticState
▸ setStaticState(opts
: ISchemeStaticState): void
Inherited from SchemeBase.setStaticState
Defined in schemes/base.ts:279
Parameters:
Name | Type |
---|---|
opts |
ISchemeStaticState |
Returns: void
state
▸ state(apolloQueryOptions
: IApolloQueryOptions): Observable‹ISchemeState›
Overrides SchemeBase.state
Defined in schemes/competition.ts:82
Parameters:
Name | Type | Default |
---|---|---|
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹ISchemeState›
voteSuggestion
▸ 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
▸ x(): void
Inherited from SchemeBase.x
Defined in schemes/base.ts:319
Returns: void
Object literals
Static
fragments
▪ fragments: object
Inherited from SchemeBase.fragments
Defined in schemes/base.ts:106
SchemeFields
• 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