-
Notifications
You must be signed in to change notification settings - Fork 231
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
feat: Bid pricing based on USD scale #1385
Conversation
bd032d8
to
bb06714
Compare
if [ $curl_exit_status != 0 ]; then | ||
exit $curl_exit_status | ||
fi | ||
usd_per_akt=$(jq '."akash-network"."usd"' <<<"$API_RESPONSE") |
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.
Since this is just bidding do we want to fail here if the answer for this number is 0?
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.
Think we should have a better backup then that, what if the oracle drops completely?
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.
Up on line 65, if curl fails the script fails. No bid happens.
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.
Done
@boz since this is just a script should be put this in a separate repo? |
I think it's okay to add to |
4779275
to
df9cea8
Compare
provider/bidengine/pricing_test.go
Outdated
}) | ||
|
||
go func() { | ||
t.Error(http.ListenAndServe(addr, nil)) |
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.
It is best to use port 0
and get an ephemeral port in tests.
We should also shut down the server before returning.
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.
Done. Added httptest
server which random assigns a port.
f190d7f
to
3b9a57d
Compare
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.
🚀
This PR adds a script that uses the current USD price of an AKT to calculate the bid price.
Description
Motivation and Context
design/approved
labelHow Has This Been Tested?
Types of changes
Checklist:
git commit -s