Skip to content

Commit

Permalink
Remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
danielailie committed Dec 9, 2024
1 parent 17177ac commit e8aa3e2
Show file tree
Hide file tree
Showing 30 changed files with 80 additions and 1,616 deletions.
2 changes: 0 additions & 2 deletions src/abi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ export * from "./codec";
export * from "./codeMetadata";
export * from "./function";
export * from "./interaction";
export * from "./interactionChecker";
export * from "./interface";
export * from "./nativeSerializer";
export * from "./query";
export * from "./returnCode";
export * from "./smartContract";
export * from "./transactionPayloadBuilders";
export * from "./typesystem";
31 changes: 16 additions & 15 deletions src/abi/interaction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ describe("test smart contract interactor", function () {
let contract = new SmartContract({ address: dummyAddress, abi: abi });
let controller = new SmartContractController({ chainID: "D", networkProvider: provider, abi: abi });

let getInteraction = <Interaction>contract.methodsExplicit.get().check();
let getInteraction = <Interaction>contract.methodsExplicit.get();
let incrementInteraction = (<Interaction>contract.methods.increment()).withGasLimit(543210);
let decrementInteraction = (<Interaction>contract.methods.decrement()).withGasLimit(987654);

Expand Down Expand Up @@ -353,20 +353,21 @@ describe("test smart contract interactor", function () {
let contract = new SmartContract({ address: dummyAddress, abi: abiRegistry });
let controller = new SmartContractController({ chainID: "D", networkProvider: provider, abi: abiRegistry });

let startInteraction = <Interaction>contract.methodsExplicit
.start([
BytesValue.fromUTF8("lucky"),
new TokenIdentifierValue("lucky-token"),
new BigUIntValue(1),
OptionValue.newMissing(),
OptionValue.newMissing(),
OptionValue.newProvided(new U32Value(1)),
OptionValue.newMissing(),
OptionValue.newMissing(),
OptionalValue.newMissing(),
])
.withGasLimit(5000000)
.check();
let startInteraction = <Interaction>(
contract.methodsExplicit
.start([
BytesValue.fromUTF8("lucky"),
new TokenIdentifierValue("lucky-token"),
new BigUIntValue(1),
OptionValue.newMissing(),
OptionValue.newMissing(),
OptionValue.newProvided(new U32Value(1)),
OptionValue.newMissing(),
OptionValue.newMissing(),
OptionalValue.newMissing(),
])
.withGasLimit(5000000)
);

let statusInteraction = <Interaction>contract.methods.status(["lucky"]).withGasLimit(5000000);

Expand Down
9 changes: 0 additions & 9 deletions src/abi/interaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { TokenTransfer } from "../tokens";
import { Transaction } from "../transaction";
import { TransactionsFactoryConfig } from "../transactionsFactoryConfig";
import { ContractFunction } from "./function";
import { InteractionChecker } from "./interactionChecker";
import { CallArguments } from "./interface";
import { Query } from "./query";
import { EndpointDefinition, TypedValue } from "./typesystem";
Expand Down Expand Up @@ -195,12 +194,4 @@ export class Interaction {
this.explicitReceiver = receiver;
return this;
}

/**
* To perform custom checking, extend {@link Interaction} and override this method.
*/
check(): Interaction {
new InteractionChecker().checkInteraction(this, this.getEndpoint());
return this;
}
}
85 changes: 0 additions & 85 deletions src/abi/interactionChecker.spec.ts

This file was deleted.

59 changes: 0 additions & 59 deletions src/abi/interactionChecker.ts

This file was deleted.

47 changes: 0 additions & 47 deletions src/abi/transactionPayloadBuilders.spec.ts

This file was deleted.

Loading

0 comments on commit e8aa3e2

Please sign in to comment.