Skip to content

feat(hardhat-forge): update key ordering of hh artifact#37

Merged
mattsse merged 1 commit intofoundry-rs:developfrom
tynes:fix/hh-artifact-json-ordering
May 27, 2022
Merged

feat(hardhat-forge): update key ordering of hh artifact#37
mattsse merged 1 commit intofoundry-rs:developfrom
tynes:fix/hh-artifact-json-ordering

Conversation

@tynes
Copy link
Copy Markdown
Collaborator

@tynes tynes commented May 26, 2022

When turning a JS object into a JSON string, the order
of the keys will dictate the order of the keys in
the JSON. This change matches the format that hardhat
uses when writing the JSON artifacts to disk.

The format used by hardhat is shown below.

[
  "_format",
  "abi",
  "bytecode",
  "contractName",
  "deployedBytecode",
  "deployedLinkReferences",
  "linkReferences",
  "sourceName"
]

When turning a JS object into a JSON string, the order
of the keys will dictate the order of the keys in
the JSON. This change matches the format that hardhat
uses when writing the JSON artifacts to disk.

The format used by hardhat is shown below.

```
[
  "_format",
  "abi",
  "bytecode",
  "contractName",
  "deployedBytecode",
  "deployedLinkReferences",
  "linkReferences",
  "sourceName"
]
```
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented May 26, 2022

🦋 Changeset detected

Latest commit: 961c819

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@foundry-rs/hardhat-forge Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Member

@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.

ty

@mattsse mattsse merged commit 736941e into foundry-rs:develop May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants