diff --git a/src/smartcontracts/smartContract.ts b/src/smartcontracts/smartContract.ts index 0217c5f7..a43c6004 100644 --- a/src/smartcontracts/smartContract.ts +++ b/src/smartcontracts/smartContract.ts @@ -118,7 +118,7 @@ export class SmartContract implements ISmartContract { Compatibility.guardAddressIsSetAndNonZero(deployer, "'deployer' of SmartContract.deploy()", "pass the actual address to deploy()"); const config = new TransactionsFactoryConfig({ chainID: chainID.valueOf() }); - const scNextTransactionFactory = new SmartContractTransactionsFactory({ + const factory = new SmartContractTransactionsFactory({ config: config, abi: this.abi, tokenComputer: new TokenComputer() @@ -127,7 +127,7 @@ export class SmartContract implements ISmartContract { const bytecode = Buffer.from(code.toString(), 'hex'); const metadataAsJson = this.getMetadataPropertiesAsObject(codeMetadata); - const transaction = scNextTransactionFactory.createTransactionForDeploy({ + const transaction = factory.createTransactionForDeploy({ sender: deployer, bytecode: bytecode, gasLimit: BigInt(gasLimit.valueOf()), @@ -177,7 +177,7 @@ export class SmartContract implements ISmartContract { this.ensureHasAddress(); const config = new TransactionsFactoryConfig({ chainID: chainID.valueOf() }); - const scNextTransactionFactory = new SmartContractTransactionsFactory({ + const factory = new SmartContractTransactionsFactory({ config: config, abi: this.abi, tokenComputer: new TokenComputer() @@ -186,7 +186,7 @@ export class SmartContract implements ISmartContract { const bytecode = Uint8Array.from(Buffer.from(code.toString(), 'hex')); const metadataAsJson = this.getMetadataPropertiesAsObject(codeMetadata); - const transaction = scNextTransactionFactory.createTransactionForUpgrade({ + const transaction = factory.createTransactionForUpgrade({ sender: caller, contract: this.getAddress(), bytecode: bytecode, @@ -214,7 +214,7 @@ export class SmartContract implements ISmartContract { this.ensureHasAddress(); const config = new TransactionsFactoryConfig({ chainID: chainID.valueOf() }); - const scNextTransactionFactory = new SmartContractTransactionsFactory({ + const factory = new SmartContractTransactionsFactory({ config: config, abi: this.abi, tokenComputer: new TokenComputer() @@ -223,7 +223,7 @@ export class SmartContract implements ISmartContract { args = args || []; value = value || 0; - const transaction = scNextTransactionFactory.createTransactionForExecute({ + const transaction = factory.createTransactionForExecute({ sender: caller, contract: receiver ? receiver : this.getAddress(), functionName: func.toString(), diff --git a/src/transaction.ts b/src/transaction.ts index b6fa42d8..6125e0f9 100644 --- a/src/transaction.ts +++ b/src/transaction.ts @@ -42,12 +42,12 @@ export class Transaction { public value: bigint; /** - * The address of the sender. + * The address of the sender, in bech32 format. */ public sender: string; /** - * The address of the receiver. + * The address of the receiver, in bech32 format. */ public receiver: string; @@ -92,7 +92,7 @@ export class Transaction { public options: number; /** - * The address of the guardian. + * The address of the guardian, in bech32 format. */ public guardian: string;