ethereum / fe

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

Failed to Verify Contract #951

Closed Philogy closed 10 months ago

Philogy commented 10 months ago

What is wrong?

Following the simple dao blog post I installed fe via brew (fe -V => fe 0.26.0) and tried to run the command to verify the contract:

fe verify 0xf0adbb9ed4135d1509ad039505bada942d18755f $ETH_RPC_URL

Whereby I ran this in the fe_contracts directory of the https://github.com/cburgdorf/simple_dao/ repo on tag SimpleDAOBountyDeployment (also doesn't work on master). My RPC seems perfect functional with me able to retrieve both contract code (tested via cast code <addr>) and the current block number. I was using the public https://eth.llamarpc.com endpoint for reference.

Full error from running the command:

Failed to verify contract.

error decoding response body: missing field `result` at line 1 column 143
cburgdorf commented 10 months ago

Hi Philippe, thanks for jumping on this and taking the time to report the issue. The reponse of the node that you are using seems to not have a result field. I'll take a closer look but in the meantime, try out this public node instead: https://eth.public-rpc.com

cburgdorf commented 10 months ago

Ok, I see what the problem is, the node seems to be picky about the request not specifying the Content-Type header. It should be easy to fix.

cburgdorf commented 10 months ago

I created a fix that will be in the next release: https://github.com/ethereum/fe/pull/952 Thanks again for reporting, please use another JSON-RPC provider such as https://eth.public-rpc.com/ in the meantime.