-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix DDO: Stats and Prices for exchanges/dispensers #774
Open
mariacarmina
wants to merge
115
commits into
main
Choose a base branch
from
feature/new-ddo-structure
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
115 commits
Select commit
Hold shift + click to select a range
e80245e
Create type for IndexedMetadata. Delete key when validating DDO.
mariacarmina 06f85c3
Delete key when checks are performed for DIDs.
mariacarmina 27075f7
fix lint.
mariacarmina 018683d
Add stats wihtin ddo in MetadataCreated. Update logic in OrderStarted.
mariacarmina c091ac3
Update stats logic for OrderReused.
mariacarmina b2517f6
fix lint.
mariacarmina d40c3dd
Add backwards compatible functionality for orders keys. Will be remov…
mariacarmina c072e1d
Added logic for MetadataUpdated
mariacarmina a881255
Fix tests for orders in indexer.
mariacarmina 0ff7e12
Fix lint.
mariacarmina 61a2b7b
Add logs.
mariacarmina b21b16d
Update logic for non princing schemas ddos.
mariacarmina 4fa035e
debug.
mariacarmina ab3122f
Add debug logs.
mariacarmina 4a3da6c
Add dispenser logs.
mariacarmina c401204
Add more debug logs.
mariacarmina 4d09c45
Changed condition.
mariacarmina 9c8ce70
Fix function length.
mariacarmina 6a4202e
Add new logic for order started and order reused.
mariacarmina d2185dc
Create util function for generating ddo pricings.
mariacarmina c0998cd
Debug DDO hashes.
mariacarmina b0768f0
Updated test.
mariacarmina 1be249e
Cleanup logs.
mariacarmina 58d4491
Implemented an util function which calculates prices for a datatoken.
mariacarmina 72e7ead
Rename function.
mariacarmina b197bd0
Monitor DispenserActivated.
mariacarmina d37ba24
Monitor DispenserDeactivated.
mariacarmina 716ddd1
Monitor ExchangeActivated. Added token address to all dispensers.
mariacarmina e15905a
Instantiate processors.
mariacarmina c2ab578
Added events hashes.
mariacarmina 88efb9f
Monitor ExchangeRateChanged.
mariacarmina c240aed
fix lint.
mariacarmina fd0686a
fix lint.
mariacarmina ed870c8
Merge branch 'main' into feature/new-ddo-structure
mariacarmina 6738cb3
Add pricing tests for new ddo structure.
mariacarmina d5d8b4f
Add debug print.
mariacarmina 04cdf30
Added tests for dispenser, index dispenser activated.
mariacarmina bd9941a
Fix fre creation parameters.
mariacarmina f533882
Clean up.
mariacarmina 71c5a7a
Changed parameter name.
mariacarmina 95e006f
Changed address.
mariacarmina 223e38b
Fix mint on fre, updated dispenser params.
mariacarmina e3c2c71
Add more asserts for fre test.
mariacarmina cb9faa3
Run only pricing tests.
mariacarmina 4ca1a56
Fix parameters for fre.
mariacarmina f018460
Add print for resolved DDO and for exchange ID.
mariacarmina 824c2a9
debug.
mariacarmina 8576ff3
Increase timeout.
mariacarmina 3d092bc
Add debug logs for event decoded data.
mariacarmina 0b536f5
fix logs.
mariacarmina 230995c
Monitor ExchangeCreated event.
mariacarmina 29a9b5e
tweak.
mariacarmina 6121498
Fixed event name.
mariacarmina 5320ef5
Changed event hash.
mariacarmina 1ce17eb
Merge branch 'main' into feature/new-ddo-structure
mariacarmina 0cc3b76
Undo event hash.
mariacarmina a62cd2e
Add logs.
mariacarmina e5f0058
Changed event hash.
mariacarmina 7f5ac90
add debug logs.
mariacarmina 7f9bf9b
Decode data.
mariacarmina 4901ba1
Added more logs.
mariacarmina 0ca4cf2
Fixed decodeEvent fn.
mariacarmina d20559b
fix loop, fix log.
mariacarmina a5f37f8
more logs.
mariacarmina df754fb
Added dispenser tests.
mariacarmina bdca794
Fixed exchange ID retrieval. cleanup debug logs.
mariacarmina 3df093c
Add debug logs for MetadataProcessor.
mariacarmina 6421e76
add more debug logs for getTokenInfo.
mariacarmina 0f8d089
Fix getTokenInfo function.
mariacarmina 1b2aadb
Added checks for invalid datatoken address, fix tests.
mariacarmina a22a220
Added debug logs for instantiating contracts.
mariacarmina 67207ce
Fix fixedRate return params retrieval.
mariacarmina 4768bc6
tweak.
mariacarmina 1d852f3
Refactor dispenser tests.
mariacarmina 0c0ea2f
More asserts for FRE and debug prices. Logs for dispenser.
mariacarmina a8954c0
Add function which checks event hash in logs topics.
mariacarmina cf26cd0
logs.
mariacarmina 3325834
debug.
mariacarmina 16d01cd
tweaks.
mariacarmina 5c709b8
Added assertion asserts.
mariacarmina 046d8fa
Fix test.
mariacarmina f9c3e94
debug logs.
mariacarmina f5afad9
Fix event.
mariacarmina 2a9437b
Fix dispenser test.
mariacarmina ee26781
print datatoken address.
mariacarmina 3c394cf
to lowercase
mariacarmina 9e3ad98
debug
mariacarmina 97f4ed5
to lowercase.
mariacarmina ba45b39
tweak test.
mariacarmina c71c9f6
Get stats w dispenser only.
mariacarmina 44e4471
Updated event to index.
mariacarmina 6163a5e
brig test suite back.
mariacarmina 129e7a2
Parse uints correctly w ethers.
mariacarmina 26026ce
fix tests.
mariacarmina 27aba77
Fix function call.
mariacarmina a96d228
Added checks.
mariacarmina e005f5a
Uncommented activate function.
mariacarmina 4093acc
Added new datatoken with dispenser.
mariacarmina be5907e
Remove activate function.
mariacarmina 1d14643
Monitor metadata updated.
mariacarmina 42d61b0
Added new service.
mariacarmina 00ab6d3
Fix status contract call w dt address.
mariacarmina 6724edd
Update prices for dispenser.
mariacarmina c2524d1
Add debug logs.
mariacarmina 38eb26a
Deactivate dispenser.
mariacarmina 2409030
fix asserts.
mariacarmina 31235a4
debug log.
mariacarmina fc06d85
Use getAddress.
mariacarmina 0d8bd13
cleanup + add tests back.
mariacarmina fe7cf1d
try with new cli branch.
mariacarmina d2e231c
Test only pricing.
mariacarmina 6eb90fd
Updated DDO integration tests.
mariacarmina e5b4f3d
Increase indexing time.
mariacarmina 3169fec
Fix review part 1.
mariacarmina a99f5eb
modified test.
mariacarmina 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
There are no files selected for viewing
This file contains 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 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 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,22 @@ | ||
export type PriceType = 'fixedrate' | 'dispenser' | ||
|
||
export interface Price { | ||
type: PriceType | ||
price: string | ||
contract: string | ||
token?: string | ||
exchangeId?: string | ||
} | ||
|
||
export interface Stats { | ||
datatokenAddress: string | ||
name: string | ||
symbol: string | ||
serviceId: string | ||
paulo-ocean marked this conversation as resolved.
Show resolved
Hide resolved
|
||
orders?: number | ||
prices?: Price[] | ||
} | ||
|
||
export interface IndexedMetadata { | ||
stats: Stats[] | ||
} |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should probably refactor the interface names to
ServicePrice
(instead ofPrice
)and
ServiceStats
(instead ofStats
) as it was also suggested on the original issue. This way we can easily understand that these fields are related to theservices
. As IS, its not very clear for others