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)
- tx: force a Colony transaction, knowing you have the permissions to do so
- metaTx: same as
tx()
, but send as a gasless metatransaction
Create a motion to trigger an action once it passes
- motion: create a motion (needs the motion's domain as a parameter)
- metaMotion: same as
motion()
, but sends a gasless metatransaction
Learn more about these functions in their individual documentation
Type parameters
Name | Type |
---|---|
C | extends MetaTxBaseContract |
M | extends keyof C ["functions" ] |
E | extends EventData |
MD | extends MetadataType |
Hierarchy
MetaTxCreator
<C
,M
,E
,MD
>↳
ColonyTxCreator
Constructors
constructor
• new ColonyTxCreator<C
, M
, E
, MD
>(config
)
Type parameters
Name | Type |
---|---|
C | extends MetaTxBaseContract |
M | extends string | number | symbol |
E | extends EventData |
MD | extends MetadataType |
Parameters
Name | Type |
---|---|
config | MetaMotionsConfig <C , M , E , MD > |
Overrides
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 tx and https://docs.colony.io/colonysdk/guides/transactions for more information
Remarks
This will only work if the VotingReputation extension is installed for the Colony that's being acted on
Parameters
Name | Type | Default value |
---|---|---|
motionDomain | BigNumberish | Id.RootDomain |
Returns
ColonyMetaTransaction
<TransactionResponse
, MotionCreatedEventObject
, ParsedLogTransactionReceipt
, MD
>
A motion transaction that can be send
or mined
or encode
d.
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 tx and https://docs.colony.io/colonysdk/guides/transactions for more information
Remarks
The user sending this transaction has to have the appropriate permissions to do so. Learn more about permissions in Colony here.
Returns
ColonyMetaTransaction
<TransactionResponse
, E
, ParsedLogTransactionReceipt
, MD
>
A transaction that can be send
or mined
.
Inherited from
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
Remarks
This will only work if the VotingReputation extension is installed for the Colony that's being acted on
Parameters
Name | Type | Default value |
---|---|---|
motionDomain | BigNumberish | Id.RootDomain |
Returns
ColonyTransaction
<ContractTransaction
, MotionCreatedEventObject
, ContractReceipt
, MD
>
A motion transaction that can be send
or mined
or encode
d.
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
Remarks
The user sending this transaction has to have the appropriate permissions to do so. Learn more about permissions in Colony here.
Returns
ColonyTransaction
<ContractTransaction
, E
, ContractReceipt
, MD
>
A transaction that can be send
, mined
or encode
d.