Skip to content

Commit

Permalink
Market packed2 (#379)
Browse files Browse the repository at this point in the history
* use overlays

* use CallData.compile

* sepolia & controller

* ui & connector update

* moar fixes

* vh -> dvh

* volume for music & effects

* add game export

* sepolia & controller

* approve & create_game in session

* fix build
  • Loading branch information
notV4l authored Jun 20, 2024
1 parent 90db598 commit 4bfb18d
Show file tree
Hide file tree
Showing 159 changed files with 9,057 additions and 2,914 deletions.
21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
target
abis

/manifests
genesis.json

/manifests/*

!/manifests/dev
/manifests/dev/*
!/manifests/dev/overlays

!/manifests/ryo420
/manifests/ryo420/*
!/manifests/ryo420/overlays

!/manifests/ryo421
/manifests/ryo421/*
!/manifests/ryo421/overlays

!/manifests/ryosepolia
/manifests/ryosepolia/*
!/manifests/ryosepolia/overlays


2 changes: 1 addition & 1 deletion Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version = 1

[[package]]
name = "dojo"
version = "0.6.0"
version = "0.7.2"
dependencies = [
"dojo_plugin",
]
Expand Down
31 changes: 19 additions & 12 deletions Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ version = "0.1.0"
# sierra-replace-ids = true

[dependencies]
# dojo = {git = "https://github.com/dojoengine/dojo", tag = "v0.7.0-alpha.1"}
# token = { git = "https://github.com/dojoengine/origami", tag = "v0.7.0-alpha.1"}
# dojo = {git = "https://github.com/dojoengine/dojo", tag = "v0.7.1"}
# token = { git = "https://github.com/dojoengine/origami", tag = "v0.7.1"}
dojo = { path = "../dojo/crates/dojo-core" }
token = { path = "../origami" }

Expand All @@ -26,25 +26,24 @@ auth = "./scripts/default_auth.sh"


# migrate && scarb run gendojo $PROFILE
migrate = "PROFILE=dev && sozo -P $PROFILE build && sozo -P $PROFILE migrate apply && scarb run copy_manifest $PROFILE && scarb run gendojo $PROFILE && scarb run auth $PROFILE"
migrate = "PROFILE=dev && sozo -P $PROFILE build && sozo -P $PROFILE migrate apply -vvv && scarb run copy_manifest $PROFILE && scarb run gendojo $PROFILE && scarb run auth $PROFILE"
migrate_ryo420 = "PROFILE=ryo420 && sozo -P $PROFILE build && sozo -P $PROFILE migrate apply && scarb run copy_manifest $PROFILE && scarb run auth $PROFILE"
migrate_ryo421 = "PROFILE=ryo421 && sozo -P $PROFILE build && sozo -P $PROFILE migrate apply && scarb run copy_manifest $PROFILE && scarb run gendojo $PROFILE && scarb run auth $PROFILE"

migrateplan_sepolia = "PROFILE=ryosepolia && sozo -P $PROFILE build && sozo -P $PROFILE migrate plan --name ryo000"
migrate_sepolia = "PROFILE=ryosepolia && sozo -P $PROFILE build && sozo -P $PROFILE migrate apply --name ryo000 --fee-estimate-multiplier 5 && scarb run copy_manifest $PROFILE"
migrateplan_sepolia = "PROFILE=ryosepolia && sozo -P $PROFILE build && sozo -P $PROFILE migrate plan --name ryo003"
migrate_sepolia = "PROFILE=ryosepolia && sozo -P $PROFILE build && sozo -P $PROFILE migrate apply -vvv --name ryo003 --fee-estimate-multiplier 5 && scarb run copy_manifest $PROFILE"
auth_sepolia = "PROFILE=ryosepolia && scarb run auth $PROFILE"

# slot ryo420
slot_ryo420_katana = "slot d create ryo420 katana --version v0.7.0-alpha.5 -a 4 -b 5000 --disable-fee true --invoke-max-steps 1000000"
slot_ryo420_torii = "slot d create ryo420 torii --rpc https://api.cartridge.gg/x/ryo420/katana -s 0 --index-pending true --version v0.7.0-alpha.5 --world 0x78fcdfcc137fa18770f660ba2e8a3cf263907df38dfd462dc4dda048979c011"

# slot ryo421
slot_ryo421_katana = "slot d create ryo421 katana --seed 421 --version v0.7.0-alpha.3 --chain-id KATANA_SLOT_421 -b 1000 --disable-fee true --invoke-max-steps 2000000"
slot_ryo421_torii = "slot d create ryo421 torii --rpc https://api.cartridge.gg/x/ryo421/katana -s 0 --index-pending true --version v0.7.0-alpha.3 --world 0x45780a1a9786ee6bcd2e347d43d717a385dbd72e8282676d891835e0a278d14"
slot_ryo421_katana = "slot d create ryo421 katana --seed 421 --version v0.7.1 -a 4 -b 5000 --disable-fee true --invoke-max-steps 1000000"
slot_ryo421_torii = "slot d create ryo421 torii --rpc https://api.cartridge.gg/x/ryo421/katana -s 0 --index-pending true --version v0.7.1 --world 0x2f569ad903a00476656bec6a74c954ef01e48202652bbab0149574d5f6d829"

# slot ryo_sepolia
slot_ryosepolia_torii = "slot d create ryosepolia torii --rpc https://api.cartridge.gg/rpc/starknet-sepolia -s 63200 --version v0.7.0-alpha.1 --world 0x45d3b72e3c6c85c38d43798b9751817f14fac4b14c3645480683f8fae1c6464"
# --index-pending
slot_ryosepolia_torii = "slot d create ryosepolia torii --rpc https://api.cartridge.gg/rpc/starknet-sepolia -s 75075 --index-pending true --version v0.7.2 --world 0x2fc5b78f171fd1d6a5842276902dcbd91c770fb01e56bc293392e3931ffe817"


[[target.dojo]]
Expand Down Expand Up @@ -73,9 +72,8 @@ account_address = "0x7d806fc9478c73c60fac37c27888771bdb3092c21eb93452277e7673954
private_key = "0x784b1dd14d761c414c6394fccca3ca1d1b0cac187e88122e4b06378f9e8c515"

[profile.ryosepolia.tool.dojo.env]
# world_address= "0x45d3b72e3c6c85c38d43798b9751817f14fac4b14c3645480683f8fae1c6464"
# rpc_url = "https://api.cartridge.gg/rpc/starknet-sepolia"
rpc_url = "https://starknet-sepolia.g.alchemy.com/v2/AQxmz1FjMPH2mY7wc3er677SdzOdS1XE"
# world_address= "0x10c26511d4264cf894246bdbe2efc53cf99632d1fcd5fab7283649c34ca0494"
rpc_url = "https://api.cartridge.gg/rpc/starknet-sepolia"
account_address = "0x3677d8443f74dcc6cd23c4b3f217256c70f084ee7edc4ddc431af2ce91eb936"
keystore_path = "/Users/boo/sozo_acc"
# password = "sozo_acc"
Expand All @@ -94,6 +92,15 @@ cover_uri = "file://assets/cover.png"
socials.x = "https://x.com/TheDopeWars"


[profile.ryosepolia.tool.dojo.world]
name = "Dope Wars"
description = "Dope Wars is an onchain adaptation of the classic arbitrage game Drug Wars, built by Cartridge in partnership with Dope DAO.."
website = "https://dopewars.game/"
icon_uri = "file://assets/icon.png"
cover_uri = "file://assets/cover.png"
socials.x = "https://x.com/TheDopeWars"


# alpha.3
# create game : Steps: 272281 | Bitwise: 194 | Ec Op Builtin: 3 | L 1 Blob Gas Usage: 0 | L1 Gas: 10176 | Pedersen: 50 | Poseidon Builtin: 60 | Range Checks: 42093
# buy & travel : Steps: 420350 | Bitwise: 296 | Ec Op Builtin: 3 | L 1 Blob Gas Usage: 0 | L1 Gas: 3550 | Pedersen: 56 | Poseidon Builtin: 37 | Range Checks: 77213
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name = "rollyourown::_mocks::paper_mock::paper_mock"
reads = []
writes = [
"ERC20MetadataModel",
"ERC20BalanceModel",
"ERC20AllowanceModel",
"InitializableModel",
]
init_calldata = ["$contract_address:rollyourown::systems::laundromat::laundromat"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::config::config::config"
reads = []
writes = ["GameConfig","DrugConfig","LocationConfig","HustlerItemBaseConfig","HustlerItemTiersConfig","EncounterStatsConfig"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::library::store::store"
reads = []
writes = []
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::systems::devtools::devtools"
reads = []
writes = ["SortedList","SortedListItem","Game","GameConfig","GameStorePacked","Season","SeasonSettings","RyoConfig"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::systems::game::game"
reads = []
writes = ["Game","GameStorePacked","RyoConfig","Season","SeasonSettings","SortedList","SortedListItem"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::systems::laundromat::laundromat"
reads = []
writes = ["SortedList","SortedListItem","Season","SeasonSettings","Game","GameConfig","RyoConfig"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name = "rollyourown::systems::ryo::ryo"
reads = []
writes = ["RyoConfig", "RyoAddress", "Season", "SeasonSettings"]
init_calldata = [
"$contract_address:rollyourown::_mocks::paper_mock::paper_mock",
"0xe29882a1fcba1e7e10cad46212257fea5c752a4f9b1b1ec683c503a2cf5c8a",
"$contract_address:rollyourown::systems::laundromat::laundromat",
]
1 change: 1 addition & 0 deletions manifests/dev/overlays/dojo_base_base.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "dojo::base::base"
1 change: 1 addition & 0 deletions manifests/dev/overlays/dojo_world_world.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "dojo::world::world"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::drugs::drug_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::encounters::encounter_stats_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::game::game_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::hustlers::hustler_item_base_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::hustlers::hustler_item_tiers_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::locations::location_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::ryo_address::ryo_address"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::ryo::ryo_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::settings::season_settings"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::models::game::game"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::models::game_store_packed::game_store_packed"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::models::season::season"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::utils::sorted_list::sorted_list"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::utils::sorted_list::sorted_list_item"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::security::initializable::initializable_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::token::erc20::erc20_allowance::erc_20_allowance_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::token::erc20::erc20_balance::erc_20_balance_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::token::erc20::erc20_metadata::erc_20_metadata_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name = "rollyourown::_mocks::paper_mock::paper_mock"
reads = []
writes = [
"ERC20MetadataModel",
"ERC20BalanceModel",
"ERC20AllowanceModel",
"InitializableModel",
]
init_calldata = ["$contract_address:rollyourown::systems::laundromat::laundromat"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::config::config::config"
reads = []
writes = ["GameConfig","DrugConfig","LocationConfig","HustlerItemBaseConfig","HustlerItemTiersConfig","EncounterStatsConfig"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::library::store::store"
reads = []
writes = []
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::systems::devtools::devtools"
reads = []
writes = ["SortedList","SortedListItem","Game","GameConfig","GameStorePacked","Season","SeasonSettings","RyoConfig"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::systems::game::game"
reads = []
writes = ["Game","GameStorePacked","RyoConfig","Season","SeasonSettings","SortedList","SortedListItem"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::systems::laundromat::laundromat"
reads = []
writes = ["SortedList","SortedListItem","Season","SeasonSettings","Game","GameConfig","RyoConfig"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name = "rollyourown::systems::ryo::ryo"
reads = []
writes = ["RyoConfig", "RyoAddress", "Season", "SeasonSettings"]
init_calldata = [
"$contract_address:rollyourown::_mocks::paper_mock::paper_mock",
"0xe29882a1fcba1e7e10cad46212257fea5c752a4f9b1b1ec683c503a2cf5c8a",
"$contract_address:rollyourown::systems::laundromat::laundromat",
]
1 change: 1 addition & 0 deletions manifests/ryo420/overlays/dojo_base_base.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "dojo::base::base"
1 change: 1 addition & 0 deletions manifests/ryo420/overlays/dojo_world_world.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "dojo::world::world"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::drugs::drug_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::encounters::encounter_stats_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::game::game_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::hustlers::hustler_item_base_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::hustlers::hustler_item_tiers_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::locations::location_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::ryo_address::ryo_address"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::ryo::ryo_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::settings::season_settings"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::models::game::game"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::models::game_store_packed::game_store_packed"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::models::season::season"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::utils::sorted_list::sorted_list"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::utils::sorted_list::sorted_list_item"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::security::initializable::initializable_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::token::erc20::erc20_allowance::erc_20_allowance_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::token::erc20::erc20_balance::erc_20_balance_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::token::erc20::erc20_metadata::erc_20_metadata_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name = "rollyourown::_mocks::paper_mock::paper_mock"
reads = []
writes = [
"ERC20MetadataModel",
"ERC20BalanceModel",
"ERC20AllowanceModel",
"InitializableModel",
]
init_calldata = ["$contract_address:rollyourown::systems::laundromat::laundromat"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::config::config::config"
reads = []
writes = ["GameConfig","DrugConfig","LocationConfig","HustlerItemBaseConfig","HustlerItemTiersConfig","EncounterStatsConfig"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::library::store::store"
reads = []
writes = []
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::systems::devtools::devtools"
reads = []
writes = ["SortedList","SortedListItem","Game","GameConfig","GameStorePacked","Season","SeasonSettings","RyoConfig"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::systems::game::game"
reads = []
writes = ["Game","GameStorePacked","RyoConfig","Season","SeasonSettings","SortedList","SortedListItem"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::systems::laundromat::laundromat"
reads = []
writes = ["SortedList","SortedListItem","Season","SeasonSettings","Game","GameConfig","RyoConfig"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name = "rollyourown::systems::ryo::ryo"
reads = []
writes = ["RyoConfig", "RyoAddress", "Season", "SeasonSettings"]
init_calldata = [
"$contract_address:rollyourown::_mocks::paper_mock::paper_mock",
"0xe29882a1fcba1e7e10cad46212257fea5c752a4f9b1b1ec683c503a2cf5c8a",
"$contract_address:rollyourown::systems::laundromat::laundromat",
]
1 change: 1 addition & 0 deletions manifests/ryo421/overlays/dojo_base_base.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "dojo::base::base"
1 change: 1 addition & 0 deletions manifests/ryo421/overlays/dojo_world_world.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "dojo::world::world"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::drugs::drug_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::encounters::encounter_stats_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::game::game_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::hustlers::hustler_item_base_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::hustlers::hustler_item_tiers_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::locations::location_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::ryo_address::ryo_address"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::ryo::ryo_config"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::config::settings::season_settings"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::models::game::game"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::models::game_store_packed::game_store_packed"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::models::season::season"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::utils::sorted_list::sorted_list"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "rollyourown::utils::sorted_list::sorted_list_item"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::security::initializable::initializable_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::token::erc20::erc20_allowance::erc_20_allowance_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::token::erc20::erc20_balance::erc_20_balance_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "token::components::token::erc20::erc20_metadata::erc_20_metadata_model"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name = "rollyourown::_mocks::paper_mock::paper_mock"
reads = []
writes = [
"ERC20MetadataModel",
"ERC20BalanceModel",
"ERC20AllowanceModel",
"InitializableModel",
]
init_calldata = ["$contract_address:rollyourown::systems::laundromat::laundromat"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::config::config::config"
reads = []
writes = ["GameConfig","DrugConfig","LocationConfig","HustlerItemBaseConfig","HustlerItemTiersConfig","EncounterStatsConfig"]
init_calldata = []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "rollyourown::library::store::store"
reads = []
writes = []
init_calldata = []
Loading

0 comments on commit 4bfb18d

Please sign in to comment.