Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

test: use generated ABI#1912

Closed
JonathanOppenheimer wants to merge 133 commits intomasterfrom
JonathanOppenheimer/use-new-abi
Closed

test: use generated ABI#1912
JonathanOppenheimer wants to merge 133 commits intomasterfrom
JonathanOppenheimer/use-new-abi

Conversation

@JonathanOppenheimer
Copy link
Copy Markdown
Contributor

@JonathanOppenheimer JonathanOppenheimer commented Dec 8, 2025

Why this should be merged

Currently, the committed ABI files are 2 years old, and there is no clear path of how they were generated. This PR deletes those files, and commits the files generated by compile.go instead.

You can verify that each folders contract.abi files matches the newly commited ABI file through the following:

  1. pretty format the new ABI through https://jsonformatter.org/
  2. diff check

You can also compare them directly using json, e.g. <(git show HEAD:precompile/allowlist/allowlist.abi | jq -S .) <(cat precompile/allowlist/IAllowList.abi | jq -S .) && echo "Files are identical!"

There are two exceptions which are commented below:

How this was tested

CI

Need to be documented?

No

Need to update RELEASES.md?

No

…test

Signed-off-by: Jonathan Oppenheimer <jonathan.oppenheimer@avalabs.org>
…nathanOppenheimer/convert-reward-manager-test

Signed-off-by: Jonathan Oppenheimer <jonathan.oppenheimer@avalabs.org>
JonathanOppenheimer and others added 13 commits December 9, 2025 13:52
Signed-off-by: Jonathan Oppenheimer <jonathan.oppenheimer@avalabs.org>
Co-authored-by: Austin Larson <78000745+alarso16@users.noreply.github.com>
Signed-off-by: Jonathan Oppenheimer <147infiniti@gmail.com>
Co-authored-by: Austin Larson <78000745+alarso16@users.noreply.github.com>
Signed-off-by: Jonathan Oppenheimer <147infiniti@gmail.com>
Co-authored-by: Austin Larson <78000745+alarso16@users.noreply.github.com>
Signed-off-by: Jonathan Oppenheimer <147infiniti@gmail.com>
Co-authored-by: Austin Larson <78000745+alarso16@users.noreply.github.com>
Signed-off-by: Jonathan Oppenheimer <147infiniti@gmail.com>
@michaelkaplan13
Copy link
Copy Markdown
Contributor

Please generate them in place to begin with so we can just review directly without depending on something beyond the scope of the PR. Next you can create a trivial PR that moves them.

If you check the commit I just added (a8e82e8), I can not get git to detect the similarity because the old file is formatted prettily and thus is 100+ lines. The newly generated file is a single line. Even setting the git similarity score to 1% on commit is not enough to track that these files are identical.

You can compare the files as JSON <(git show HEAD:precompile/allowlist/allowlist.abi | jq -S .) <(cat precompile/allowlist/IAllowList.abi | jq -S .) && echo "Files are identical!" to verify that these files are identical.

if you have any better suggestions, please let me know.

Following up a few different threads here.

  1. I just created a draft PR into this branch that has the ABI files generated in place and keeps the pretty-json formatting, which reduces the diff (particularly when viewed in GitHub). @JonathanOppenheimer, please take a look and make sure it makes sense to you. There were setRole events added to a few of the ABI files that are worth investigating.
  2. The blocker for moving to a monorepo in AvalancheGo was/is the removal of NPM from this repo. The need for this change came out of reviewing PRs that worked towards removing NPM, but this PR itself should not be considered a blocker. For that reason, lets defer it to after the monorepo.
  3. We definitely still want to make this change for (at least) the following reasons:
    a. Include programatic method for how the ABI files are generated
    b. Ensure via CI both that the ABI files are up to date with the the solidity interface definitions, and also that they are up to date with the precompile implementations (by using them to interact with the precompiles).

@JonathanOppenheimer
Copy link
Copy Markdown
Contributor Author

JonathanOppenheimer commented Dec 10, 2025

I have merged @michaelkaplan13's PR into this, and will leave the contract.abi rename for the separate cleanup PR as requested.

Base automatically changed from JonathanOppenheimer/delete-npm to master December 12, 2025 15:55
@JonathanOppenheimer JonathanOppenheimer removed the DO NOT MERGE This PR is not meant to be merged in its current state label Dec 12, 2025
@JonathanOppenheimer
Copy link
Copy Markdown
Contributor Author

Superseded by ava-labs/avalanchego#4740

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

testing This primarly focuses on testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants