Class: SchemeBase
January 17, 2020 · View on GitHub
@daostack/client › Globals › SchemeBase
Class: SchemeBase
A Scheme represents a scheme instance that is registered at a DAO
Hierarchy
-
SchemeBase
↳ Scheme
Implements
Index
Constructors
Properties
Methods
- createProposal
- createProposalErrorHandler
- createProposalTransaction
- createProposalTransactionMap
- fetchStaticState
- proposals
- setStaticState
- state
- x
Object literals
Constructors
constructor
+ new SchemeBase(idOrOpts: Address | ISchemeStaticState, context: Arc): SchemeBase
Defined in schemes/base.ts:239
Parameters:
| Name | Type |
|---|---|
idOrOpts | Address | ISchemeStaticState |
context | Arc |
Returns: SchemeBase
Properties
ReputationFromToken
• ReputationFromToken: ReputationFromTokenScheme | null = null
Defined in schemes/base.ts:239
context
• context: Arc
Defined in schemes/base.ts:241
id
• id: Address
Defined in schemes/base.ts:237
staticState
• staticState: ISchemeStaticState | null = null
Defined in schemes/base.ts:238
Methods
createProposal
▸ createProposal(options: IProposalCreateOptions): Operation‹Proposal›
Defined in schemes/base.ts:300
Parameters:
| Name | Type |
|---|---|
options | IProposalCreateOptions |
createProposalErrorHandler
▸ 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
▸ 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
▸ createProposalTransactionMap(): function
Defined in schemes/base.ts:292
Returns: function
▸ (receipt: any): any
Parameters:
| Name | Type |
|---|---|
receipt | any |
fetchStaticState
▸ fetchStaticState(): Promise‹ISchemeStaticState›
Defined in schemes/base.ts:256
fetch the static state from the subgraph
Returns: Promise‹ISchemeStaticState›
the statatic state
proposals
▸ 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
▸ setStaticState(opts: ISchemeStaticState): void
Defined in schemes/base.ts:279
Parameters:
| Name | Type |
|---|---|
opts | ISchemeStaticState |
Returns: void
Abstract state
▸ state(apolloQueryOptions: IApolloQueryOptions): Observable‹ISchemeState›
Defined in schemes/base.ts:317
Parameters:
| Name | Type |
|---|---|
apolloQueryOptions | IApolloQueryOptions |
Returns: Observable‹ISchemeState›
x
▸ x(): void
Defined in schemes/base.ts:319
Returns: void
Object literals
Static fragments
▪ fragments: object
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