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

Implementation of the where api #1199

Closed
wants to merge 184 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
e4303a8
reenabled index and added interface with keys
Sep 9, 2023
940cae8
getting by key
Sep 9, 2023
4743f5e
bidirectional reference for keys and debug
Sep 9, 2023
5e5b4ce
commented out test
Sep 9, 2023
79060f8
a placeholder for key deletion
Sep 11, 2023
1e71ae1
using index in database
Sep 11, 2023
6e00168
using new api in world
Sep 11, 2023
c0da825
simple test entities in world
Sep 11, 2023
8f384fa
add .vscode to .gitignore
neotheprogramist Sep 11, 2023
e2ba615
disable indexing by default
neotheprogramist Sep 11, 2023
eea4f68
fix tests
neotheprogramist Sep 11, 2023
029728a
doc comments
matzayonc Sep 11, 2023
aa7f753
added new test cases
verzotokumpel Sep 13, 2023
d33c498
improved some tests
verzotokumpel Sep 13, 2023
9fccc08
updating indexer to use layouts
matzayonc Sep 25, 2023
ca3dd24
run with CAIRO_FIX_TESTS=1
neotheprogramist Sep 25, 2023
07210d6
clippy
neotheprogramist Sep 25, 2023
34f3318
updated test_entities for new api
matzayonc Sep 25, 2023
8472d89
rebase and comments
matzayonc Sep 28, 2023
a280cfe
ci trigger
matzayonc Sep 28, 2023
b725a64
Remove partitions
tarrencev Sep 28, 2023
4a96d90
Propose api
tarrencev Sep 28, 2023
975e3fb
made future interface compile
Oct 2, 2023
0515480
update after rebase
Oct 3, 2023
2a6eb79
stripping unneeded
Oct 3, 2023
b592ee3
test fixes
Oct 3, 2023
bdf8438
removed keys_layout
Oct 3, 2023
a58686d
moved index over values to separate file
Oct 3, 2023
dfd8f18
working index with values
Oct 3, 2023
496e71d
entry deletion
Oct 3, 2023
dce8712
cleaned up indexes
Oct 3, 2023
ad399b5
universal index
Oct 4, 2023
0343f80
where condition from entities method
Oct 4, 2023
636dcb1
creating indexes with values
Oct 4, 2023
883c660
tests and a fix
Oct 6, 2023
14191e4
added pagination capabilities
Oct 6, 2023
817e9c4
added key storage and deletion
Oct 6, 2023
7f130a5
simplified key deletion
Oct 6, 2023
50dfc53
deletion test
Oct 6, 2023
04f1c2b
fix after rebase
Oct 6, 2023
9d28ba0
CAIRO_TEST_FIX=1
Oct 6, 2023
2b391ff
fixed out of gas errors
Oct 9, 2023
43c59e7
fix after rebase
Oct 9, 2023
d0ce033
removed rebase leftover
Oct 9, 2023
f0c4150
added clause type
Oct 12, 2023
a9924e5
test fix after pull
Oct 12, 2023
9efdda8
fix entity_ids
neotheprogramist Oct 16, 2023
aa26a7b
CAIRO_FIX_TESTS=1
neotheprogramist Oct 16, 2023
479de11
array instead of serialization
Oct 21, 2023
36a7761
fixes
Oct 21, 2023
4255c8f
simple test entities in world
Sep 11, 2023
ae3fcd9
updating indexer to use layouts
matzayonc Sep 25, 2023
9aae93b
tests and a fix
Oct 6, 2023
8047e5f
added clause type
Oct 12, 2023
886dd8a
fixes after rebase
Oct 21, 2023
cb8db04
fixes after rebase
Oct 21, 2023
5373a7f
CAIRO_FIX_TESTS=1
Oct 21, 2023
f765774
CAIRO_FIX_TESTS=1
neotheprogramist Oct 27, 2023
4afaacb
fix gas
neotheprogramist Oct 30, 2023
16d4b2a
remove old test
neotheprogramist Nov 3, 2023
0c4e239
fixes after merge
Nov 6, 2023
59c54aa
just hardcoded new value
matzayonc Nov 12, 2023
921809a
hardcoded value comment
matzayonc Nov 12, 2023
be6773c
Merge main
tarrencev Nov 21, 2023
d9f4ea8
Update clause api to match grpc
tarrencev Nov 21, 2023
520a765
Refactor indexing
tarrencev Nov 22, 2023
49f5504
Merge remote-tracking branch 'origin/main' into 9-implementation-of-t…
tarrencev Nov 22, 2023
b9fa2bf
Fix cargo tests
tarrencev Nov 22, 2023
c45c5a9
Hardcode plugin version (#1208)
tarrencev Nov 27, 2023
7b72792
Graphql `where` input type check (#1209)
broody Nov 27, 2023
cb91c21
Cleanup release.yml
tarrencev Nov 27, 2023
a253b0c
Prepare v0.3.13
tarrencev Nov 27, 2023
bbb932f
make world upgradeable (#1210)
notV4l Nov 27, 2023
84fbcb7
Rename grpc attribute clause to member (#1211)
broody Nov 27, 2023
8c2f0d9
refactor(spawn-and-move): up to date readme (#1212)
Larkooo Nov 27, 2023
09115ef
Refactor torii core add entity_model table (#1213)
broody Nov 28, 2023
4b3041a
reenabled index and added interface with keys
Sep 9, 2023
3cf0fbc
getting by key
Sep 9, 2023
9d6e8e2
bidirectional reference for keys and debug
Sep 9, 2023
0d4863d
commented out test
Sep 9, 2023
751e0e4
a placeholder for key deletion
Sep 11, 2023
ba545f1
using index in database
Sep 11, 2023
4a7fe8f
using new api in world
Sep 11, 2023
e39bbc9
simple test entities in world
Sep 11, 2023
2bedfea
add .vscode to .gitignore
neotheprogramist Sep 11, 2023
107aabc
disable indexing by default
neotheprogramist Sep 11, 2023
29ec18d
fix tests
neotheprogramist Sep 11, 2023
d0814a3
doc comments
matzayonc Sep 11, 2023
ff2a850
added new test cases
verzotokumpel Sep 13, 2023
0a583f3
improved some tests
verzotokumpel Sep 13, 2023
c25a0eb
updating indexer to use layouts
matzayonc Sep 25, 2023
b135bff
run with CAIRO_FIX_TESTS=1
neotheprogramist Sep 25, 2023
7558656
clippy
neotheprogramist Sep 25, 2023
623a2e5
updated test_entities for new api
matzayonc Sep 25, 2023
3af9991
rebase and comments
matzayonc Sep 28, 2023
d17e49f
ci trigger
matzayonc Sep 28, 2023
345a278
Remove partitions
tarrencev Sep 28, 2023
ad304ba
Propose api
tarrencev Sep 28, 2023
d317078
made future interface compile
Oct 2, 2023
098a8fc
update after rebase
Oct 3, 2023
ebcb6ff
stripping unneeded
Oct 3, 2023
ec77d8c
test fixes
Oct 3, 2023
cfc9d1d
removed keys_layout
Oct 3, 2023
ace6e3c
moved index over values to separate file
Oct 3, 2023
5748f74
working index with values
Oct 3, 2023
1a74a56
entry deletion
Oct 3, 2023
a3ab682
cleaned up indexes
Oct 3, 2023
153c235
universal index
Oct 4, 2023
ee05d90
where condition from entities method
Oct 4, 2023
3af0395
creating indexes with values
Oct 4, 2023
73cc0d5
tests and a fix
Oct 6, 2023
2b01276
added pagination capabilities
Oct 6, 2023
6554234
added key storage and deletion
Oct 6, 2023
ded3051
simplified key deletion
Oct 6, 2023
66252c1
deletion test
Oct 6, 2023
51f6c82
fix after rebase
Oct 6, 2023
66fb813
CAIRO_TEST_FIX=1
Oct 6, 2023
11f0efc
fix after rebase
Oct 9, 2023
3f6c95b
added clause type
Oct 12, 2023
a82678a
test fix after pull
Oct 12, 2023
9e88a04
fix entity_ids
neotheprogramist Oct 16, 2023
a76787f
CAIRO_FIX_TESTS=1
neotheprogramist Oct 16, 2023
f355413
array instead of serialization
Oct 21, 2023
39d26d5
fixes
Oct 21, 2023
ed52836
simple test entities in world
Sep 11, 2023
a703a5a
updating indexer to use layouts
matzayonc Sep 25, 2023
674fb3e
tests and a fix
Oct 6, 2023
90ba900
added clause type
Oct 12, 2023
f3b56ef
fixes after rebase
Oct 21, 2023
6e9f58f
fixes after rebase
Oct 21, 2023
e12a0d2
CAIRO_FIX_TESTS=1
Oct 21, 2023
ec35a03
remove old test
neotheprogramist Nov 3, 2023
382e935
fixes after merge
Nov 6, 2023
e3ad86a
hardcoded value comment
matzayonc Nov 12, 2023
4563cfb
Update clause api to match grpc
tarrencev Nov 21, 2023
78f23b2
Refactor indexing
tarrencev Nov 22, 2023
6069d35
assert to check for empty index
matzayonc Nov 23, 2023
1c651e7
member position in model in clause
matzayonc Nov 28, 2023
7e6083e
fix after rebase
matzayonc Nov 28, 2023
061874e
reenabled index and added interface with keys
Sep 9, 2023
288c628
commented out test
Sep 9, 2023
bac96a8
using index in database
Sep 11, 2023
ded67b3
using new api in world
Sep 11, 2023
b7dcef4
simple test entities in world
Sep 11, 2023
a948101
add .vscode to .gitignore
neotheprogramist Sep 11, 2023
6ece1da
doc comments
matzayonc Sep 11, 2023
ef5829e
updating indexer to use layouts
matzayonc Sep 25, 2023
1ad2f5d
run with CAIRO_FIX_TESTS=1
neotheprogramist Sep 25, 2023
6ce13ea
clippy
neotheprogramist Sep 25, 2023
b9cd247
updated test_entities for new api
matzayonc Sep 25, 2023
8268a49
rebase and comments
matzayonc Sep 28, 2023
2479119
ci trigger
matzayonc Sep 28, 2023
11e393b
Remove partitions
tarrencev Sep 28, 2023
173e825
Propose api
tarrencev Sep 28, 2023
c575c97
made future interface compile
Oct 2, 2023
1530099
update after rebase
Oct 3, 2023
6ba8180
stripping unneeded
Oct 3, 2023
30efe55
test fixes
Oct 3, 2023
d1ac8cf
removed keys_layout
Oct 3, 2023
371003e
moved index over values to separate file
Oct 3, 2023
36dd57f
working index with values
Oct 3, 2023
e0f0bc9
entry deletion
Oct 3, 2023
3124e40
cleaned up indexes
Oct 3, 2023
1741c73
universal index
Oct 4, 2023
c5c891d
where condition from entities method
Oct 4, 2023
8d105ce
creating indexes with values
Oct 4, 2023
5879263
tests and a fix
Oct 6, 2023
a26fbb9
added pagination capabilities
Oct 6, 2023
8e7751b
added key storage and deletion
Oct 6, 2023
de5cd81
simplified key deletion
Oct 6, 2023
b83d5ac
deletion test
Oct 6, 2023
7bc4223
added clause type
Oct 12, 2023
886c0d2
simple test entities in world
Sep 11, 2023
0c0fba7
updating indexer to use layouts
matzayonc Sep 25, 2023
82328f6
fixes after rebase
Oct 21, 2023
0190b69
remove old test
neotheprogramist Nov 3, 2023
7daa23f
fixes after merge
Nov 6, 2023
5e9c657
Update clause api to match grpc
tarrencev Nov 21, 2023
f41216e
Refactor indexing
tarrencev Nov 22, 2023
e9bb56f
Fix cargo tests
tarrencev Nov 22, 2023
901c6d6
updated hardcoded class as fixed on other branch
matzayonc Nov 29, 2023
6069856
Merge branch '9-implementation-of-the-where-api' of github.com:dojoen…
matzayonc Nov 30, 2023
2460339
updated contract address
matzayonc Nov 30, 2023
d8a11fa
Merge branch '9-implementation-of-the-where-api' of https://github.co…
matzayonc Nov 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions examples/spawn-and-move/README.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ sozo build
sozo migrate

# Get the class hash of the Moves model by name
sozo model get --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves
sozo model class-hash --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves
> 0x2b97f0b24be59ecf4504a27ac2301179be7df44c4c7d9482cd7b36137bc0fa4

# Get the schema of the Moves model
@@ -24,14 +24,14 @@ sozo model schema --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219f
# Get the value of the Moves model for an entity. (in this example,
# 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973 is
# the calling account.
sozo model entity --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973
sozo model get --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973
> 0x0

# The returned value is 0 since we haven't spawned yet. Let's spawn
# a player for the caller
sozo execute --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 spawn
# The returned value is 0 since we haven't spawned yet.
# We can spawn a player using the actions contract address
sozo execute 0x31571485922572446df9e3198a891e10d3a48e544544317dbcbb667e15848cd spawn

# Fetch the updated entity
sozo model entity --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973
sozo model get --world 0x26065106fa319c3981618e7567480a50132f23932226a51c219ffb8e47daa84 Moves 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973
> 0xa
```