Skip to content

feat: implement x/callback module#501

Merged
spoo-bar merged 23 commits into
mainfrom
feat/callback-module
Jan 9, 2024
Merged

feat: implement x/callback module#501
spoo-bar merged 23 commits into
mainfrom
feat/callback-module

Conversation

@spoo-bar

@spoo-bar spoo-bar commented Nov 8, 2023

Copy link
Copy Markdown
Contributor

Closes: #479

RFC: https://github.com/orgs/archway-network/discussions/25
AIP: #477

The implementation spec can be found under x/callback/spec

* adding proto for callback

* generating proto types
* adding callback module skeleton

* lint fix
* adding params types

* adding params test

* adding param keeper get and set

* fix lint
@codecov

codecov Bot commented Nov 8, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 258 lines in your changes are missing coverage. Please review.

Comparison is base (8c8b7e0) 65.90% compared to head (d6ffa88) 65.61%.

Files Patch % Lines
x/callback/types/msg.go 0.00% 55 Missing ⚠️
x/callback/types/events.go 0.00% 39 Missing ⚠️
x/callback/keeper/msg_server.go 72.07% 28 Missing and 3 partials ⚠️
x/callback/types/callback.go 30.55% 21 Missing and 4 partials ⚠️
x/callback/keeper/callback.go 80.85% 12 Missing and 6 partials ⚠️
x/callback/keeper/grpc_query.go 68.00% 15 Missing and 1 partial ⚠️
x/callback/module.go 65.21% 16 Missing ⚠️
x/callback/keeper/fees.go 64.70% 8 Missing and 4 partials ⚠️
x/callback/types/genesis.go 42.85% 12 Missing ⚠️
x/callback/keeper/keeper.go 79.16% 7 Missing and 3 partials ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #501      +/-   ##
==========================================
- Coverage   65.90%   65.61%   -0.30%     
==========================================
  Files          64       80      +16     
  Lines        3916     4633     +717     
==========================================
+ Hits         2581     3040     +459     
- Misses       1207     1436     +229     
- Partials      128      157      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* adding callback state keepers

* updating block height stuff to use int64 instead of uint64

* cleanup

* adding type validation

* using collections

* fixing the collection stuff

* storing collection schema in keeper

---------

Signed-off-by: Spoorthi <9302666+spoo-bar@users.noreply.github.com>
* params()

* callbacks()

* using dec coin instead of coin

* estimateCallbackFees()

* linting

* refactor the estimate fees endpoint

* linting

* adding review comments
* adding update params

* request callback

* merge updates

* fixing callback proto

* using only native denom for stuff

* handling fees when requesting callback

* linting

* custom error

* addressing pr review comments

* do auth stuff before token transfer

---------

Signed-off-by: Spoorthi <9302666+spoo-bar@users.noreply.github.com>
* executing callbacks in endblocker

* adding docs

* cleanup

* pleasing the linter gods

* adding test for callbackmsg string marshal

* linter. i hate you

* addressing pr review comments

* addressing pr review comments
* adding cli query params

* adding cli query estimate-callback-fees & callbacks

* implementing sdk.Msg interface

* adding cli tx request-callback & cancel-callback

* lint fixes
* removing callbacks from genesis state

* implementing base genesis

* implement init and export genesis

* exporting callbacks in genesis

* exporting callbacks in genesis

* linting
* adding helper methods for x/bank

* returning fees in cancel callback

* handling fees post callback execution

* pr review comments addressing
* creating event types

* adding event emit helpers

* emitting events

* fixing merge

---------

Signed-off-by: Spoorthi <9302666+spoo-bar@users.noreply.github.com>
* implementing callback module app wiring

* adding to upgrade handler

* linting

* registering msg codecs
* adding callback types test

* adding genesis types test

* adding SaveCallback tests

* adding DeleteCallback tests

* adding RequestCallback tests

* adding CancelCallback tests

* linting

* fixing issue when could not save callbacks

* adding callback-test

* adding tests for abci

* adding TestGetCallbacksByHeight

* adding TestGetAllCallbacks

* adding TestIterateCallbacksByHeight

* adding TestCallbacks

* implementing TestEstimateCallbackFees

* fixing issue with out of gas error txfee refund handling

* fixing linting

* cleanup

* cleanup the test  contract

* fixing issue with callback params not being considered

* linting 😶‍🌫️
* Create LICENSE

* adding spec boilerplate

* Update README.md

* Update 01_state.md

* Update 02_messages.md

* Update 03_end_block.md

* Update 04_events.md

* Update 06_wasm_bindings.md

* Update 05_client.md

* typo fixes

* Update CHANGELOG.md
@spoo-bar spoo-bar marked this pull request as ready for review January 2, 2024 11:58
@spoo-bar spoo-bar requested review from a team and aelesbao January 2, 2024 11:58
@spoo-bar spoo-bar requested review from fdymylja and zanicar January 3, 2024 11:14
Comment thread contracts/callback-test/LICENSE Outdated
Comment thread x/callback/LICENSE Outdated
Comment thread x/callback/keeper/fees.go Outdated

@zanicar zanicar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some minor nitpicks and typos that need to be addressed...

@spoo-bar spoo-bar requested a review from zanicar January 4, 2024 14:05

@zanicar zanicar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@fdymylja fdymylja left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! :D

Signed-off-by: Spoorthi <9302666+spoo-bar@users.noreply.github.com>
@fdymylja fdymylja self-requested a review January 9, 2024 17:08
@spoo-bar spoo-bar merged commit 5d3bf97 into main Jan 9, 2024
@spoo-bar spoo-bar deleted the feat/callback-module branch January 9, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: x/callback

3 participants