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

Add DfTx for Create & Resign MasterNode #283

Merged
merged 10 commits into from
May 27, 2021

Conversation

ivan-zynesis
Copy link
Contributor

What kind of PR is this?:

/kind feature

What this PR does / why we need it:

  • for explorer to decode
  • to create/resign masternode in future

Which issue(s) does this PR fixes?:

Fixes #

Additional comments?:

@codeclimate
Copy link

codeclimate bot commented May 24, 2021

Code Climate has analyzed commit 627104f and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@ivan-zynesis ivan-zynesis mentioned this pull request May 24, 2021
17 tasks
@github-actions
Copy link

github-actions bot commented May 24, 2021

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/jellyfish/dist/jellyfish.umd.js 19.16 KB (0%) 384 ms (0%) 166 ms (-2.04% 🔽) 549 ms

@ivan-zynesis ivan-zynesis marked this pull request as ready for review May 24, 2021 11:31
@codecov
Copy link

codecov bot commented May 24, 2021

Codecov Report

Merging #283 (627104f) into main (9c238a0) will increase coverage by 0.39%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #283      +/-   ##
==========================================
+ Coverage   96.49%   96.89%   +0.39%     
==========================================
  Files          85       89       +4     
  Lines        2228     2380     +152     
  Branches      287      304      +17     
==========================================
+ Hits         2150     2306     +156     
+ Misses         78       74       -4     
Impacted Files Coverage Δ
...ellyfish-transaction/src/buffer/buffer_composer.ts 99.46% <100.00%> (+0.08%) ⬆️
...ages/jellyfish-transaction/src/script/defi/dftx.ts 97.01% <100.00%> (+0.93%) ⬆️
...ish-transaction/src/script/defi/dftx_masternode.ts 100.00% <100.00%> (ø)
...ckages/jellyfish-transaction/src/script/mapping.ts 96.20% <100.00%> (+0.96%) ⬆️
packages/jellyfish-api-core/src/category/wallet.ts 100.00% <0.00%> (ø)
...ages/jellyfish-api-core/src/category/blockchain.ts 100.00% <0.00%> (ø)
...ellyfish-transaction/src/script/defi/dftx_token.ts 100.00% <0.00%> (ø)
...tcontainers/src/chains/reg_test_container/index.ts 100.00% <0.00%> (ø)
...lyfish-transaction/src/script/defi/dftx_oracles.ts 100.00% <0.00%> (ø)
... and 7 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 9c238a0...627104f. Read the comment docs.

@fuxingloh fuxingloh changed the title Feature/dftx scripting/create remove mn Add DfTx for Create & Resign MasterNode May 24, 2021
@fuxingloh fuxingloh marked this pull request as draft May 24, 2021 16:00
@netlify
Copy link

netlify bot commented May 25, 2021

Deploy Preview for jellyfish-defi ready!

Built with commit d08aeef

https://deploy-preview-283--jellyfish-defi.netlify.app

@ivan-zynesis ivan-zynesis marked this pull request as ready for review May 25, 2021 06:45
Copy link
Collaborator

@fuxingloh fuxingloh left a comment

Choose a reason for hiding this comment

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

1 minor change in BufferComposer

@fuxingloh fuxingloh marked this pull request as draft May 25, 2021 08:25
@ivan-zynesis ivan-zynesis marked this pull request as ready for review May 25, 2021 09:34
@fuxingloh
Copy link
Collaborator

Failing test, wrong error message

@fuxingloh fuxingloh marked this pull request as draft May 25, 2021 12:20
@fuxingloh fuxingloh marked this pull request as ready for review May 26, 2021 11:48
@fuxingloh fuxingloh enabled auto-merge (squash) May 26, 2021 11:48
@fuxingloh fuxingloh merged commit 2713333 into main May 27, 2021
@fuxingloh fuxingloh deleted the feature/dftx-scripting/create-remove-mn branch May 27, 2021 02:05
eli-lim pushed a commit that referenced this pull request Mar 27, 2022
* added dftx.indexer scaffolding

* rewrote oracle into forward aggregation

* added controller

* added client oracles.ts

* fix aggregated derivation

* separated price client

* refactor index

* added price ticker

* fixed dftx indexer issues

* completed prices tests

* fixed existing test failures

* completed oracle invalidate test

* fixed update.oracle.ts uncertainty test

* Added interval indexers

* Fixed tests

* Modified interval to use time

* Aggregate if no previous entries

* Invalidate changes

* Median time is in seconds

* Added passing tests for interval indexer

* Get rid of old controller names

* Added controller functionality

* Added controller functionality

* Added whale api and tests

* Fix code smell

* Improve test coverage

* Add greater than for prices

* Sum up previous prices

* Better aggregation

* Fixed tests

* Update packages/whale-api-client/src/api/prices.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* Change url

* Update packages/whale-api-client/src/api/oracles.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* Increase limit

* Fix test

* Fix tests

* Fix test url

* Update src/module.indexer/model/dftx/set.oracle.data.ts

Co-authored-by: Ivan Lee <44192990+ivan-zynesis@users.noreply.github.com>

* Convert to key

* Averaged

* Fix client tests

* Implement forward aggregation

* Comments

* Add parse int pipe

* Fix typo in tests

* Reduce indentation depth and remove spread operator

* Added invalidation

* Revised algorithm

* Split out into another indexer

* Update src/module.indexer/model/dftx/set.oracle.data.interval.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* Update src/module.indexer/model/dftx/set.oracle.data.interval.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* PR Feedback

* Fix tests

Co-authored-by: Fuxing Loh <git@fuxing.dev>
Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>
Co-authored-by: Ivan Lee <44192990+ivan-zynesis@users.noreply.github.com>
canonbrother pushed a commit that referenced this pull request Jun 1, 2022
* added dftx.indexer scaffolding

* rewrote oracle into forward aggregation

* added controller

* added client oracles.ts

* fix aggregated derivation

* separated price client

* refactor index

* added price ticker

* fixed dftx indexer issues

* completed prices tests

* fixed existing test failures

* completed oracle invalidate test

* fixed update.oracle.ts uncertainty test

* Added interval indexers

* Fixed tests

* Modified interval to use time

* Aggregate if no previous entries

* Invalidate changes

* Median time is in seconds

* Added passing tests for interval indexer

* Get rid of old controller names

* Added controller functionality

* Added controller functionality

* Added whale api and tests

* Fix code smell

* Improve test coverage

* Add greater than for prices

* Sum up previous prices

* Better aggregation

* Fixed tests

* Update packages/whale-api-client/src/api/prices.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* Change url

* Update packages/whale-api-client/src/api/oracles.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* Increase limit

* Fix test

* Fix tests

* Fix test url

* Update src/module.indexer/model/dftx/set.oracle.data.ts

Co-authored-by: Ivan Lee <44192990+ivan-zynesis@users.noreply.github.com>

* Convert to key

* Averaged

* Fix client tests

* Implement forward aggregation

* Comments

* Add parse int pipe

* Fix typo in tests

* Reduce indentation depth and remove spread operator

* Added invalidation

* Revised algorithm

* Split out into another indexer

* Update src/module.indexer/model/dftx/set.oracle.data.interval.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* Update src/module.indexer/model/dftx/set.oracle.data.interval.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* PR Feedback

* Fix tests

Co-authored-by: Fuxing Loh <git@fuxing.dev>
Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>
Co-authored-by: Ivan Lee <44192990+ivan-zynesis@users.noreply.github.com>
canonbrother pushed a commit that referenced this pull request Jun 1, 2022
* added dftx.indexer scaffolding

* rewrote oracle into forward aggregation

* added controller

* added client oracles.ts

* fix aggregated derivation

* separated price client

* refactor index

* added price ticker

* fixed dftx indexer issues

* completed prices tests

* fixed existing test failures

* completed oracle invalidate test

* fixed update.oracle.ts uncertainty test

* Added interval indexers

* Fixed tests

* Modified interval to use time

* Aggregate if no previous entries

* Invalidate changes

* Median time is in seconds

* Added passing tests for interval indexer

* Get rid of old controller names

* Added controller functionality

* Added controller functionality

* Added whale api and tests

* Fix code smell

* Improve test coverage

* Add greater than for prices

* Sum up previous prices

* Better aggregation

* Fixed tests

* Update packages/whale-api-client/src/api/prices.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* Change url

* Update packages/whale-api-client/src/api/oracles.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* Increase limit

* Fix test

* Fix tests

* Fix test url

* Update src/module.indexer/model/dftx/set.oracle.data.ts

Co-authored-by: Ivan Lee <44192990+ivan-zynesis@users.noreply.github.com>

* Convert to key

* Averaged

* Fix client tests

* Implement forward aggregation

* Comments

* Add parse int pipe

* Fix typo in tests

* Reduce indentation depth and remove spread operator

* Added invalidation

* Revised algorithm

* Split out into another indexer

* Update src/module.indexer/model/dftx/set.oracle.data.interval.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* Update src/module.indexer/model/dftx/set.oracle.data.interval.ts

Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>

* PR Feedback

* Fix tests

Co-authored-by: Fuxing Loh <git@fuxing.dev>
Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>
Co-authored-by: Ivan Lee <44192990+ivan-zynesis@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants