An intra-shard dummy transaction that does nothing takes 4 blocks to get marked as successful:
import { expect, test } from "vitest";
import { FSWorld } from "xsuite";
test("Test", async () => {
using world = await FSWorld.start({ gasPrice: 0 });
const wallet = await world.createWallet();
const nonceBefore = (await world.getNetworkStatus(0)).nonce;
const txHash = await wallet.sendTx({
receiver: wallet,
gasLimit: 50_000,
});
for (let i = 1; i <= 4; i++) {
await world.generateBlocks(1);
expect((await world.getNetworkStatus(0)).nonce).toEqual(nonceBefore + i);
expect(await world.proxy.getTxProcessStatus(txHash)).toEqual(i < 4 ? "pending" : "success");
}
});
To run the test:
npm run test