Skip to content

Commit

Permalink
Mainnet (#386)
Browse files Browse the repository at this point in the history
* 1.0.0 wip

* 1.0.0 wip 2

* wip 3

* slot ryo1 alpha-11

* predictoor

* add guest GameMode

* remove vrf_consumer component

* alpha.16

* use randomness for game creation

* update highscore & season on register_score

* add NewHighScore event

* add Claimed event

* clean & fixes

* ekubo & buy paper

* redeploy on sepolia

* add chips

* remove predictoor & disable slotmachine/chips

* add set_paper & set_treasury

* bump nextjs 15.0.1

* fixes

* settings & cleaning

* fmt

* bump versions

* temp

* esm connector

* cairo dojo v1.0.0-rc.0

* fmt

* use dojoEvents, without historical use

* rebuild logs (add turn to events)

* add missing stats & events

* rc1

* slot ryo1

* fixes

* prettier

* ryo sepolia

* bump dependencies

* use openSettings

* quests

* fixes & config

* balance trophies points

* rc.2

* rc.2 sepolia

* icons

* mainnet
  • Loading branch information
notV4l authored Nov 11, 2024
1 parent 791f26d commit 1d9c8b9
Show file tree
Hide file tree
Showing 418 changed files with 53,978 additions and 62,049 deletions.
21 changes: 1 addition & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
target
abis

genesis
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 .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scarb 2.6.3
scarb 2.8.4
127 changes: 118 additions & 9 deletions Scarb.lock
Original file line number Diff line number Diff line change
@@ -1,29 +1,138 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "bushido_trophy"
version = "0.0.0"
source = "git+https://github.com/cartridge-gg/bushido?branch=bump_version_rc2#9a1460b793449e85881054c213e2aa57cd094960"
dependencies = [
"dojo",
]

[[package]]
name = "cartridge_vrf"
version = "0.1.0"
source = "git+https://github.com/cartridge-gg/vrf#3fc02297d2444392b08d1445054fa5be97dac5ac"
dependencies = [
"openzeppelin",
"snforge_std",
"stark_vrf",
]

[[package]]
name = "dojo"
version = "0.7.2"
version = "1.0.0-rc.0"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-rc.2#6725a8f20af56213fa7382aa1e158817f3ee623c"
dependencies = [
"dojo_plugin",
]

[[package]]
name = "dojo_plugin"
version = "0.3.11"
source = "git+https://github.com/dojoengine/dojo?tag=v0.3.11#1e651b5d4d3b79b14a7d8aa29a92062fcb9e6659"
version = "2.8.4"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-rc.2#6725a8f20af56213fa7382aa1e158817f3ee623c"

[[package]]
name = "rollyourown"
version = "0.1.0"
name = "openzeppelin"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=a13bae3#a13bae3390a7114a8c14c0352c6898eff5f4f5d7"
dependencies = [
"dojo",
"token",
"openzeppelin_access",
"openzeppelin_account",
"openzeppelin_governance",
"openzeppelin_introspection",
"openzeppelin_presets",
"openzeppelin_security",
"openzeppelin_token",
"openzeppelin_upgrades",
"openzeppelin_utils",
]

[[package]]
name = "token"
version = "0.0.0"
name = "openzeppelin_access"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=a13bae3#a13bae3390a7114a8c14c0352c6898eff5f4f5d7"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_account"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=a13bae3#a13bae3390a7114a8c14c0352c6898eff5f4f5d7"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_token",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_governance"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=a13bae3#a13bae3390a7114a8c14c0352c6898eff5f4f5d7"
dependencies = [
"openzeppelin_access",
"openzeppelin_introspection",
]

[[package]]
name = "openzeppelin_introspection"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=a13bae3#a13bae3390a7114a8c14c0352c6898eff5f4f5d7"

[[package]]
name = "openzeppelin_presets"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=a13bae3#a13bae3390a7114a8c14c0352c6898eff5f4f5d7"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
"openzeppelin_introspection",
"openzeppelin_token",
"openzeppelin_upgrades",
]

[[package]]
name = "openzeppelin_security"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=a13bae3#a13bae3390a7114a8c14c0352c6898eff5f4f5d7"

[[package]]
name = "openzeppelin_token"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=a13bae3#a13bae3390a7114a8c14c0352c6898eff5f4f5d7"
dependencies = [
"openzeppelin_account",
"openzeppelin_governance",
"openzeppelin_introspection",
]

[[package]]
name = "openzeppelin_upgrades"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=a13bae3#a13bae3390a7114a8c14c0352c6898eff5f4f5d7"

[[package]]
name = "openzeppelin_utils"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=a13bae3#a13bae3390a7114a8c14c0352c6898eff5f4f5d7"

[[package]]
name = "rollyourown"
version = "0.1.0"
dependencies = [
"bushido_trophy",
"cartridge_vrf",
"dojo",
]

[[package]]
name = "snforge_std"
version = "0.26.0"
source = "git+https://github.com/foundry-rs/starknet-foundry.git?tag=v0.26.0#50eb589db65e113efe4f09241feb59b574228c7e"

[[package]]
name = "stark_vrf"
version = "0.1.0"
source = "git+https://github.com/dojoengine/stark-vrf.git#96d6d2a88b1ef46c4a285d0ccc334237205edae3"
145 changes: 50 additions & 95 deletions Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,112 +1,67 @@
[package]
cairo-version = "2.6.3"
cairo-version = "=2.8.4"
name = "rollyourown"
version = "0.1.0"

[cairo]
# sierra-replace-ids = true

[dependencies]
# 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" }
[tool.fmt]
sort-module-level-items = true
max-line-length = 100
tab-size = 4

[[target.starknet-contract]]
build-external-contracts = [
"dojo::world::world_contract::world",
"bushido_trophy::events::index::e_TrophyCreation",
"bushido_trophy::events::index::e_TrophyProgression",
]

[scripts]
[dev-dependencies]
cairo_test = "2.8.4"

#
katana = "katana --disable-fee --invoke-max-steps 2000000"
build = "sozo build && scarb run gendojo"
[dependencies]
starknet = "2.8.4"
dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-rc.2" }
cartridge_vrf = { git = "https://github.com/cartridge-gg/vrf" }
bushido_trophy = { git = "https://github.com/cartridge-gg/bushido", branch = "bump_version_rc2" }
# bushido_trophy = { git = "https://github.com/cartridge-gg/bushido" }
# dojo = { path = "../dojo/crates/dojo/core" }

[scripts]
katana = "katana --config ./katana_dev.toml"
torii = "torii --config ./torii_dev.toml"

# common
copy_manifest = "./scripts/copy_manifest.sh"
gendojo = "./scripts/gen.sh"
auth = "./scripts/default_auth.sh"

auth = "./scripts/auth.sh"

# migrate && scarb run gendojo $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 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.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 75075 --index-pending true --version v0.7.2 --world 0x2fc5b78f171fd1d6a5842276902dcbd91c770fb01e56bc293392e3931ffe817"


[[target.dojo]]
build-external-contracts = [
"token::components::security::initializable::initializable_model",
"token::components::token::erc20::erc20_metadata::erc_20_metadata_model",
"token::components::token::erc20::erc20_balance::erc_20_balance_model",
"token::components::token::erc20::erc20_allowance::erc_20_allowance_model",
"token::components::token::erc20::erc20_mintable::erc_20_mintable_model",
"token::components::token::erc20::erc20_burnable::erc_20_burnable_model",
]

[tool.dojo.env]
rpc_url = "http://localhost:5050"
account_address = "0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03"
private_key = "0x1800000000300000180000000000030000000000003006001800006600"

[profile.ryo420.tool.dojo.env]
rpc_url = "https://api.cartridge.gg/x/ryo420/katana"
account_address = "0x2ea5a09a95ee73556a3ef6420c11a8df775fe4f06e58fd9f7a21b5d99e0b5ea"
private_key = "0x18055e629284db77daa8d60e4ca767d65807c3f1690785006e46d6e63a13d54"

[profile.ryo421.tool.dojo.env]
rpc_url = "https://api.cartridge.gg/x/ryo421/katana"
account_address = "0x7d806fc9478c73c60fac37c27888771bdb3092c21eb93452277e7673954d034"
private_key = "0x784b1dd14d761c414c6394fccca3ca1d1b0cac187e88122e4b06378f9e8c515"

[profile.ryosepolia.tool.dojo.env]
# world_address= "0x10c26511d4264cf894246bdbe2efc53cf99632d1fcd5fab7283649c34ca0494"
rpc_url = "https://api.cartridge.gg/rpc/starknet-sepolia"
account_address = "0x3677d8443f74dcc6cd23c4b3f217256c70f084ee7edc4ddc431af2ce91eb936"
keystore_path = "/Users/boo/sozo_acc"
# password = "sozo_acc"

# [profile.prod.tool.dojo.env]
# rpc_url = "https://api.cartridge.gg/x/ryo420/katana"
# account_address = "0x795abc2a2d5866f75c58025741329973db20966d1add5dd2a9fbdf0bb8a0266"
# private_key = "0x2e8ac99614186737cefc47effe03134f5a19c6dc2443c16510d3384769f9c78"

[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://rollyourown.preview.cartridge.gg/"
icon_uri = "file://assets/icon.png"
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
# sell & encounter : Steps: 250413 | Bitwise: 188 | Ec Op Builtin: 3 | L 1 Blob Gas Usage: 0 | L1 Gas: 3549 | Pedersen: 33 | Poseidon Builtin: 29 | Range Checks: 42965
migrate = "PROFILE=dev && sozo -P $PROFILE build && sozo -P $PROFILE migrate -vvv && scarb run copy_manifest $PROFILE && scarb run gendojo $PROFILE && scarb run auth $PROFILE && sozo -P $PROFILE inspect"
migrate_ryo1 = "PROFILE=ryo1 && sozo -P $PROFILE build && sozo -P $PROFILE migrate -vvv && scarb run copy_manifest $PROFILE && scarb run auth $PROFILE && sozo -P $PROFILE inspect"
migrate_ryo2 = "PROFILE=ryo2 && sozo -P $PROFILE build && sozo -P $PROFILE migrate -vvv && scarb run copy_manifest $PROFILE && scarb run auth $PROFILE && sozo -P $PROFILE inspect"
migrate_ryosepolia_controller = "PROFILE=ryosepolia && sozo -P $PROFILE build && sozo -P $PROFILE migrate --slot.controller -vvv && scarb run copy_manifest $PROFILE && scarb run auth $PROFILE && sozo -P $PROFILE inspect"
migrate_ryosepolia = "PROFILE=ryosepolia && sozo -P $PROFILE build && sozo -P $PROFILE migrate --fee eth --fee-estimate-multiplier 2 --keystore ../../../sozo_acc -vvv && scarb run copy_manifest $PROFILE && scarb run auth $PROFILE && sozo -P $PROFILE inspect"
migrate_ryomainnet = "PROFILE=mainnet && sozo -P $PROFILE build && sozo -P $PROFILE migrate --fee eth --fee-estimate-multiplier 2 --keystore ../../../dopewars_key -vvv && scarb run copy_manifest $PROFILE && scarb run auth $PROFILE && sozo -P $PROFILE inspect"

# slot ryo1
slot_ryo1_katana = "slot d create ryo1 katana -v v1.0.0-rc.2 --config-file ./katana_ryo1.toml"
slot_ryo1_torii = "slot d create ryo1 torii -v v1.0.0-rc.2 --config-file ./torii_ryo1.toml"
# slot ryo2
slot_ryo2_katana = "slot d create ryo2 katana -v v1.0.0-rc.2 --config-file ./katana_ryo2.toml --dev --accounts 10"
slot_ryo2_torii = "slot d create ryo2 torii -v v1.0.0-rc.2 --config-file ./torii_ryo2.toml"

# slot ryosepolia
slot_ryosepolia_torii = "slot d create ryosepolia2 torii -v v1.0.0-rc.2 --config-file ./torii_ryosepolia2.toml"

# slot ryomainnet
slot_ryomainnet_torii = "slot d create --tier rare ryomainnet torii -v v1.0.0-rc.2 --config-file ./torii_mainnet.toml"

[profile.ryo1]
[profile.ryo2]
[profile.internal]
[profile.ryosepolia]
[profile.mainnet]

# alpha.5
# create game : Steps: 123719 | Bitwise: 194 | Ec Op Builtin: 3 | L 1 Blob Gas Usage: 0 | L1 Gas: 10176 | Pedersen: 50 | Poseidon Builtin: 74 | Range Checks: 8641
# buy & travel : Steps: 124923 | Bitwise: 296 | Ec Op Builtin: 3 | L 1 Blob Gas Usage: 0 | L1 Gas: 3548 | Pedersen: 55 | Poseidon Builtin: 37 | Range Checks: 11166
# sell & encounter : Steps: 90913 | Bitwise: 190 | Ec Op Builtin: 3 | L 1 Blob Gas Usage: 0 | L1 Gas: 3549 | Pedersen: 33 | Poseidon Builtin: 29 | Range Checks: 7241
Loading

0 comments on commit 1d9c8b9

Please sign in to comment.