Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Network_v2

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

Properties

Params: { cancelableTime: number; councilAmount: number; disputableTime: number; draftTime: number; mergeCreatorFeeShare: number; oracleExchangeRate: number; percentageNeededForDispute: number; proposerFeeShare: number } = ...

Type declaration

  • cancelableTime: number
  • councilAmount: number
  • disputableTime: number
  • draftTime: number
  • mergeCreatorFeeShare: number
  • oracleExchangeRate: number
  • percentageNeededForDispute: number
  • proposerFeeShare: number
_DIVISOR: number
_governed: Governed
_networkToken: ERC20
_nftToken: BountyToken
_registry: NetworkRegistry
abi: AbiItem[]
contractAddress?: string

Accessors

  • get account(): Account
  • Returns the Account associated with this connection

    Returns Account

  • get divisor(): number
  • get networkToken(): ERC20
  • get web3(): default
  • Returns the Web3 class assigned to this connection

    Returns default

Methods

  • bountiesIndex(): Promise<number>
  • cancelBounty(id: number): Promise<TransactionReceipt<any>>
  • cancelFundRequest(id: number): Promise<TransactionReceipt<any>>
  • cancelPullRequest(ofBounty: number, prId: number): Promise<TransactionReceipt<any>>
  • cancelableTime(): Promise<number>
  • canceledBounties(): Promise<number>
  • changeCancelableTime(value: number): Promise<TransactionReceipt<any>>
  • changeCouncilAmount(newAmount: string | number): Promise<TransactionReceipt<any>>
  • changeDisputableTime(disputableTime: number): Promise<TransactionReceipt<any>>
  • changeDraftTime(_draftTime: number): Promise<TransactionReceipt<any>>
  • changeMergeCreatorFeeShare(mergeCreatorFeeShare: number): Promise<TransactionReceipt<any>>
  • Parameters

    • mergeCreatorFeeShare: number

      percentage is per 10,000; 3 = 0,0003

    Returns Promise<TransactionReceipt<any>>

  • changeOracleExchangeRate(oracleExchangeRate: number): Promise<TransactionReceipt<any>>
  • Parameters

    • oracleExchangeRate: number

      percentage is per 10,000; 3 = 0,0003

    Returns Promise<TransactionReceipt<any>>

  • changePercentageNeededForDispute(percentageNeededForDispute: number): Promise<TransactionReceipt<any>>
  • Parameters

    • percentageNeededForDispute: number

      percentage is per 10,000; 3 = 0,0003

    Returns Promise<TransactionReceipt<any>>

  • changeProposerFeeShare(proposerFeeShare: number): Promise<TransactionReceipt<any>>
  • Parameters

    • proposerFeeShare: number

      percentage is per 10,000; 3 = 0,0003

    Returns Promise<TransactionReceipt<any>>

  • cidBountyId(cid: string): Promise<number>
  • closeBounty(id: number, proposalId: number, ipfsUri?: string): Promise<TransactionReceipt<any>>
  • close bounty with the selected proposal id

    Parameters

    • id: number
    • proposalId: number
    • ipfsUri: string = ""

    Returns Promise<TransactionReceipt<any>>

  • closedBounties(): Promise<number>
  • connect(): Promise<boolean>
  • councilAmount(): Promise<string>
  • createBountyProposal(id: number, prId: number, recipients: string[], percentages: number[]): Promise<TransactionReceipt<any>>
  • create a proposal with a pull request for a bounty

    Parameters

    • id: number
    • prId: number
    • recipients: string[]
    • percentages: number[]

    Returns Promise<TransactionReceipt<any>>

  • createPullRequest(forBountyId: number, originRepo: string, originBranch: string, originCID: string, userRepo: string, userBranch: string, cid: number): Promise<TransactionReceipt<any>>
  • create pull request for bounty id

    Parameters

    • forBountyId: number
    • originRepo: string
    • originBranch: string
    • originCID: string
    • userRepo: string
    • userBranch: string
    • cid: number

    Returns Promise<TransactionReceipt<any>>

  • delegateOracles(tokenAmount: string | number, recipient: string): Promise<TransactionReceipt<any>>
  • Gives oracles from msg.sender to recipient

    Parameters

    • tokenAmount: string | number
    • recipient: string

    Returns Promise<TransactionReceipt<any>>

  • deploy(deployOptions: DeployOptions, account?: Account): Promise<TransactionReceipt<any>>
  • Deploy the loaded abi contract

    Parameters

    • deployOptions: DeployOptions
    • Optional account: Account

    Returns Promise<TransactionReceipt<any>>

  • deployJsonAbi(_oracleTokenAddress: string, _registryAddress?: string): Promise<TransactionReceipt<any>>
  • disputableTime(): Promise<number>
  • disputeBountyProposal(bountyId: number, proposalId: number): Promise<TransactionReceipt<any>>
  • dispute a proposal for a bounty

    Parameters

    • bountyId: number
    • proposalId: number

    Returns Promise<TransactionReceipt<any>>

  • disputes(address: string, bountyId: string | number, proposalId: string | number): Promise<string>
  • draftTime(): Promise<number>
  • fundBounty(id: number, fundingAmount: string | number, decimals?: number): Promise<TransactionReceipt<any>>
  • enable users to fund a bounty

    Parameters

    • id: number
    • fundingAmount: string | number
    • decimals: number = 18

      decimals of the transactional for this bounty

    Returns Promise<TransactionReceipt<any>>

  • getBountiesOfAddress(_address: string): Promise<number[]>
  • getBounty(id: number): Promise<Bounty>
  • getBountyAmountUpdatedEvents(filter: PastEventOptions): Promise<XEvents<BountyAmountUpdatedEvent>[]>
  • getBountyCanceledEvents(filter: PastEventOptions): Promise<XEvents<BountyCanceledEvent>[]>
  • getBountyClosedEvents(filter: PastEventOptions): Promise<XEvents<BountyClosedEvent>[]>
  • getBountyCreatedEvents(filter: PastEventOptions): Promise<XEvents<BountyCreatedEvent>[]>
  • getBountyFundedEvents(filter: PastEventOptions): Promise<XEvents<GovernorTransferredEvent>[]>
  • getBountyProposalCreatedEvents(filter: PastEventOptions): XPromiseEvent<BountyProposalCreatedEvent>
  • getBountyProposalDisputedEvents(filter: PastEventOptions): XPromiseEvent<BountyProposalDisputedEvent>
  • getBountyProposalRefusedEvents(filter: PastEventOptions): XPromiseEvent<BountyProposalRefusedEvent>
  • getBountyPullRequestCanceledEvents(filter: PastEventOptions): XPromiseEvent<BountyPullRequestCanceledEvent>
  • getBountyPullRequestCreatedEvents(filter: PastEventOptions): XPromiseEvent<BountyPullRequestCreatedEvent>
  • getBountyPullRequestReadyForReviewEvents(filter: PastEventOptions): XPromiseEvent<BountyPullRequestReadyForReviewEvent>
  • getDelegationsOf(address: string): Promise<Delegation[]>
  • getDivisor(): Promise<number>
  • getGovernorTransferredEvents(filter: PastEventOptions): Promise<XEvents<GovernorTransferredEvent>[]>
  • getOraclesChangedEvents(filter: PastEventOptions): Promise<XEvents<OraclesChangedEvent>[]>
  • getOraclesOf(_address: string): Promise<string>
  • getOraclesTransferEvents(filter: PastEventOptions): Promise<XEvents<OraclesTransferEvent>[]>
  • hardCancel(id: number): Promise<TransactionReceipt<any>>
  • cancels a bounty or a funding request if user is governor or owner and after cancelableTime has passed

    Parameters

    • id: number

      bounty or funding request id

    Returns Promise<TransactionReceipt<any>>

  • isBountyInDraft(bountyId: number): Promise<boolean>
  • A bounty is in Draft when now is earlier than the creation date + draft time

    Parameters

    • bountyId: number

    Returns Promise<boolean>

    boolean

  • isProposalDisputed(bountyId: number, proposalId: number): Promise<boolean>
  • A proposal is disputed if its weight is greater than the percentage needed for dispute

    Parameters

    • bountyId: number
    • proposalId: number

    Returns Promise<boolean>

    boolean

  • loadAbi(): void
  • loadContract(): Promise<void>
  • lock(tokenAmount: string | number): Promise<TransactionReceipt<any>>
  • Lock given amount into the oracle mapping

    Parameters

    • tokenAmount: string | number

    Returns Promise<TransactionReceipt<any>>

  • markPullRequestReadyForReview(bountyId: number, pullRequestId: number): Promise<TransactionReceipt<any>>
  • mark a PR ready for review

    Parameters

    • bountyId: number
    • pullRequestId: number

    Returns Promise<TransactionReceipt<any>>

  • mergeCreatorFeeShare(): Promise<number>
  • networkTokenAddress(): Promise<string>
  • nftTokenAddress(): Promise<string>
  • openBounties(): Promise<number>
  • openBounty(tokenAmount?: string | number, transactional?: string, rewardToken?: string, rewardAmount?: string | number, fundingAmount?: string | number, cid: string, title: string, repoPath: string, branch: string, githubUser: string): Promise<TransactionReceipt<any>>
  • Creates a bounty on the network You can open a funding-request-bounty by providing rewardToken, rewardAmount, and fundingAmount

    Parameters

    • tokenAmount: string | number = ...
    • transactional: string = nativeZeroAddress
    • rewardToken: string = nativeZeroAddress
    • rewardAmount: string | number = ...
    • fundingAmount: string | number = ...
    • cid: string

      custom id of this bounty

    • title: string

      title for this bounty

    • repoPath: string

      repository path for this bounty

    • branch: string

      branch inside the provided repo path

    • githubUser: string

    Returns Promise<TransactionReceipt<any>>

  • oracleExchangeRate(): Promise<number>
  • oraclesDistributed(): Promise<string>
  • percentageNeededForDispute(): Promise<number>
  • proposerFeeShare(): Promise<number>
  • refuseBountyProposal(bountyId: number, proposalId: number): Promise<TransactionReceipt<any>>
  • registryAddress(): Promise<string>
  • retractFunds(id: number, fundingId: number): Promise<TransactionReceipt<any>>
  • enable users to retract their funding

    Parameters

    • id: number
    • fundingId: number

    Returns Promise<TransactionReceipt<any>>

  • sendTx(method: ContractSendMethod, value?: any): Promise<TransactionReceipt<any>>
  • Interact with, or change a value of, a property on the contract

    Parameters

    • method: ContractSendMethod
    • Optional value: any

    Returns Promise<TransactionReceipt<any>>

  • sendUnsignedTx(method: ContractSendMethod, value?: any, __namedParameters?: Partial<Web3ConnectionOptions>): Promise<TransactionReceipt<any>>
  • start(): Promise<void>
  • takeBackOracles(entryId: number): Promise<TransactionReceipt<any>>
  • Takes back oracles from the entryId related to msg.sender

    Parameters

    • entryId: number

    Returns Promise<TransactionReceipt<any>>

  • totalNetworkToken(): Promise<string>
  • treasuryInfo(): Promise<{ cancelFee: number; closeFee: number; treasury: string }>
  • unlock(tokenAmount: string | number): Promise<TransactionReceipt<any>>
  • Unlock from the oracle mapping

    Parameters

    • tokenAmount: string | number

    Returns Promise<TransactionReceipt<any>>

  • updateBountyAmount(id: number, newTokenAmount: string | number, decimals?: number): Promise<TransactionReceipt<any>>
  • update the value of a bounty with a new amount

    Parameters

    • id: number
    • newTokenAmount: string | number
    • decimals: number = 18

      decimals of the transactional for this bounty

    Returns Promise<TransactionReceipt<any>>

  • updateTresuryAddress(_address: string): Promise<TransactionReceipt<any>>
  • withdrawFundingReward(id: number, fundingId: number): Promise<TransactionReceipt<any>>

Generated using TypeDoc