Skip to content

Commit

Permalink
add short description for the transaction factories
Browse files Browse the repository at this point in the history
  • Loading branch information
popenta committed Feb 13, 2024
1 parent 65230d0 commit e7e10fe
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transactionsFactories/delegationTransactionsFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ interface IValidatorPublicKey {
hex(): string;
}

/**
* Use this class to create delegation related transactions like creating a new delegation contract or adding nodes.
*/
export class DelegationTransactionsFactory {
private readonly config: Config;

Expand Down
3 changes: 3 additions & 0 deletions src/transactionsFactories/relayedTransactionsFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ interface IConfig {
gasLimitPerByte: BigNumber.Value;
}

/**
* Use this class to create both RelyedV1 and RelayedV2 transactions.
*/
export class RelayedTransactionsFactory {
private readonly config: IConfig;

Expand Down
3 changes: 3 additions & 0 deletions src/transactionsFactories/smartContractTransactionsFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ interface TokenComputer {
isFungible(token: Token): boolean;
}

/**
* Use this class to create transactions to deploy, call or upgrade a smart contract.
*/
export class SmartContractTransactionsFactory {
private readonly config: Config;
private readonly abiRegistry?: Abi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ interface Config {

type RegisterAndSetAllRolesTokenType = "NFT" | "SFT" | "META" | "FNG";

/**
* Use this class to create token management transactions like issuing ESDTs, creating NFTs, setting roles, etc.
*/
export class TokenManagementTransactionsFactory {
private readonly config: Config;
private readonly trueAsHex: string;
Expand Down
3 changes: 3 additions & 0 deletions src/transactionsFactories/transferTransactionsFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ interface TokenComputer {
isFungible(token: Token): boolean;
}

/**
* Use this class to create transactions for native token transfers (EGLD) or custom tokens transfers (ESDT/NTF/MetaESDT).
*/
export class NextTransferTransactionsFactory {
private readonly config: IConfig;
private readonly dataArgsBuilder: TokenTransfersDataBuilder;
Expand Down

0 comments on commit e7e10fe

Please sign in to comment.