AOSSIE-Org / AOSSIE-Org/Agora-Blockchain

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

オープン
#216 コメント 3 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。