Skip to main content

Class: ColonyTxCreator\<C, M, E, MD>

An umbrella API for all kinds of transactions within colonies

The ColonyTxCreator allows for a simple API to cover all the different cases of transactions within a colony. Once a ColonyTxCreator is created using a method on the base contracts (e.g. Colony or extensions like VotingReputation) there are four options available:

Create a standard transaction ("force" in dApp)

Create a motion to trigger an action once it passes

Learn more about these functions in their individual documentation

Extends

Type Parameters

C extends MetaTxBaseContract

M extends keyof C["functions"]

E extends EventData

MD extends MetadataType

Constructors

new ColonyTxCreator()

new ColonyTxCreator\<C, M, E, MD>(config): ColonyTxCreator\<C, M, E, MD>

Parameters

config

MetaMotionsConfig\<C, M, E, MD>

Returns

ColonyTxCreator\<C, M, E, MD>

Overrides

MetaTxCreator.constructor

Methods

metaMotion()

metaMotion(motionDomain): ColonyMetaTransaction\<TransactionResponse, MotionCreatedEventObject, ParsedLogTransactionReceipt, MD>

Creates a motion for an action, using a gasless transaction

You can specify a team (domain) this motion should be created in. It will be created in the Root team by default.

After creation, you can then send the transaction or wait for it to be mined. See also TxCreator.tx and https://docs.colony.io/colonysdk/guides/transactions for more information

Parameters

motionDomain

BigNumberish = Id.RootDomain

Returns

ColonyMetaTransaction\<TransactionResponse, MotionCreatedEventObject, ParsedLogTransactionReceipt, MD>

A motion transaction that can be send or mined or encoded.

Remarks

This will only work if the VotingReputation extension is installed for the Colony that's being acted on


metaTx()

metaTx(): ColonyMetaTransaction\<TransactionResponse, E, ParsedLogTransactionReceipt, MD>

Create a gasless MetaTransaction ("force" in dApp)

After creation, you can then send the transaction or wait for it to be mined. See also TxCreator.tx and https://docs.colony.io/colonysdk/guides/transactions for more information

Returns

ColonyMetaTransaction\<TransactionResponse, E, ParsedLogTransactionReceipt, MD>

A transaction that can be send or mined.

Remarks

The user sending this transaction has to have the appropriate permissions to do so. Learn more about permissions in Colony here.

Inherited from

MetaTxCreator.metaTx


motion()

motion(motionDomain): ColonyTransaction\<ContractTransaction, MotionCreatedEventObject, ContractReceipt, MD>

Creates a motion for an action

You can specify a team (domain) this motion should be created in. It will be created in the Root team by default.

After creation, you can then send the transaction or wait for it to be mined. See also ColonyTransaction and https://docs.colony.io/colonysdk/guides/transactions for more information

Parameters

motionDomain

BigNumberish = Id.RootDomain

Returns

ColonyTransaction\<ContractTransaction, MotionCreatedEventObject, ContractReceipt, MD>

A motion transaction that can be send or mined or encoded.

Remarks

This will only work if the VotingReputation extension is installed for the Colony that's being acted on


tx()

tx(): ColonyTransaction\<ContractTransaction, E, ContractReceipt, MD>

Create a standard transaction ("force" in dApp)

See also ColonyTransaction or https://docs.colony.io/colonysdk/guides/transactions for more information

Returns

ColonyTransaction\<ContractTransaction, E, ContractReceipt, MD>

A transaction that can be send, mined or encoded.

Remarks

The user sending this transaction has to have the appropriate permissions to do so. Learn more about permissions in Colony here.

Inherited from

MetaTxCreator.tx