BibliothecaDAO / realms-contracts

Realms Monorepo for Ethereum contracts and Starknet contracts.
https://bibliothecadao.xyz/
MIT License
86 stars 33 forks source link

duplicate adventurer_balance declaration in Adventurer.cairo #286

Closed loothero closed 1 year ago

loothero commented 1 year ago

Summary: Adventurer.cairo doesn't currently compile due to adventurer_balance storage variable being declared twice.

Steps to reproduce: nile compile /workspaces/realms-contracts/contracts/loot/adventurer/Adventurer.cairo

🔨 Compiling /workspaces/realms-contracts/contracts/loot/adventurer/Adventurer.cairo
/workspaces/realms-contracts/contracts/loot/adventurer/Adventurer.cairo:94:6: Found more than one storage variable with the same name ('adventurer_balance').
func adventurer_balance(tokenId: Uint256) -> (balance: Uint256) {
     ^****************^
/workspaces/realms-contracts/contracts/loot/adventurer/Adventurer.cairo:81:6: Note: another definition appears here.
func adventurer_balance(adventurer_token_id: Uint256) -> (balance: Uint256) {
     ^****************^
🛑 Failed to compile the following 1 contract:
   /workspaces/realms-contracts/contracts/loot/adventurer/Adventurer.cairo

Fix: Remove duplicate declaration of adventurer_balance storage variable

Verification: nile compile /workspaces/realms-contracts/contracts/loot/adventurer/Adventurer.cairo

root ➜ /workspaces/realms-contracts (main ✗) $ nile compile /workspaces/realms-contracts/contracts/loot/adventurer/Adventurer.cairo
🔨 Compiling /workspaces/realms-contracts/contracts/loot/adventurer/Adventurer.cairo
✅ Done