ethereum / fe

Emerging smart contract language for the Ethereum blockchain.
https://fe-lang.org
Other
1.6k stars 179 forks source link

Unexpected event in ABI for compiler v0.26.0 on macOS #953

Open KumaCrypto opened 10 months ago

KumaCrypto commented 10 months ago

Hi, I noticed a strange thing that when using compiler v0.26.0 for Mac when compiling the following code from the documentation tutorial with fe build ./file_name.fe:

contract GuestBook {
    messages: Map<address, String<100>>
}

The compilation is successful, but the generated ABI file includes an unexpected event named "Context":

[
  {
    "type": "event",
    "name": "Context",
    "inputs": [],
    "anonymous": false
  }
]

This seems inconsistent with the code since there's no corresponding "Context" event in the contract. The documentation also suggests that the ABI for an empty contract should resemble "an empty array."

"The GuestBook_abi.json is a JSON representation that describes the binary interface of our contract, but since our contract doesn't yet expose anything useful, its content for now resembles an empty array."

I wanted to flag this issue, hoping it can assist in product improvement. Thanks for your efforts!