AOSSIE-Org / AOSSIE-Org/Agora-Blockchain

BUG: Test failures for ElectionFactory.createElection due to function signature mismatch (ethers v6)

未关闭
#216 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
97
派生
199
PR 合并指标
30 天内没有已合并 PR

描述

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Issue Description ✍️

## 📌 Describe the Bug
On a fresh local setup, the test suite fails consistently when invoking ElectionFactory.createElection.

The failure appears to be caused by a mismatch between the Solidity function signature and the arguments used in the tests, which is surfaced when using ethers v6 (strict ABI fragment resolution).

## 🚨 Actual Behavior
Running the test suite results in the following error:

Error: no matching fragment (operation="fragment", key="createElection")

This error occurs across multiple test cases related to election creation and deletion.

The failure is triggered when tests attempt to call createElection without supplying all required parameters defined in the contract ABI.

## 🎯 Expected Behavior
The createElection function should be invoked with arguments that correctly match its Solidity signature, allowing the test suite to execute successfully without ABI resolution errors.

## 💡 Suggestions

Possible resolutions:

i) Update tests to pass a valid Election.Candidate[] argument, or

ii) Adjust the factory interface if the intended API has changed.

This issue is surfaced clearly when using ethers v6, which enforces strict ABI fragment matching.

I would be happy to work on a fix once aligned with the maintainers on the intended behavior.

### Record

- [x] I have synced all my node versions as mentioned in the project
- [x] I am using the same version of npm as is the project
- [x] My current branch is in sync with the development branch
- [x] I want to work on this issue

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。