Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

abigen adopt hardhat generated bytecode #2012

Merged
merged 2 commits into from
Jan 5, 2023

Conversation

zsluedem
Copy link
Contributor

@zsluedem zsluedem commented Jan 5, 2023

Motivation

The hardhat compiled artifacts are like below

{
  "abi":[...],
  "bytecode": "..."
}

And the current ethers-rs could only support {"abi": [..], "bin": "..."} or {"abi": [..], "bytecode": {"object": "..."}}.

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog
  • Breaking changes

Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am OK with this - @mattsse ?

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while this adds support for hardhat, it no longer supports the nested object format, right?

instead of removing the "bytecode": {"object": "..."} case, we should keep it and just add bytecode": "0x00000000" as an additional variant instead.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm I totally misread that, that's already the case, sorry for the confusion

lgtm

@gakonst gakonst merged commit 4a8a6ad into gakonst:master Jan 5, 2023
@zsluedem zsluedem deleted the abi-gen-hardhat-bytecode branch January 5, 2023 09:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants