-
Notifications
You must be signed in to change notification settings - Fork 189
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
[Sozo] Output block # after successful migration #687
Comments
Great idea! @aymericdelab and I had the exact same thought yesterday |
Ugh commented on the wrong issue. Meant to say it here - Ah just occurred to me, perhaps an enhancement to sozo migrate is updating the manifest to include block_height and rpc_url after migration, this way torii just needs the manifest param to start indexing. manifest.json "rpc_url" : "https://rinnegan.madara.zone", |
i can give this a try |
@broody do you mean Also is the |
Thanks! I believe @tarrencev had some thoughts about manifest.json, could possibly address in another issue. Being able to output block height on just
Right, I had added that as an example to illustrate.
From torii perspective, we just need it for world contract, but perhaps good idea to include for all. |
Okay then i will clean up the linked PR and change from draft to ready for review tonight |
@lambda-0x thanks for your contribution here! I think adding chain specific deployment information to the manifest is a great idea too. Would you like to make a proposal on the schema? |
@tarrencev i am not really sure what kind of information would be useful, i can think of Is there anything else that might be helpful? |
Possible information + a schema off the top of my head is:
Not all of that is strictly necessary, but might be useful to store rather than having to compute / derive the values |
currently schema is somewhat like this (have remove nested parts):{
"world": {
"name": "$name",
"address": "$ADDRESS",
"class_hash": "$ADDRESS"
},
"executor": {
"name": "$name",
"address": "$ADDRESS",
"class_hash": "$ADDRESS"
},
"systems": [
{
"name": "$name",
"inputs": [],
"outputs": [],
"class_hash": "$ADDRESS",
"dependencies": []
}
],
"contracts": [
{
"name": "$name",
"class_hash": "$ADDRESS",
"address": "$ADDRESS"
}
],
"components": [
{
"name": "$name",
"members": [],
"class_hash": "$ADDRESS"
}
]
} i think there was a PR on sozo allowing it to deploy multiple here is the struct that holds dojo/crates/dojo-world/src/manifest.rs Lines 88 to 94 in 778ca04
|
nvm world contract is redeployed when there is atleast one change so current message makes sense. |
I think that is a good question. Should a manifest be per chain deployment? In that case, a manifest corresponds to a particular chain. That probably makes most sense? Then we can track a single deployment per manifest |
as discussed with @tarrencev I have clean up the linked PR for this issue and marked it for review. |
When migrating world, it would be useful to show the block number the world contract was deployed on. Useful to have when starting torii with
--start-block
. Currently using another cli to get this value prior to migration.Perhaps something like this?
🎉 Successfully migrated World on block #1337 at address 0x788f5fd335d29ed5f8686982079cc3aa9c82aa41968f759b2c3d0be8d5fa0c4
The text was updated successfully, but these errors were encountered: