Skip to content

Bounties


Calls


accept_curator

Attributes

Name Type
bounty_id BountyIndex

Python

call = substrate.compose_call(
    'Bounties', 'accept_curator', {'bounty_id': 'u32'}
)

approve_bounty

Attributes

Name Type
bounty_id BountyIndex

Python

call = substrate.compose_call(
    'Bounties', 'approve_bounty', {'bounty_id': 'u32'}
)

award_bounty

Attributes

Name Type
bounty_id BountyIndex
beneficiary AccountIdLookupOf<T>

Python

call = substrate.compose_call(
    'Bounties', 'award_bounty', {
    'beneficiary': {
        'Address20': '[u8; 20]',
        'Address32': '[u8; 32]',
        'Id': 'AccountId',
        'Index': 'u32',
        'Raw': 'Bytes',
    },
    'bounty_id': 'u32',
}
)

claim_bounty

Attributes

Name Type
bounty_id BountyIndex

Python

call = substrate.compose_call(
    'Bounties', 'claim_bounty', {'bounty_id': 'u32'}
)

close_bounty

Attributes

Name Type
bounty_id BountyIndex

Python

call = substrate.compose_call(
    'Bounties', 'close_bounty', {'bounty_id': 'u32'}
)

extend_bounty_expiry

Attributes

Name Type
bounty_id BountyIndex
remark Vec<u8>

Python

call = substrate.compose_call(
    'Bounties', 'extend_bounty_expiry', {
    'bounty_id': 'u32',
    'remark': 'Bytes',
}
)

propose_bounty

Attributes

Name Type
value BalanceOf<T, I>
description Vec<u8>

Python

call = substrate.compose_call(
    'Bounties', 'propose_bounty', {
    'description': 'Bytes',
    'value': 'u128',
}
)

propose_curator

Attributes

Name Type
bounty_id BountyIndex
curator AccountIdLookupOf<T>
fee BalanceOf<T, I>

Python

call = substrate.compose_call(
    'Bounties', 'propose_curator', {
    'bounty_id': 'u32',
    'curator': {
        'Address20': '[u8; 20]',
        'Address32': '[u8; 32]',
        'Id': 'AccountId',
        'Index': 'u32',
        'Raw': 'Bytes',
    },
    'fee': 'u128',
}
)

unassign_curator

Attributes

Name Type
bounty_id BountyIndex

Python

call = substrate.compose_call(
    'Bounties', 'unassign_curator', {'bounty_id': 'u32'}
)

Events


BountyApproved

Attributes

Name Type Composition
index BountyIndex u32

BountyAwarded

Attributes

Name Type Composition
index BountyIndex u32
beneficiary T::AccountId AccountId

BountyBecameActive

Attributes

Name Type Composition
index BountyIndex u32

BountyCanceled

Attributes

Name Type Composition
index BountyIndex u32

BountyClaimed

Attributes

Name Type Composition
index BountyIndex u32
payout BalanceOf<T, I> u128
beneficiary T::AccountId AccountId

BountyExtended

Attributes

Name Type Composition
index BountyIndex u32

BountyProposed

Attributes

Name Type Composition
index BountyIndex u32

BountyRejected

Attributes

Name Type Composition
index BountyIndex u32
bond BalanceOf<T, I> u128

CuratorAccepted

Attributes

Name Type Composition
bounty_id BountyIndex u32
curator T::AccountId AccountId

CuratorProposed

Attributes

Name Type Composition
bounty_id BountyIndex u32
curator T::AccountId AccountId

CuratorUnassigned

Attributes

Name Type Composition
bounty_id BountyIndex u32

Storage functions


Bounties

Python

result = substrate.query(
    'Bounties', 'Bounties', ['u32']
)

Return value

{
    'bond': 'u128',
    'curator_deposit': 'u128',
    'fee': 'u128',
    'proposer': 'AccountId',
    'status': {
        'Active': {'curator': 'AccountId', 'update_due': 'u32'},
        'Approved': None,
        'CuratorProposed': {'curator': 'AccountId'},
        'Funded': None,
        'PendingPayout': {
            'beneficiary': 'AccountId',
            'curator': 'AccountId',
            'unlock_at': 'u32',
        },
        'Proposed': None,
    },
    'value': 'u128',
}

BountyApprovals

Python

result = substrate.query(
    'Bounties', 'BountyApprovals', []
)

Return value

['u32']

BountyCount

Python

result = substrate.query(
    'Bounties', 'BountyCount', []
)

Return value

'u32'

BountyDescriptions

Python

result = substrate.query(
    'Bounties', 'BountyDescriptions', ['u32']
)

Return value

'Bytes'

Constants


BountyDepositBase

Value

4000000000000

Python

constant = substrate.get_constant('Bounties', 'BountyDepositBase')

BountyDepositPayoutDelay

Value

43200

Python

constant = substrate.get_constant('Bounties', 'BountyDepositPayoutDelay')

BountyUpdatePeriod

Value

252000

Python

constant = substrate.get_constant('Bounties', 'BountyUpdatePeriod')

BountyValueMinimum

Value

5000000000000

Python

constant = substrate.get_constant('Bounties', 'BountyValueMinimum')

CuratorDepositMax

Value

100000000000000

Python

constant = substrate.get_constant('Bounties', 'CuratorDepositMax')

CuratorDepositMin

Value

1000000000000

Python

constant = substrate.get_constant('Bounties', 'CuratorDepositMin')

CuratorDepositMultiplier

Value

500000

Python

constant = substrate.get_constant('Bounties', 'CuratorDepositMultiplier')

DataDepositPerByte

Value

600000000

Python

constant = substrate.get_constant('Bounties', 'DataDepositPerByte')

MaximumReasonLength

Value

8192

Python

constant = substrate.get_constant('Bounties', 'MaximumReasonLength')

Errors


HasActiveChildBounty


InsufficientProposersBalance


InvalidFee


InvalidIndex


InvalidValue


PendingPayout


Premature


ReasonTooBig


RequireCurator


TooManyQueued


UnexpectedStatus