Skip to content

Conversation

@JonathanOppenheimer
Copy link
Member

Why this should be merged

Replaces native minter e2e hardhat tests with golang bindings and a simulated backend test.

Part of #1228

How this works

Generates relevant golang bindings from sol files for the testing. Mirrors the hardhat test to a golang test using simulated backend.

How this was tested

CI

Need to be documented?

No

Need to update RELEASES.md?

No

@JonathanOppenheimer JonathanOppenheimer self-assigned this Nov 21, 2025
@JonathanOppenheimer JonathanOppenheimer added ci testing This primarly focuses on testing labels Nov 21, 2025
@JonathanOppenheimer JonathanOppenheimer force-pushed the JonathanOppenheimer/convert-native-minter-test branch from a93e2b6 to b7eec85 Compare November 21, 2025 20:59
@JonathanOppenheimer JonathanOppenheimer force-pushed the JonathanOppenheimer/convert-native-minter-test branch from 4131d69 to ef32f2f Compare November 21, 2025 21:11
@@ -0,0 +1,13 @@
// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved.
Copy link
Member Author

Choose a reason for hiding this comment

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

This whole package seems like a mess. Is the correct structure? It's not like the deployerallowlist package, because the minter is not tested seperately like allowlist is.

@@ -1,7 +1,7 @@
// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved.
Copy link
Member Author

Choose a reason for hiding this comment

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

I moved these in to match what you did for the deployerallowlist. I think all of these folders need to be cleaned up / reorganized, but I would appreciate your guidance @ceyonur

@JonathanOppenheimer JonathanOppenheimer marked this pull request as ready for review November 21, 2025 21:47
@JonathanOppenheimer JonathanOppenheimer requested review from a team and maru-ava as code owners November 21, 2025 21:47
@JonathanOppenheimer JonathanOppenheimer changed the title feat: convert native minter test to go framework feat: convert native minter npm test to go test Nov 21, 2025
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
Copy link
Member Author

Choose a reason for hiding this comment

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

I would like a way to avoid this, but we regenerate the bindings in the lint step to ensure that they didn't change.

Copy link
Member Author

Choose a reason for hiding this comment

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

Some of them need the open zeppelin submodule

@@ -0,0 +1,42 @@
// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved.
Copy link
Member Author

Choose a reason for hiding this comment

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

We can share some of these generic functions.

test func(t *testing.T, backend *sim.Backend, nativeMinterIntf *INativeMinter)
}

testCases := []testCase{
Copy link
Member Author

Choose a reason for hiding this comment

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

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

Labels

ci testing This primarly focuses on testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants