@daostack/client › Globals › SchemeBase
A Scheme represents a scheme instance that is registered at a DAO
-
SchemeBase
↳ Scheme
- createProposal
- createProposalErrorHandler
- createProposalTransaction
- createProposalTransactionMap
- fetchStaticState
- proposals
- setStaticState
- state
- x
+ new SchemeBase(idOrOpts: Address | ISchemeStaticState, context: Arc): SchemeBase
Defined in schemes/base.ts:239
Parameters:
| Name | Type |
|---|---|
idOrOpts |
Address | ISchemeStaticState |
context |
Arc |
Returns: SchemeBase
• ReputationFromToken: ReputationFromTokenScheme | null = null
Defined in schemes/base.ts:239
• context: Arc
Defined in schemes/base.ts:241
• id: Address
Defined in schemes/base.ts:237
• staticState: ISchemeStaticState | null = null
Defined in schemes/base.ts:238
▸ createProposal(options: IProposalCreateOptions): Operation‹Proposal›
Defined in schemes/base.ts:300
Parameters:
| Name | Type |
|---|---|
options |
IProposalCreateOptions |
▸ createProposalErrorHandler(options?: any): function
Defined in schemes/base.ts:296
Parameters:
| Name | Type |
|---|---|
options? |
any |
Returns: function
▸ (err: Error): Error | Promise‹Error›
Parameters:
| Name | Type |
|---|---|
err |
Error |
▸ createProposalTransaction(options: any): function
Defined in schemes/base.ts:288
create a new proposal in this scheme TODO: move this to the schemes - we should call proposal.scheme.createProposal
Parameters:
| Name | Type |
|---|---|
options |
any |
Returns: function
a Proposal instance
▸ (): Promise‹any›
▸ createProposalTransactionMap(): function
Defined in schemes/base.ts:292
Returns: function
▸ (receipt: any): any
Parameters:
| Name | Type |
|---|---|
receipt |
any |
▸ fetchStaticState(): Promise‹ISchemeStaticState›
Defined in schemes/base.ts:256
fetch the static state from the subgraph
Returns: Promise‹ISchemeStaticState›
the statatic state
▸ proposals(options: IProposalQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Proposal[]›
Defined in schemes/base.ts:467
Parameters:
| Name | Type | Default |
|---|---|---|
options |
IProposalQueryOptions | {} |
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹Proposal[]›
▸ setStaticState(opts: ISchemeStaticState): void
Defined in schemes/base.ts:279
Parameters:
| Name | Type |
|---|---|
opts |
ISchemeStaticState |
Returns: void
▸ state(apolloQueryOptions: IApolloQueryOptions): Observable‹ISchemeState›
Defined in schemes/base.ts:317
Parameters:
| Name | Type |
|---|---|
apolloQueryOptions |
IApolloQueryOptions |
Returns: Observable‹ISchemeState›
▸ x(): void
Defined in schemes/base.ts:319
Returns: void
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