- Arc
- Competition
- CompetitionScheme
- CompetitionSuggestion
- CompetitionVote
- DAO
- Event
- GraphNodeObserver
- Member
- Proposal
- Queue
- Reputation
- ReputationFromTokenScheme
- Reward
- Scheme
- SchemeBase
- Stake
- Tag
- Token
- Vote
- IAllowance
- IApolloQueryOptions
- IApproval
- ICommonQueryOptions
- ICompetitionProposalState
- ICompetitionSuggestionQueryOptions
- ICompetitionSuggestionState
- ICompetitionVoteQueryOptions
- ICompetitionVoteState
- IContractAddresses
- IContractInfo
- IContributionReward
- IContributionRewardExt
- IContributionRewardExtParams
- IContributionRewardParams
- IDAOQueryOptions
- IDAOState
- IDAOStaticState
- IEventQueryOptions
- IEventState
- IEventStaticState
- IGenericScheme
- IGenericSchemeInfo
- IGenericSchemeParams
- IGenesisProtocolParams
- IMemberQueryOptions
- IMemberState
- IMemberStaticState
- IObservable
- IOperationObservable
- IProposalBaseCreateOptions
- IProposalCreateOptionsCR
- IProposalCreateOptionsCompetition
- IProposalCreateOptionsContributionRewardExt
- IProposalCreateOptionsGS
- IProposalCreateOptionsSR
- IProposalQueryOptions
- IProposalState
- IProposalStaticState
- IQueueQueryOptions
- IQueueState
- IQueueStaticState
- IReputationQueryOptions
- IReputationState
- IRewardQueryOptions
- IRewardState
- IRewardStaticState
- ISchemeQueryOptions
- ISchemeRegisterParams
- ISchemeRegistrar
- ISchemeState
- ISchemeStaticState
- IStakeQueryOptions
- IStakeState
- IStakeStaticState
- IStateful
- ITagQueryOptions
- ITagState
- ITagStaticState
- ITokenQueryOptions
- ITokenState
- ITransactionUpdate
- IUGenericScheme
- IUGenericSchemeInfo
- IVoteQueryOptions
- IVoteState
- IVoteStaticState
- Address
- Date
- EthereumEvent
- Hash
- IPFSProvider
- IProposalCreateOptions
- IProposalType
- Operation
- Web3Provider
- Web3Receipt
- web3receipt
- ABI_DIR
- DAOTOKEN_CONTRACT_VERSION
- IPFSClient
- LATEST_ARC_VERSION
- NULL_ADDRESS
- REDEEMER_CONTRACT_VERSION
- REPUTATION_CONTRACT_VERSION
- Web3
- checkWebsocket
- concat
- createApolloClient
- createGraphQlQuery
- createGraphQlWhereQuery
- createProposal
- createTransaction
- createTransactionMap
- dateToSecondsSinceEpoch
- eventId
- fromWei
- getBlockTime
- getCompetitionContract
- hasCompetitionContract
- hexStringToUint8Array
- isAddress
- isCompetitionScheme
- mapGenesisProtocolParams
- realMathToNumber
- secondSinceEpochToDate
- sendTransaction
- toIOperationObservable
- toWei
- zenToRxjsObservable
Ƭ Address: string
Defined in types.ts:4
Ƭ Date: number
Defined in types.ts:5
Ƭ EthereumEvent: any
Defined in utils.ts:59
Ƭ Hash: string
Defined in types.ts:6
Ƭ IPFSProvider: string | object
Defined in types.ts:22
Ƭ IProposalCreateOptions: IProposalBaseCreateOptions & IProposalCreateOptionsGS | IProposalBaseCreateOptions & IProposalCreateOptionsSR | IProposalBaseCreateOptions & IProposalCreateOptionsCR | IProposalCreateOptionsContributionRewardExt | IProposalCreateOptionsCompetition
Defined in proposal.ts:882
Ƭ IProposalType: ContributionReward | GenericScheme | SchemeRegistrarAdd | SchemeRegistrarEdit | SchemeRegistrarRemove
Defined in proposal.ts:31
Ƭ Operation: IOperationObservable‹ITransactionUpdate‹T››
Defined in operation.ts:38
Ƭ Web3Provider: string | object
Defined in types.ts:8
Ƭ Web3Receipt: any
Defined in types.ts:7
Ƭ web3receipt: object
Defined in operation.ts:40
• ABI_DIR: "./abis" = "./abis"
Defined in settings.ts:8
• DAOTOKEN_CONTRACT_VERSION: "0.0.1-rc.19" = "0.0.1-rc.19"
Defined in settings.ts:5
• IPFSClient: any = require('ipfs-http-client')
Defined in arc.ts:18
• LATEST_ARC_VERSION: "0.0.1-rc.19" = "0.0.1-rc.19"
Defined in settings.ts:6
• NULL_ADDRESS: "0x0000000000000000000000000000000000000000" = "0x0000000000000000000000000000000000000000"
Defined in utils.ts:97
• REDEEMER_CONTRACT_VERSION: "0.0.1-rc.36" = "0.0.1-rc.36"
Defined in settings.ts:2
• REPUTATION_CONTRACT_VERSION: "0.0.1-rc.19" = "0.0.1-rc.19"
Defined in settings.ts:4
• Web3: any = require('web3')
Defined in utils.ts:5
Defined in schemes/competition.ts:20
Defined in arc.ts:19
▸ checkWebsocket(options
: object): void
Defined in utils.ts:16
Parameters:
▪ options: object
Name | Type |
---|---|
url |
string |
Returns: void
▸ concat(a
: Uint8Array, b
: Uint8Array): Uint8Array
Defined in utils.ts:47
Parameters:
Name | Type |
---|---|
a |
Uint8Array |
b |
Uint8Array |
Returns: Uint8Array
▸ createApolloClient(options
: object): ApolloClient‹NormalizedCacheObject›
Defined in graphnode.ts:26
Parameters:
▪ options: object
Name | Type |
---|---|
graphqlHttpProvider |
string |
graphqlPrefetchHook? |
any |
graphqlWsProvider |
string |
Returns: ApolloClient‹NormalizedCacheObject›
▸ createGraphQlQuery(options
: ICommonQueryOptions, where
: string): string
Defined in utils.ts:109
creates a string to be plugsging into a graphql query
example
{ proposals ${createGraphQlQuery({ skip: 2}, 'id: "2"')} { id } }
Parameters:
Name | Type | Default |
---|---|---|
options |
ICommonQueryOptions | - |
where |
string | "" |
Returns: string
▸ createGraphQlWhereQuery(where?
: undefined | object): string
Defined in utils.ts:139
Parameters:
Name | Type |
---|---|
where? |
undefined | object |
Returns: string
▸ createProposal(options
: any, context
: Arc): (Anonymous function)
Defined in schemes/contributionReward.ts:37
Parameters:
Name | Type | Description |
---|---|---|
options |
any | - |
context |
Arc |
Returns: (Anonymous function)
▸ createTransaction(options
: any, context
: Arc): (Anonymous function)
Defined in schemes/genericScheme.ts:28
Parameters:
Name | Type |
---|---|
options |
any |
context |
Arc |
Returns: (Anonymous function)
▸ createTransactionMap(options
: any, context
: Arc): map
Defined in schemes/contributionReward.ts:61
map the transaction receipt of the createTransaction call to a nice result map the transaction receipt of the createTransaction call to a nice result map the transaction receipt of the createTransaction call to a nice result
Parameters:
Name | Type | Description |
---|---|---|
options |
any | the options passed to the createProposal call |
context |
Arc | an Arc instance |
Returns: map
▸ dateToSecondsSinceEpoch(date
: Date): number
Defined in utils.ts:164
Parameters:
Name | Type |
---|---|
date |
Date |
Returns: number
▸ eventId(event
: EthereumEvent): string
Defined in utils.ts:61
Parameters:
Name | Type |
---|---|
event |
EthereumEvent |
Returns: string
▸ fromWei(amount
: BN): string
Defined in utils.ts:8
Parameters:
Name | Type |
---|---|
amount |
BN |
Returns: string
▸ getBlockTime(web3
: any): Promise‹Date›
Defined in utils.ts:191
get the latest block time, or the current time, whichver is later
export
Parameters:
Name | Type |
---|---|
web3 |
any |
Returns: Promise‹Date›
▸ getCompetitionContract(schemeState
: ISchemeState, arc
: Arc): any
Defined in schemes/competition.ts:780
If this scheme is a ContributionREwardExt scheme and if its rewarder is Competition contract, return that contract
Parameters:
Name | Type |
---|---|
schemeState |
ISchemeState |
arc |
Arc |
Returns: any
A Web3 contract instance
▸ hasCompetitionContract(schemeState
: ISchemeState, arc
: Arc): boolean
Defined in schemes/competition.ts:808
Parameters:
Name | Type |
---|---|
schemeState |
ISchemeState |
arc |
Arc |
Returns: boolean
true if this is a ContributionRewardExt scheme and the rewarder of this scheme is a competition contract
▸ hexStringToUint8Array(hexString
: string): Uint8Array‹›
Defined in utils.ts:38
Parameters:
Name | Type |
---|---|
hexString |
string |
Returns: Uint8Array‹›
▸ isAddress(address
: Address): void
Defined in utils.ts:66
Parameters:
Name | Type |
---|---|
address |
Address |
Returns: void
▸ isCompetitionScheme(arc
: Arc, item
: any): boolean
Defined in schemes/competition.ts:796
Parameters:
Name | Type |
---|---|
arc |
Arc |
item |
any |
Returns: boolean
▸ mapGenesisProtocolParams(params
: IGenesisProtocolParams): object
Defined in genesisProtocol.ts:19
Parameters:
Name | Type |
---|---|
params |
IGenesisProtocolParams |
Returns: object
-
activationTime: number = Number(params.activationTime)
-
boostedVotePeriodLimit: number = Number(params.boostedVotePeriodLimit)
-
daoBountyConst: number = Number(params.daoBountyConst)
-
limitExponentValue: number = Number(params.limitExponentValue)
-
minimumDaoBounty: BN‹› = new BN(params.minimumDaoBounty)
-
preBoostedVotePeriodLimit: number = Number(params.preBoostedVotePeriodLimit)
-
proposingRepReward: BN‹› = new BN(params.proposingRepReward)
-
queuedVotePeriodLimit: number = Number(params.queuedVotePeriodLimit)
-
queuedVoteRequiredPercentage: number = Number(params.queuedVoteRequiredPercentage)
-
quietEndingPeriod: number = Number(params.quietEndingPeriod)
-
thresholdConst: number = realMathToNumber(new BN(params.thresholdConst))
-
votersReputationLossRatio: number = Number(params.votersReputationLossRatio)
▸ realMathToNumber(t
: BN): number
Defined in utils.ts:91
convert the number representation of RealMath.sol representations to real real numbers
Parameters:
Name | Type | Description |
---|---|---|
t |
BN | a BN instance of a real number in the RealMath representation |
Returns: number
a BN
▸ secondSinceEpochToDate(seconds
: number): Date
Defined in utils.ts:172
Parameters:
Name | Type |
---|---|
seconds |
number |
Returns: Date
▸ sendTransaction<T>(context
: Arc, transaction
: any, mapReceipt
: function, errorHandler?
: undefined | function): Operation‹T›
Defined in operation.ts:74
export
template
T
Type parameters:
▪ T
Parameters:
▪ context: Arc
An instance of Arc
▪ transaction: any
A Web3 transaction object to send
▪ mapReceipt: function
A function that takes the receipt of the transaction and returns an object
▸ (receipt
: web3receipt): T | Promise‹T›
Parameters:
Name | Type |
---|---|
receipt |
web3receipt |
▪Optional
errorHandler: undefined | function
Returns: Operation‹T›
▸ toIOperationObservable<T>(observable
: Observable‹T›): IOperationObservable‹T›
Defined in operation.ts:211
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
observable |
Observable‹T› |
Returns: IOperationObservable‹T›
▸ toWei(amount
: string | number): BN
Defined in utils.ts:12
Parameters:
Name | Type |
---|---|
amount |
string | number |
Returns: BN
▸ zenToRxjsObservable(zenObservable
: ZenObservable‹any›): any
Defined in utils.ts:80
convert a ZenObservable to an rxjs.Observable
Parameters:
Name | Type |
---|---|
zenObservable |
ZenObservable‹any› |
Returns: any
an Observable instance
Defined in schemes/contributionReward.ts:33
Defined in schemes/contributionRewardExt.ts:32
Defined in schemes/genericScheme.ts:24
Defined in schemes/schemeRegistrar.ts:22
Defined in schemes/uGenericScheme.ts:23
Defined in proposal.ts:25
• ContributionReward: = "ContributionRewardExt"
Defined in schemes/contributionReward.ts:34
Defined in schemes/contributionRewardExt.ts:33
• GenericScheme: = "UGenericScheme"
Defined in schemes/genericScheme.ts:25
Defined in schemes/uGenericScheme.ts:24
• SchemeRegistrarAdd: = "SchemeRegistrarAdd"
Defined in schemes/schemeRegistrar.ts:23
• SchemeRegistrarEdit: = "SchemeRegistrarEdit"
Defined in schemes/schemeRegistrar.ts:24
• SchemeRegistrarRemove: = "SchemeRegistrarRemove"
Defined in schemes/schemeRegistrar.ts:25