Skip to content

API documentation of Agoric SDK / Exports / @agoric/governance / tools/puppetGovernance

Module: tools/puppetGovernance

Table of contents

Functions

Functions

setUpGovernedContract

setUpGovernedContract<T>(zoe, governedP, timer, termsOfGoverned?, privateArgsOfGoverned?, issuerKeywordRecord?): Promise<{ getFakeInvitation: () => Promise<{ fakeInvitationAmount: Amount<"set"> ; fakeInvitationPayment: any }> ; governorFacets: StartedInstanceKit<<SF>(zcf: ZCF<{ governed: { issuerKeywordRecord?: IssuerKeywordRecord ; terms: { governedParams: { Electorate: InvitationParam } } } ; governedContractInstallation: Installation<SF> ; timer: TimerService }>, privateArgs: { governed: Record<string, unknown> }) => Promise<{ creatorFacet: { changeParams: (paramSpec: ParamChangesSpec<any>) => Promise<void> ; getAdminFacet: () => AdminFacet<SF> ; getCreatorFacet: () => Promise<{}> ; getInstance: () => Instance<SF> ; getPublicFacet: () => Awaited<...>["publicFacet"] ; invokeAPI: (apiMethodName: string, methodArgs: unknown[]) => Promise<{ apiMethodName: ... ; methodArgs: ... }> ; setFilters: (strings: string[]) => Promise<void> } & RemotableBrand<{}, { changeParams: (paramSpec: ParamChangesSpec<...>) => Promise<...> ; getAdminFacet: () => AdminFacet<...> ; getCreatorFacet: () => Promise<...> ; getInstance: () => Instance<...> ; getPublicFacet: () => ...[...] ; invokeAPI: (apiMethodName: string, methodArgs: ...[]) => Promise<...> ; setFilters: (strings: ...[]) => Promise<...> }> ; publicFacet: { getGovernedContract: () => Instance<SF> } & RemotableBrand<{}, { getGovernedContract: () => Instance<...> }> }>> ; installs: { autoRefund: Installation<any> ; governed: Installation<T> ; governor: Installation<<SF>(zcf: ZCF<{ governed: { issuerKeywordRecord?: IssuerKeywordRecord ; terms: { governedParams: { Electorate: InvitationParam } } } ; governedContractInstallation: Installation<SF> ; timer: TimerService }>, privateArgs: { governed: Record<string, unknown> }) => Promise<{ creatorFacet: { changeParams: (paramSpec: ParamChangesSpec<...>) => Promise<...> ; getAdminFacet: () => AdminFacet<...> ; getCreatorFacet: () => Promise<...> ; getInstance: () => Instance<...> ; getPublicFacet: () => ...[...] ; invokeAPI: (apiMethodName: string, methodArgs: ...[]) => Promise<...> ; setFilters: (strings: ...[]) => Promise<...> } & RemotableBrand<{}, { changeParams: (paramSpec: ...) => ... ; getAdminFacet: () => ... ; getCreatorFacet: () => ... ; getInstance: () => ... ; getPublicFacet: () => ... ; invokeAPI: (apiMethodName: ..., methodArgs: ...) => ... ; setFilters: (strings: ...) => ... }> ; publicFacet: { getGovernedContract: () => Instance<...> } & RemotableBrand<{}, { getGovernedContract: () => ... }> }>> } }>

Type parameters

NameTypeDescription
Textends GovernableStartFngoverned contract startfn

Parameters

NameType
zoeERef<ZoeService>
governedPERef<Installation<T>>
timerTimerService
termsOfGovernedObject
termsOfGoverned.governedApis?string[]
termsOfGoverned.governedParams?Record<string, unknown>
privateArgsOfGovernedObject
issuerKeywordRecord?IssuerKeywordRecord

Returns

Promise<{ getFakeInvitation: () => Promise<{ fakeInvitationAmount: Amount<"set"> ; fakeInvitationPayment: any }> ; governorFacets: StartedInstanceKit<<SF>(zcf: ZCF<{ governed: { issuerKeywordRecord?: IssuerKeywordRecord ; terms: { governedParams: { Electorate: InvitationParam } } } ; governedContractInstallation: Installation<SF> ; timer: TimerService }>, privateArgs: { governed: Record<string, unknown> }) => Promise<{ creatorFacet: { changeParams: (paramSpec: ParamChangesSpec<any>) => Promise<void> ; getAdminFacet: () => AdminFacet<SF> ; getCreatorFacet: () => Promise<{}> ; getInstance: () => Instance<SF> ; getPublicFacet: () => Awaited<...>["publicFacet"] ; invokeAPI: (apiMethodName: string, methodArgs: unknown[]) => Promise<{ apiMethodName: ... ; methodArgs: ... }> ; setFilters: (strings: string[]) => Promise<void> } & RemotableBrand<{}, { changeParams: (paramSpec: ParamChangesSpec<...>) => Promise<...> ; getAdminFacet: () => AdminFacet<...> ; getCreatorFacet: () => Promise<...> ; getInstance: () => Instance<...> ; getPublicFacet: () => ...[...] ; invokeAPI: (apiMethodName: string, methodArgs: ...[]) => Promise<...> ; setFilters: (strings: ...[]) => Promise<...> }> ; publicFacet: { getGovernedContract: () => Instance<SF> } & RemotableBrand<{}, { getGovernedContract: () => Instance<...> }> }>> ; installs: { autoRefund: Installation<any> ; governed: Installation<T> ; governor: Installation<<SF>(zcf: ZCF<{ governed: { issuerKeywordRecord?: IssuerKeywordRecord ; terms: { governedParams: { Electorate: InvitationParam } } } ; governedContractInstallation: Installation<SF> ; timer: TimerService }>, privateArgs: { governed: Record<string, unknown> }) => Promise<{ creatorFacet: { changeParams: (paramSpec: ParamChangesSpec<...>) => Promise<...> ; getAdminFacet: () => AdminFacet<...> ; getCreatorFacet: () => Promise<...> ; getInstance: () => Instance<...> ; getPublicFacet: () => ...[...] ; invokeAPI: (apiMethodName: string, methodArgs: ...[]) => Promise<...> ; setFilters: (strings: ...[]) => Promise<...> } & RemotableBrand<{}, { changeParams: (paramSpec: ...) => ... ; getAdminFacet: () => ... ; getCreatorFacet: () => ... ; getInstance: () => ... ; getPublicFacet: () => ... ; invokeAPI: (apiMethodName: ..., methodArgs: ...) => ... ; setFilters: (strings: ...) => ... }> ; publicFacet: { getGovernedContract: () => Instance<...> } & RemotableBrand<{}, { getGovernedContract: () => ... }> }>> } }>

Defined in

tools/puppetGovernance.js:31