-
Notifications
You must be signed in to change notification settings - Fork 1
feat: [E2E] Indexer tests — MINT/BURN/TRANSFER events + balance tracking #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
40867e7
indexer e2e test
sadiq1971 50dfd0b
optimized implementations
sadiq1971 285d2aa
resolve gemini comment
sadiq1971 1230dee
fix: BURN test account and MaxPartyEventOffset error handling
sadiq1971 ffcb770
fix: encode EvmAddress as DAML newtype Record in bridge InitiateWithd…
sadiq1971 7b91b19
fix: correct EvmDestination decode, InitiateWithdrawal encoding, and …
sadiq1971 81481b2
fixed failing tests
sadiq1971 fc30e48
revert unused changes
sadiq1971 b9aeec5
bug fixes and improvements
sadiq1971 5e70df9
unit test fixed
sadiq1971 efeb70a
resolved gemini comments
sadiq1971 81054ab
Merge branch 'main' into sadiq/feat/indexer-e2e
salindne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| //go:build e2e | ||
|
|
||
| package indexer_test | ||
|
|
||
| import "math/big" | ||
|
|
||
| // amtGTE returns true when a >= b, comparing both as exact decimal strings. | ||
| // Uses big.Rat (exact rational arithmetic) to avoid the precision loss that | ||
| // big.Float can introduce with 18-decimal token amounts. | ||
| func amtGTE(a, b string) bool { | ||
| af, ok1 := new(big.Rat).SetString(a) | ||
| bf, ok2 := new(big.Rat).SetString(b) | ||
| if !ok1 || !ok2 { | ||
| return false | ||
| } | ||
| return af.Cmp(bf) >= 0 | ||
| } | ||
|
sadiq1971 marked this conversation as resolved.
Outdated
|
||
|
|
||
| // amtLT returns true when a < b. | ||
| func amtLT(a, b string) bool { | ||
| af, ok1 := new(big.Rat).SetString(a) | ||
| bf, ok2 := new(big.Rat).SetString(b) | ||
| if !ok1 || !ok2 { | ||
| return false | ||
| } | ||
| return af.Cmp(bf) < 0 | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| //go:build e2e | ||
|
|
||
| package indexer_test | ||
|
|
||
| import ( | ||
| "os" | ||
| "testing" | ||
|
|
||
| "github.com/chainsafe/canton-middleware/tests/e2e/devstack/presets" | ||
| ) | ||
|
|
||
| func TestMain(m *testing.M) { | ||
| os.Exit(presets.DoMain(m)) | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.