Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/smartcontracts/smartContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export class SmartContract implements ISmartContract {
private code: Code = Code.nothing();
private codeMetadata: CodeMetadata = new CodeMetadata();
private abi?: SmartContractAbi;
// TODO: Perhaps remove this?
private readonly trackOfTransactions: Transaction[] = [];

/**
* This object contains a function for each endpoint defined by the contract.
Expand Down Expand Up @@ -167,8 +165,6 @@ export class SmartContract implements ISmartContract {
let nonce = transaction.getNonce();
let address = SmartContract.computeAddress(this.owner, nonce);
this.setAddress(address);

this.trackOfTransactions.push(transaction);
}

/**
Expand All @@ -194,15 +190,10 @@ export class SmartContract implements ISmartContract {

this.code = code;
this.codeMetadata = codeMetadata;
transaction.onSigned.on(this.onUpgradeSigned.bind(this));

return transaction;
}

private onUpgradeSigned({ transaction }: { transaction: Transaction, signedBy: Address }) {
this.trackOfTransactions.push(transaction);
}

/**
* Creates a {@link Transaction} for calling (a function of) the Smart Contract.
*/
Expand All @@ -222,15 +213,9 @@ export class SmartContract implements ISmartContract {
data: payload
});

transaction.onSigned.on(this.onCallSigned.bind(this));

return transaction;
}

private onCallSigned({ transaction }: { transaction: Transaction, signedBy: Address }) {
this.trackOfTransactions.push(transaction);
}

async runQuery(
provider: IProvider,
{ func, args, value, caller }: QueryArguments)
Expand Down