diff --git a/src/smartcontracts/smartContract.ts b/src/smartcontracts/smartContract.ts index 782385174..3409db5a8 100644 --- a/src/smartcontracts/smartContract.ts +++ b/src/smartcontracts/smartContract.ts @@ -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. @@ -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); } /** @@ -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. */ @@ -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)