Skip to content
Merged
Show file tree
Hide file tree
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
27 changes: 0 additions & 27 deletions src/core/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,33 +299,6 @@ export class ErrNotImplemented extends Err {
}
}

/**
* Signals invalid arguments when using the relayed v1 builder
*/
export class ErrInvalidRelayedV1BuilderArguments extends Err {
public constructor() {
super("invalid arguments for relayed v1 builder");
}
}

/**
* Signals invalid arguments when using the relayed v2 builder
*/
export class ErrInvalidRelayedV2BuilderArguments extends Err {
public constructor() {
super("invalid arguments for relayed v2 builder");
}
}

/**
* Signals that Gas Limit isn't 0 for an inner tx when using relayed v2 builder
*/
export class ErrGasLimitShouldBe0ForInnerTransaction extends Err {
public constructor() {
super("gas limit must be 0 for the inner transaction for relayed v2");
}
}

/**
* Signals that the `isCompleted` property is missing on the transaction obect and is needed for the Transaction Watcher
*/
Expand Down
41 changes: 0 additions & 41 deletions src/entrypoints/entrypoints.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,47 +103,6 @@ describe("TestEntrypoint", function () {
assert.equal(queryResult[0], 7);
});

it("create relayed transaction", async function () {
const transferController = entrypoint.createTransfersController();
const filePath = path.join("src", "testdata", "testwallets", "alice.pem");
const sender = await Account.newFromPem(filePath);
sender.nonce = 77777n;

const bobPath = path.join("src", "testdata", "testwallets", "alice.pem");
const relayer = await Account.newFromPem(bobPath);
relayer.nonce = 7n;

const transaction = await transferController.createTransactionForTransfer(
sender,
BigInt(sender.getNonceThenIncrement().valueOf()),
{
receiver: sender.address,
data: Buffer.from("hello"),
},
);
const innerTransactionGasLimit = transaction.gasLimit;
transaction.gasLimit = BigInt(0);
transaction.signature = await sender.signTransaction(transaction);

const relayedController = entrypoint.createRelayedController();
const relayedTransaction = await relayedController.createRelayedV2Transaction(
relayer,
BigInt(relayer.getNonceThenIncrement().valueOf()),
{
innerTransaction: transaction,
innerTransactionGasLimit,
},
);
assert.equal(relayedTransaction.chainID, "D");
assert.deepEqual(
Buffer.from(relayedTransaction.data),
Buffer.from(
"relayedTxV2@0139472eff6886771a982f3083da5d421f24c29181e63888228dc81ca60d69e1@012fd1@68656c6c6f@c1eed3ac766d6b94aa53a1348d38eac8db60be0a1b2d0873247b61b8b25bbcb45bf9c1518227bcadd5044d4c027bdb935e0164243b2b2df9a5b250a10aca260e",
),
);
assert.equal(relayedTransaction.gasLimit, 442000n);
});

it("create account", async () => {
const account = await entrypoint.createAccount();
assert.isNotNull(account);
Expand Down
10 changes: 0 additions & 10 deletions src/entrypoints/entrypoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { TransactionWatcher } from "../core/transactionWatcher";
import { DelegationController, DelegationTransactionsFactory } from "../delegation";
import { ApiNetworkProvider, ProxyNetworkProvider } from "../networkProviders";
import { INetworkProvider } from "../networkProviders/interface";
import { RelayedTransactionsFactory } from "../relayed";
import { RelayedController } from "../relayed/relayedController";
import { SmartContractTransactionsFactory } from "../smartContracts";
import { SmartContractController } from "../smartContracts/smartContractController";
import { TokenManagementController, TokenManagementTransactionsFactory } from "../tokenManagement";
Expand Down Expand Up @@ -108,14 +106,6 @@ class NetworkEntrypoint {
return new AccountTransactionsFactory({ config: new TransactionsFactoryConfig({ chainID: this.chainId }) });
}

createRelayedController(): RelayedController {
return new RelayedController({ chainID: this.chainId });
}

createRelayedTransactionsFactory(): RelayedTransactionsFactory {
return new RelayedTransactionsFactory({ config: new TransactionsFactoryConfig({ chainID: this.chainId }) });
}

createSmartContractController(abi?: AbiRegistry): SmartContractController {
return new SmartContractController({ chainID: this.chainId, networkProvider: this.networkProvider, abi });
}
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export * from "./core";
export * from "./delegation";
export * from "./entrypoints";
export * from "./networkProviders";
export * from "./relayed";
export * from "./tokenManagement";
export * from "./transactionsOutcomeParsers";
export * from "./transfers";
Expand Down
2 changes: 0 additions & 2 deletions src/relayed/index.ts

This file was deleted.

48 changes: 0 additions & 48 deletions src/relayed/relayedController.ts

This file was deleted.

Loading
Loading