diff --git a/configs/sepolia-contracts.config.json b/configs/sepolia-contracts.config.json index ce2918aa..1fb5f4d6 100644 --- a/configs/sepolia-contracts.config.json +++ b/configs/sepolia-contracts.config.json @@ -1,7 +1,7 @@ { "usernameStore": "0x073128a9f7b38d2bcdb6c1f9ef4fea357de4dfe2fab5832c1e7b51e9aae97c51", - "artPeace": "0x075381b84dd86e87836c257615e59cc46bb78bfae45e56d35595e4253e555e80", - "canvasNFT": "0x026774a47ab295f393201403ac8d2a5a7c9befc25c63dc91305a944373a5323a", + "artPeace": "0x04d88b27976e74363163d97d6eb4505007c102b7c7cdb8b7bac5ea75fec6e998", + "canvasNFT": "0x040d7f7a6ec27d8ffc9e993ac9b307007356c3b3c6d5b12717953659ccd3df51", "pixelQuest": "0x0715004f8805f938b1d42b0bce12a9b1dc49ec55bb2c401ea9c4695461960576" } diff --git a/frontend/src/contracts/art_peace.abi.json b/frontend/src/contracts/art_peace.abi.json index 41d93921..2fa27286 100644 --- a/frontend/src/contracts/art_peace.abi.json +++ b/frontend/src/contracts/art_peace.abi.json @@ -4,20 +4,6 @@ "name": "ArtPeaceImpl", "interface_name": "art_peace::interfaces::IArtPeace" }, - { - "type": "struct", - "name": "art_peace::interfaces::Pixel", - "members": [ - { - "name": "color", - "type": "core::integer::u8" - }, - { - "name": "owner", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, { "type": "struct", "name": "core::array::Span::", @@ -95,77 +81,35 @@ ] }, { - "type": "interface", - "name": "art_peace::interfaces::IArtPeace", - "items": [ + "type": "struct", + "name": "art_peace::templates::interfaces::FactionTemplateMetadata", + "members": [ { - "type": "function", - "name": "get_pixel", - "inputs": [ - { - "name": "pos", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "art_peace::interfaces::Pixel" - } - ], - "state_mutability": "view" + "name": "faction_id", + "type": "core::integer::u32" }, { - "type": "function", - "name": "get_pixel_color", - "inputs": [ - { - "name": "pos", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" + "name": "hash", + "type": "core::felt252" }, { - "type": "function", - "name": "get_pixel_owner", - "inputs": [ - { - "name": "pos", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "state_mutability": "view" + "name": "position", + "type": "core::integer::u128" }, { - "type": "function", - "name": "get_pixel_xy", - "inputs": [ - { - "name": "x", - "type": "core::integer::u128" - }, - { - "name": "y", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "art_peace::interfaces::Pixel" - } - ], - "state_mutability": "view" + "name": "width", + "type": "core::integer::u128" }, + { + "name": "height", + "type": "core::integer::u128" + } + ] + }, + { + "type": "interface", + "name": "art_peace::interfaces::IArtPeace", + "items": [ { "type": "function", "name": "get_width", @@ -446,6 +390,22 @@ "outputs": [], "state_mutability": "external" }, + { + "type": "function", + "name": "change_faction_leader", + "inputs": [ + { + "name": "faction_id", + "type": "core::integer::u32" + }, + { + "name": "new_leader", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, { "type": "function", "name": "init_chain_faction", @@ -470,13 +430,6 @@ "outputs": [], "state_mutability": "external" }, - { - "type": "function", - "name": "leave_faction", - "inputs": [], - "outputs": [], - "state_mutability": "external" - }, { "type": "function", "name": "join_chain_faction", @@ -849,6 +802,54 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "add_faction_template", + "inputs": [ + { + "name": "template_metadata", + "type": "art_peace::templates::interfaces::FactionTemplateMetadata" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "remove_faction_template", + "inputs": [ + { + "name": "template_id", + "type": "core::integer::u32" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "add_chain_faction_template", + "inputs": [ + { + "name": "template_metadata", + "type": "art_peace::templates::interfaces::FactionTemplateMetadata" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "remove_chain_faction_template", + "inputs": [ + { + "name": "template_id", + "type": "core::integer::u32" + } + ], + "outputs": [], + "state_mutability": "external" + }, { "type": "function", "name": "get_user_pixels_placed", @@ -958,6 +959,24 @@ } ] }, + { + "type": "struct", + "name": "core::byte_array::ByteArray", + "members": [ + { + "name": "data", + "type": "core::array::Array::" + }, + { + "name": "pending_word", + "type": "core::felt252" + }, + { + "name": "pending_word_len", + "type": "core::integer::u32" + } + ] + }, { "type": "interface", "name": "art_peace::nfts::interfaces::IArtPeaceNFTMinter", @@ -985,6 +1004,18 @@ ], "outputs": [], "state_mutability": "external" + }, + { + "type": "function", + "name": "set_nft_base_uri", + "inputs": [ + { + "name": "base_uri", + "type": "core::byte_array::ByteArray" + } + ], + "outputs": [], + "state_mutability": "external" } ] }, @@ -1213,6 +1244,10 @@ "name": "daily_new_colors_count", "type": "core::integer::u32" }, + { + "name": "start_time", + "type": "core::integer::u64" + }, { "name": "end_time", "type": "core::integer::u64" @@ -1254,6 +1289,33 @@ } ] }, + { + "type": "event", + "name": "art_peace::art_peace::ArtPeace::CanvasScaled", + "kind": "struct", + "members": [ + { + "name": "old_width", + "type": "core::integer::u128", + "kind": "data" + }, + { + "name": "new_width", + "type": "core::integer::u128", + "kind": "data" + }, + { + "name": "old_height", + "type": "core::integer::u128", + "kind": "data" + }, + { + "name": "new_height", + "type": "core::integer::u128", + "kind": "data" + } + ] + }, { "type": "event", "name": "art_peace::art_peace::ArtPeace::ColorAdded", @@ -1489,6 +1551,23 @@ } ] }, + { + "type": "event", + "name": "art_peace::art_peace::ArtPeace::FactionLeaderChanged", + "kind": "struct", + "members": [ + { + "name": "faction_id", + "type": "core::integer::u32", + "kind": "key" + }, + { + "name": "new_leader", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, { "type": "event", "name": "art_peace::art_peace::ArtPeace::ChainFactionCreated", @@ -1579,6 +1658,64 @@ } ] }, + { + "type": "event", + "name": "art_peace::art_peace::ArtPeace::FactionTemplateAdded", + "kind": "struct", + "members": [ + { + "name": "template_id", + "type": "core::integer::u32", + "kind": "key" + }, + { + "name": "template_metadata", + "type": "art_peace::templates::interfaces::FactionTemplateMetadata", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "art_peace::art_peace::ArtPeace::FactionTemplateRemoved", + "kind": "struct", + "members": [ + { + "name": "template_id", + "type": "core::integer::u32", + "kind": "key" + } + ] + }, + { + "type": "event", + "name": "art_peace::art_peace::ArtPeace::ChainFactionTemplateAdded", + "kind": "struct", + "members": [ + { + "name": "template_id", + "type": "core::integer::u32", + "kind": "key" + }, + { + "name": "template_metadata", + "type": "art_peace::templates::interfaces::FactionTemplateMetadata", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "art_peace::art_peace::ArtPeace::ChainFactionTemplateRemoved", + "kind": "struct", + "members": [ + { + "name": "template_id", + "type": "core::integer::u32", + "kind": "key" + } + ] + }, { "type": "event", "name": "art_peace::templates::component::TemplateStoreComponent::TemplateAdded", @@ -1635,6 +1772,11 @@ "type": "art_peace::art_peace::ArtPeace::NewDay", "kind": "nested" }, + { + "name": "CanvasScaled", + "type": "art_peace::art_peace::ArtPeace::CanvasScaled", + "kind": "nested" + }, { "name": "ColorAdded", "type": "art_peace::art_peace::ArtPeace::ColorAdded", @@ -1685,6 +1827,11 @@ "type": "art_peace::art_peace::ArtPeace::FactionCreated", "kind": "nested" }, + { + "name": "FactionLeaderChanged", + "type": "art_peace::art_peace::ArtPeace::FactionLeaderChanged", + "kind": "nested" + }, { "name": "ChainFactionCreated", "type": "art_peace::art_peace::ArtPeace::ChainFactionCreated", @@ -1710,6 +1857,26 @@ "type": "art_peace::art_peace::ArtPeace::VotableColorAdded", "kind": "nested" }, + { + "name": "FactionTemplateAdded", + "type": "art_peace::art_peace::ArtPeace::FactionTemplateAdded", + "kind": "nested" + }, + { + "name": "FactionTemplateRemoved", + "type": "art_peace::art_peace::ArtPeace::FactionTemplateRemoved", + "kind": "nested" + }, + { + "name": "ChainFactionTemplateAdded", + "type": "art_peace::art_peace::ArtPeace::ChainFactionTemplateAdded", + "kind": "nested" + }, + { + "name": "ChainFactionTemplateRemoved", + "type": "art_peace::art_peace::ArtPeace::ChainFactionTemplateRemoved", + "kind": "nested" + }, { "name": "TemplateEvent", "type": "art_peace::templates::component::TemplateStoreComponent::Event", diff --git a/frontend/src/contracts/canvas_nft.abi.json b/frontend/src/contracts/canvas_nft.abi.json index 1039f46f..19442e29 100644 --- a/frontend/src/contracts/canvas_nft.abi.json +++ b/frontend/src/contracts/canvas_nft.abi.json @@ -154,6 +154,18 @@ ], "outputs": [], "state_mutability": "external" + }, + { + "type": "function", + "name": "set_base_uri", + "inputs": [ + { + "name": "base_uri", + "type": "core::byte_array::ByteArray" + } + ], + "outputs": [], + "state_mutability": "external" } ] }, diff --git a/tests/integration/sepolia/deploy.sh b/tests/integration/sepolia/deploy.sh index fd8d24c7..03b5a760 100755 --- a/tests/integration/sepolia/deploy.sh +++ b/tests/integration/sepolia/deploy.sh @@ -104,8 +104,8 @@ COLORS=$(jq -r '.colors[]' $CANVAS_CONFIG | sed 's/^/0x/') VOTABLE_COLOR_COUNT=$(jq -r '.votableColors[]' $CANVAS_CONFIG | wc -l | tr -d ' ') VOTABLE_COLORS=$(jq -r '.votableColors[]' $CANVAS_CONFIG | sed 's/^/0x/') DAILY_NEW_COLORS_COUNT=3 -START_TIME=1620276200 -END_TIME=1720276200 +START_TIME=1720399517 +END_TIME=1721399517 DEVNET_MODE=0 DAILY_QUESTS_COUNT=$(jq -r '.daily.dailyQuestsCount' $QUESTS_CONFIG) diff --git a/tests/integration/sepolia/deploy_quests.sh b/tests/integration/sepolia/deploy_quests.sh index c2270779..9d1489fb 100755 --- a/tests/integration/sepolia/deploy_quests.sh +++ b/tests/integration/sepolia/deploy_quests.sh @@ -20,8 +20,8 @@ elif [ -z "$STARKNET_ACCOUNT" ]; then exit 1 fi -ART_PEACE_CONTRACT_ADDRESS=0x075381b84dd86e87836c257615e59cc46bb78bfae45e56d35595e4253e555e80 -CANVAS_NFT_CONTRACT=0x026774a47ab295f393201403ac8d2a5a7c9befc25c63dc91305a944373a5323a +ART_PEACE_CONTRACT_ADDRESS=0x04d88b27976e74363163d97d6eb4505007c102b7c7cdb8b7bac5ea75fec6e998 +CANVAS_NFT_CONTRACT=0x040d7f7a6ec27d8ffc9e993ac9b307007356c3b3c6d5b12717953659ccd3df51 USERNAME_STORE_CONTRACT=0x073128a9f7b38d2bcdb6c1f9ef4fea357de4dfe2fab5832c1e7b51e9aae97c51 CONTRACT_DIR=$WORK_DIR/onchain diff --git a/tests/integration/sepolia/setup_factions.sh b/tests/integration/sepolia/setup_factions.sh index 508af37d..2a92d7fb 100755 --- a/tests/integration/sepolia/setup_factions.sh +++ b/tests/integration/sepolia/setup_factions.sh @@ -20,7 +20,7 @@ elif [ -z "$STARKNET_ACCOUNT" ]; then exit 1 fi -ART_PEACE_CONTRACT_ADDRESS=0x075381b84dd86e87836c257615e59cc46bb78bfae45e56d35595e4253e555e80 +ART_PEACE_CONTRACT_ADDRESS=0x04d88b27976e74363163d97d6eb4505007c102b7c7cdb8b7bac5ea75fec6e998 FACTIONS_CONFIG_FILE=$WORK_DIR/configs/factions.config.json