fix: EscrowService test event log extraction and BigInt normalization
Some checks failed
Contract Performance Benchmarks / benchmark-gas-usage (push) Has been skipped
Contract Performance Benchmarks / benchmark-execution-time (push) Has been skipped
Contract Performance Benchmarks / benchmark-throughput (push) Has been skipped
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Failing after 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 3s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Failing after 2s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Deploy to Testnet / deploy-testnet (push) Failing after 1m2s
Contract Performance Benchmarks / compare-benchmarks (push) Has been skipped
Deploy to Testnet / notify-deployment (push) Successful in 1s

- Change event log extraction from args[0] to topics[1] for indexed escrowId
- Fix BigInt normalization error by using full numeric values instead of exponential notation
- Update all beforeEach hooks to use correct event log structure
This commit is contained in:
aitbc
2026-04-29 13:20:38 +02:00
parent 9f5b54e6c5
commit 40c0d1d6f1

View File

@@ -75,10 +75,10 @@ describe("EscrowService", function () {
});
it("Should set default configuration values", async function () {
expect(await escrowService.minEscrowAmount()).to.equal(1e15);
expect(await escrowService.maxEscrowAmount()).to.equal(1e22);
expect(await escrowService.minTimeLock()).to.equal(300);
expect(await escrowService.maxTimeLock()).to.equal(86400 * 30);
expect(await escrowService.minEscrowAmount()).to.equal(1000000000000000n);
expect(await escrowService.maxEscrowAmount()).to.equal(10000000000000000000000n);
expect(await escrowService.minTimeLock()).to.equal(300n);
expect(await escrowService.maxTimeLock()).to.equal(2592000n);
});
});
@@ -95,7 +95,7 @@ describe("EscrowService", function () {
);
const receipt = await tx.wait();
const escrowId = receipt.logs[0].args[0];
const escrowId = receipt.logs[0].topics[1];
expect(escrowId).to.not.be.undefined;
});
@@ -156,7 +156,7 @@ describe("EscrowService", function () {
"Test escrow"
);
const receipt = await tx.wait();
escrowId = receipt.logs[0].args[0];
escrowId = receipt.logs[0].topics[1];
});
it("Should skip - fundEscrow not implemented", async function () {
@@ -192,7 +192,7 @@ describe("EscrowService", function () {
"Test escrow"
);
const receipt = await tx.wait();
escrowId = receipt.logs[0].args[0];
escrowId = receipt.logs[0].topics[1];
});
it("Should release escrow to beneficiary", async function () {
@@ -245,7 +245,7 @@ describe("EscrowService", function () {
"Test escrow"
);
const receipt = await tx.wait();
escrowId = receipt.logs[0].args[0];
escrowId = receipt.logs[0].topics[1];
});
it("Should refund escrow to depositor", async function () {
@@ -312,7 +312,7 @@ describe("EscrowService", function () {
"Test escrow"
);
const receipt = await tx.wait();
escrowId = receipt.logs[0].args[0];
escrowId = receipt.logs[0].topics[1];
});
it("Should get escrow details", async function () {