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

Improve solidity compilation process #270

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

sveitser
Copy link
Contributor

@sveitser sveitser commented Jan 10, 2022

  • Move extracted ABI files into their own directory to prevent
    hardhat compile from deleting them.
  • Rewrite build-abi script in python to avoid calling jq twice for each
    file. This makes the abi extraction part of the script a lot faster.
  • Check timestmaps of abi files and only update if source is newer.

I don't know why we're getting a small change in Cargo.lock.

Close #215

@sveitser sveitser force-pushed the feat/t215-abi-extract-only-updated-files branch 2 times, most recently from 8fbd17d to 71da1f1 Compare January 11, 2022 03:25
@alxiong
Copy link
Contributor

alxiong commented Jan 11, 2022

I don't know why we're getting a small change in Cargo.lock.

maybe try remove ?

[build-dependencies]
ethers-contract-abigen = { git = "https://github.com/gakonst/ethers-rs" }

Copy link
Contributor

@alxiong alxiong left a comment

Choose a reason for hiding this comment

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

LGTM! only two minor comments.

contracts/.gitignore Outdated Show resolved Hide resolved
@sveitser
Copy link
Contributor Author

I don't know why we're getting a small change in Cargo.lock.

maybe try remove ?

[build-dependencies]
ethers-contract-abigen = { git = "https://github.com/gakonst/ethers-rs" }

Done in 0e7b978

- Move extracted ABI files into their own directory to prevent
  `hardhat compile` from deleting them.
- Rewrite build-abi script in python to avoid calling jq twice for each
  file. This makes the abi extraction part of the script a lot faster.
- Check timestmaps of abi files and only update if source is newer.
@sveitser sveitser force-pushed the feat/t215-abi-extract-only-updated-files branch from 0e7b978 to 4fa0bf0 Compare January 11, 2022 08:35
Copy link
Contributor

@alxiong alxiong left a comment

Choose a reason for hiding this comment

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

👍 LGTM!

@sveitser sveitser merged commit db52bea into main Jan 11, 2022
@sveitser sveitser deleted the feat/t215-abi-extract-only-updated-files branch January 11, 2022 08:50
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.

Solidity compilation / Rust ABI generation isn't incremental
2 participants