-
Notifications
You must be signed in to change notification settings - Fork 388
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: token hub #3479
Open
matijamarjanovic
wants to merge
62
commits into
gnolang:master
Choose a base branch
from
matijamarjanovic:feat/token-hub
base: master
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
feat: token hub #3479
Changes from 35 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
6b9ceb7
initial commit
matijamarjanovic 7ec4dc7
-add getter to basic nft and igrc721 interface
matijamarjanovic 7970e42
fix fmt
matijamarjanovic 9c397a5
- add iterate function to grc20reg to be able to get all registered t…
matijamarjanovic a02b955
remove unused var
matijamarjanovic 0931341
add getter to grc1155
matijamarjanovic 04ee40e
-add support for grc1155 (not perfect)
matijamarjanovic af1631f
display different token types on different pages
matijamarjanovic 42152f4
add pagination for grc20 (this includes adding 1 more iteration funct…
matijamarjanovic c07116f
add pagination to grc721 page as well
matijamarjanovic c6ea858
add pagination for grc1155
matijamarjanovic b5967e4
add a getter function for tokens with non zero balances
matijamarjanovic 8727cc6
-update saving grc1155 so it makes most sense
matijamarjanovic 0186c2d
add get and must get for all token types
matijamarjanovic 3181a38
fix fmt
matijamarjanovic 1d7a4bf
Merge branch 'master' into feat/token-hub
matijamarjanovic 3978697
add namespace support
matijamarjanovic fadc509
fix fmt
matijamarjanovic d3af61c
add testing
matijamarjanovic ad2b368
fix up test
matijamarjanovic 2770485
fix fmt
matijamarjanovic 99a5ca7
add getAll tokens + get tokens by type
matijamarjanovic 2ab9221
add tests and remove (fake) test file
matijamarjanovic f084ceb
remove test realm
matijamarjanovic c484774
fix fmt
matijamarjanovic 48c6cd1
more fix fmt
matijamarjanovic c0ca4a5
Merge branch 'master' into feat/token-hub
matijamarjanovic 87aac01
update so nft doesn't allow optional slug, but has to include tokenid
matijamarjanovic 8ab9a26
fix nft registration, now each minted can be registered
matijamarjanovic b107e7d
fix: show only nfts and grc1155 owner has, because there could be who…
matijamarjanovic 936f181
write only key for nfts, no need for balance
matijamarjanovic dabf342
- add get all tokens without nfts
matijamarjanovic c333c42
add different funcs for prevrealm and orig caller
matijamarjanovic 038cb50
- add seing anyones balances
matijamarjanovic d538723
Merge branch 'master' into feat/token-hub
matijamarjanovic 5ed07c2
Merge branch 'master' into feat/token-hub
matijamarjanovic be510bc
Merge branch 'master' into feat/token-hub
matijamarjanovic 8c09725
fix page size, remove test
matijamarjanovic 88b0a7e
make errors start with lowercase
matijamarjanovic 1c4b72a
remove not needed new lines
matijamarjanovic 005e64b
- change slugs to slug
matijamarjanovic 7ac568f
- remove getorigcaller use function
matijamarjanovic 35fa7e2
remove get my balacnces - does the same as getuserbalances for the ca…
matijamarjanovic 3b94b2e
fix naming
matijamarjanovic 0a63572
return the tokens themselves instead of getters
matijamarjanovic 99b44ac
implement return tokens themselves instead of getters in grc1155 too …
matijamarjanovic 3f8bb51
update naming to be consistent
matijamarjanovic b5a8206
remove fqname and just use concat
matijamarjanovic 3c5d8dc
divide realm into multiple files for better readability
matijamarjanovic 43b4b52
render refactor; new functions for each case, use string concat inst…
matijamarjanovic 59586e5
- change the pagination implement pager from p/demo/avl
matijamarjanovic f48d034
-refactor private getter
matijamarjanovic 9b9767f
optimization so each token types should be gettable separately to red…
matijamarjanovic 385fdf9
add get non zero balances
matijamarjanovic c9edff9
add formatting, fix ufmt print
matijamarjanovic 1c598a3
move errors in separate file for better readability
matijamarjanovic a946cc4
add documentation
matijamarjanovic 92305e9
Merge branch 'master' into feat/token-hub
matijamarjanovic 93075f3
add working tests
matijamarjanovic 387ebd9
\n placement
matijamarjanovic 7be170b
fix fmt
matijamarjanovic 1e0f60c
fix fmt again
matijamarjanovic 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
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 |
---|---|---|
|
@@ -26,3 +26,5 @@ const ( | |
ApprovalEvent = "Approval" | ||
ApprovalForAllEvent = "ApprovalForAll" | ||
) | ||
|
||
type NFTGetter func() IGRC721 |
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 @@ | ||
module gno.land/r/matijamarjanovic/tokenhub |
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.
Don't do this. Make a readonly tree getter instead (check avl folder), and use the
avl/pager
library in your smart contract.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.
Thanks for the advice, the code looks much better now and I can imagine the performance is better as well. See changes 59586e5