Skip to content

Commit 3b97013

Browse files
committed
fix
1 parent d0ad202 commit 3b97013

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

contracts/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
soroban-sdk = "22.0.0"
7+
soroban-sdk = { version = "22.0.0", features = ["testutils"] }
88

99
[lib]
1010
crate-type = ["cdylib", "rlib"]

contracts/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![no_std]
2-
use soroban_sdk::{Address, Env, Map, String, Vec, contract, contractimpl, contracttype};
2+
use soroban_sdk::{Address, Env, String, Vec, contract, contractimpl, contracttype};
33

44
#[derive(Clone)]
55
#[contracttype]
@@ -92,10 +92,10 @@ impl MindBlockContract {
9292
}
9393

9494
/// Get top players by XP (leaderboard)
95-
pub fn get_leaderboard(env: Env, limit: u32) -> Vec<Player> {
95+
pub fn get_leaderboard(env: Env, _limit: u32) -> Vec<Player> {
9696
// Note: In production, implement proper pagination and sorting
9797
// This is a simplified version
98-
let mut leaderboard = Vec::new(&env);
98+
let leaderboard = Vec::new(&env);
9999

100100
// This would need to be implemented with proper indexing
101101
// For now, returns empty vector as placeholder
@@ -156,7 +156,7 @@ mod test {
156156
#[test]
157157
fn test_register_player() {
158158
let env = Env::default();
159-
let contract_id = env.register_contract(None, MindBlockContract);
159+
let contract_id = env.register(MindBlockContract, ());
160160
let client = MindBlockContractClient::new(&env, &contract_id);
161161

162162
let player = Address::generate(&env);
@@ -173,7 +173,7 @@ mod test {
173173
#[test]
174174
fn test_submit_puzzle() {
175175
let env = Env::default();
176-
let contract_id = env.register_contract(None, MindBlockContract);
176+
let contract_id = env.register(MindBlockContract, ());
177177
let client = MindBlockContractClient::new(&env, &contract_id);
178178

179179
let player = Address::generate(&env);

0 commit comments

Comments
 (0)