api_entities_Subsidy.Subsidy

@polymeshassociation/polymesh-sdk / Modules / api/entities/Subsidy / Subsidy

Class: Subsidy

api/entities/Subsidy.Subsidy

Represents a Subsidy relationship on chain

Hierarchy

Table of contents

Properties

Methods

Properties

beneficiary

beneficiary: Account

Account whose transactions are being paid for

Defined in

api/entities/Subsidy/index.ts:51


subsidizer

subsidizer: Account

Account that is paying for the transactions

Defined in

api/entities/Subsidy/index.ts:55


uuid

uuid: string

Inherited from

Entity.uuid

Defined in

api/entities/Entity.ts:46

Methods

decreaseAllowance

decreaseAllowance(args, opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Decrease allowance for this Subsidy relationship

note Only the subsidizer is allowed to decrease the allowance

throws if the amount to decrease by is more than the existing allowance

note this method is of type ProcedureMethod, which means you can call decreaseAllowance.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Name
Type

args

opts?

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/entities/Subsidy/index.ts:176


exists

exists(): Promise<boolean>

Determine whether this Subsidy relationship exists on chain

Returns

Promise<boolean>

Overrides

Entity.exists

Defined in

api/entities/Subsidy/index.ts:183


getAllowance

getAllowance(): Promise<BigNumber>

Get amount of POLYX subsidized for this Subsidy relationship

throws if the Subsidy does not exist

Returns

Promise<BigNumber>

Defined in

api/entities/Subsidy/index.ts:202


increaseAllowance

increaseAllowance(args, opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Increase allowance for this Subsidy relationship

note Only the subsidizer is allowed to increase the allowance

note this method is of type ProcedureMethod, which means you can call increaseAllowance.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Name
Type

args

opts?

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/entities/Subsidy/index.ts:162


isEqual

isEqual(entity): boolean

Determine whether this Entity is the same as another one

Parameters

Name
Type

entity

Returns

boolean

Inherited from

Entity.isEqual

Defined in

api/entities/Entity.ts:61


quit

quit(opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Terminate this Subsidy relationship. The beneficiary Account will be forced to pay for their own transactions

note both the beneficiary and the subsidizer are allowed to unilaterally quit the Subsidy

note this method is of type NoArgsProcedureMethod, which means you can call quit.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Name
Type

opts?

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/entities/Subsidy/index.ts:136


setAllowance

setAllowance(args, opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Set allowance for this Subsidy relationship

note Only the subsidizer is allowed to set the allowance

throws if the allowance to set is equal to the current allowance

note this method is of type ProcedureMethod, which means you can call setAllowance.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Name
Type

args

opts?

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/entities/Subsidy/index.ts:150


toHuman

toHuman(): UniqueIdentifiers

Return the Subsidy's static data

Returns

UniqueIdentifiers

Overrides

Entity.toHuman

Defined in

api/entities/Subsidy/index.ts:224


generateUuid

Static generateUuid<Identifiers>(identifiers): string

Generate the Entity's UUID from its identifying properties

Type parameters

Name

Identifiers

Parameters

Name
Type

identifiers

Identifiers

Returns

string

Inherited from

Entity.generateUuid

Defined in

api/entities/Entity.ts:14


unserialize

Static unserialize<Identifiers>(serialized): Identifiers

Unserialize a UUID into its Unique Identifiers

Type parameters

Name

Identifiers

Parameters

Name
Type
Description

serialized

string

UUID to unserialize

Returns

Identifiers

Inherited from

Entity.unserialize

Defined in

api/entities/Entity.ts:23

Last updated