Class: MetaTxCreator<C, M, E, MD>
An umbrella API for all kinds of transactions
The MetaTxCreator
allows for a simple API to cover all the different cases of transactions within the Colony Network. The MetaTxCreator
supports sending a standard transaction (tx) as well as metatransactions (metaTx).
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
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
TxCreator
<C
,M
,E
,MD
>↳
MetaTxCreator
Constructors
constructor
• new MetaTxCreator<C
, M
, E
, MD
>(«destructured»
)
Type parameters
Name | Type |
---|---|
C | extends MetaTxBaseContract |
M | extends string | number | symbol |
E | extends EventData |
MD | extends MetadataType |
Parameters
Name | Type |
---|---|
«destructured» | Object |
› args | unknown [] | () => Promise <unknown []> |
› colonyNetwork | ColonyNetwork |
› contract | C |
› eventData? | (receipt : ContractReceipt ) => Promise <E > |
› metadataType? | MD |
› method | M |
› txConfig? | TxConfig <MD > |
Inherited from
Methods
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
.
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.