Skip to content

Commit

Permalink
Fix after review (partial).
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Mar 13, 2024
1 parent 05bdafe commit c47cb8e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/smartcontracts/smartContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()),
Expand Down Expand Up @@ -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()
Expand All @@ -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,
Expand Down Expand Up @@ -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()
Expand All @@ -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(),
Expand Down
6 changes: 3 additions & 3 deletions src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit c47cb8e

Please sign in to comment.