Skip to content
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(jellyfish-api-core): Add oracle getFutureSwapBlock RPC for dfip2203 futures #1322

Merged
merged 13 commits into from
Apr 9, 2022

Conversation

jingyi2811
Copy link
Contributor

@jingyi2811 jingyi2811 commented Apr 5, 2022

What this PR does / why we need it:

Add getFutureSwapBlock RPC

Which issue(s) does this PR fixes?:

Fixes part of #1268

Additional comments?:

@codeclimate
Copy link

codeclimate bot commented Apr 5, 2022

Code Climate has analyzed commit 6c1d68f and detected 0 issues on this pull request.

View more on Code Climate.

@netlify
Copy link

netlify bot commented Apr 5, 2022

Deploy Preview for jellyfish-defi ready!

Name Link
🔨 Latest commit 6c1d68f
🔍 Latest deploy log https://app.netlify.com/sites/jellyfish-defi/deploys/62514661e97c66000859160a
😎 Deploy Preview https://deploy-preview-1322--jellyfish-defi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented Apr 5, 2022

Codecov Report

Merging #1322 (6c1d68f) into main (57daee6) will increase coverage by 1.09%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1322      +/-   ##
==========================================
+ Coverage   89.77%   90.87%   +1.09%     
==========================================
  Files         348      348              
  Lines       10008    10008              
  Branches     1222     1222              
==========================================
+ Hits         8985     9095     +110     
+ Misses        978      869     -109     
+ Partials       45       44       -1     
Impacted Files Coverage Δ
...ackages/jellyfish-api-core/src/category/account.ts 95.77% <0.00%> (-4.23%) ⬇️
packages/jellyfish-api-jsonrpc/src/index.ts 97.67% <0.00%> (-2.33%) ⬇️
...e/src/module.indexer/model/dftx/set.oracle.data.ts 94.82% <0.00%> (+1.72%) ⬆️
apps/whale/src/module.api/loan.controller.ts 93.13% <0.00%> (+1.96%) ⬆️
packages/jellyfish-address/src/script/index.ts 100.00% <0.00%> (+2.04%) ⬆️
packages/jellyfish-testing/src/testing.ts 100.00% <0.00%> (+2.63%) ⬆️
...ages/jellyfish-transaction/src/script/dftx/dftx.ts 98.50% <0.00%> (+2.98%) ⬆️
...ellyfish-transaction-signature/src/tx_signature.ts 94.25% <0.00%> (+3.44%) ⬆️
packages/jellyfish-address/src/script/P2WSH.ts 100.00% <0.00%> (+4.54%) ⬆️
...ckages/jellyfish-transaction/src/script/mapping.ts 98.00% <0.00%> (+5.33%) ⬆️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57daee6...6c1d68f. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Apr 5, 2022

Docker build preview for jellyfish/apps is ready!

Built with commit 8e062e1

  • ghcr.io/defich/legacy-api:pr-1322
  • ghcr.io/defich/ocean-api:pr-1322
  • ghcr.io/defich/playground-api:pr-1322
  • ghcr.io/defich/status-api:pr-1322

@jingyi2811
Copy link
Contributor Author

jingyi2811 commented Apr 6, 2022

For reviewer(s),

  1. GetFutureSwapBlock RPC is independent of Oracle, Loan, User accounts, or RPC like futureswap. The value of GetFutureSwapBlock RPC is ONLY determined by Gov attributes, block count or futureInterval values.

  2. Gov attributes: active = false can only be set BEFORE reward_pct and block_period values are set. Gov attributes: active = true can only be set AFTER reward_pct and block_period values are set.

@jingyi2811 jingyi2811 marked this pull request as ready for review April 6, 2022 09:08
@jingyi2811 jingyi2811 changed the title Add getFutureSwapBlock RPC feat(jellyfish-api-core): Add oracle getFutureSwapBlock RPC for dfip2203 futures Apr 6, 2022
@defichain-bot defichain-bot added the kind/feature New feature request label Apr 6, 2022
canonbrother
canonbrother previously approved these changes Apr 7, 2022
…apblock

# Conflicts:
#	docs/node/CATEGORIES/09-oracle.md
#	packages/testcontainers/src/containers/DeFiDContainer.ts
@fuxingloh fuxingloh merged commit fa355c4 into main Apr 9, 2022
@fuxingloh fuxingloh deleted the jimmy/rpc-getfutureswapblock branch April 9, 2022 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants