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

[Editions] Dojo #559

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

[Editions] Dojo #559

wants to merge 10 commits into from

Conversation

caillef
Copy link
Collaborator

@caillef caillef commented Jun 13, 2024

This branch is a separate version of Cubzh that won't replace the main version.

This is a special edition that embeds the Dojo SDK that is not available in the main version.

First interface

local torii_url = "http://localhost:8080"
local rpc_url = "http://localhost:3000"
local world = "0x01385f25d20a724edc9c7b3bd9636c59af64cbaf9fcd12f33b3af96b2452f295"
local playerKey = "0x02038e0daba5c3948a6289e91e2a68dfc28e734a281c753933b8bd331e6d3dae"
local entities = {
    { model = "Position", keysData = { player_key } }
}
local toriiClient, error = Dojo.NewToriiClient(torii_url, rpc_url, "/ip4/127.0.0.1/tcp/9090", world, entities, 1)
local burnerAddress, error = toriiClient:createBurner()
local entities, error = toriiClient:entities(query)
for _,entity in ipairs(entities) do
    print(entity.id, entity.name)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge yet not ready to be merged yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant