fix: Pin OpenZeppelin to v4.9.6 and add mock registrations for Phase 4 tests
Some checks failed
Contract Performance Benchmarks / benchmark-gas-usage (push) Successful in 1m16s
Contract Performance Benchmarks / benchmark-execution-time (push) Successful in 1m0s
Contract Performance Benchmarks / benchmark-throughput (push) Successful in 1m3s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 2s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Cross-Node Transaction Testing / transaction-test (push) Successful in 9s
Deploy to Testnet / deploy-testnet (push) Successful in 1m1s
Multi-Node Stress Testing / stress-test (push) Successful in 1s
Node Failover Simulation / failover-test (push) Successful in 2s
Smart Contract Tests / test-solidity (map[name:aitbc-contracts path:contracts]) (push) Failing after 1m0s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 10s
Smart Contract Tests / test-foundry (push) Failing after 14s
Smart Contract Tests / lint-solidity (push) Successful in 14s
Smart Contract Tests / deploy-contracts (push) Successful in 1m11s
Contract Performance Benchmarks / compare-benchmarks (push) Successful in 2s
Deploy to Testnet / notify-deployment (push) Successful in 1s

- Pin OpenZeppelin to v4.9.6 to match contract import structure
- Add mock registrations for PerformanceVerifier, AgentBounty, AgentStaking
- PerformanceAggregator.initialize() requires these contracts in registry
This commit is contained in:
aitbc
2026-04-29 22:11:36 +02:00
parent 4db22e46ed
commit d1a9ad0438
2 changed files with 16 additions and 2 deletions

View File

@@ -134,8 +134,8 @@ jobs:
echo "=== Running Foundry Tests ==="
# Install OpenZeppelin dependencies
forge install OpenZeppelin/openzeppelin-contracts
# Install OpenZeppelin dependencies (v4.x for compatibility with existing imports)
forge install OpenZeppelin/openzeppelin-contracts@v4.9.6
echo "✅ OpenZeppelin dependencies installed"
# Build contracts

View File

@@ -83,6 +83,20 @@ describe("Phase 4 Modular Smart Contracts", function () {
);
// PerformanceAggregator registers itself during initialize(), so don't register it here
// Register mock contracts that PerformanceAggregator.initialize() requires
await contractRegistry.registerContract(
ethers.keccak256(ethers.toUtf8Bytes("PerformanceVerifier")),
user1.address
);
await contractRegistry.registerContract(
ethers.keccak256(ethers.toUtf8Bytes("AgentBounty")),
user2.address
);
await contractRegistry.registerContract(
ethers.keccak256(ethers.toUtf8Bytes("AgentStaking")),
deployer.address
);
// Initialize all contracts (after registration)
await treasuryManager.initialize(await contractRegistry.getAddress());
await rewardDistributor.initialize(await contractRegistry.getAddress());