#[crate::service(name = "diff-adj", dispatch = false, psibase_mod = "crate")]
#[allow(non_snake_case, unused_variables)]
pub mod Service {
use crate::{AccountNumber, Pack, TimePointSec, ToSchema, Unpack};
use async_graphql::SimpleObject;
use serde::{Deserialize, Serialize};
#[table(name = "RateLimitTable", index = 0)]
#[derive(Default, Pack, Unpack, ToSchema, SimpleObject, Serialize, Deserialize, Debug)]
#[fracpack(fracpack_mod = "fracpack")]
pub struct RateLimit {
#[primary_key]
pub nft_id: u32,
pub window_seconds: u32,
pub activity_count: u32,
pub target_min: u32,
pub target_max: u32,
pub floor_difficulty: u64,
pub active_difficulty: u64,
pub last_update: TimePointSec,
pub increase_ppm: u32,
pub decrease_ppm: u32,
pub consumer: AccountNumber,
}
#[action]
fn create(
initial_difficulty: u64,
window_seconds: u32,
target_min: u32,
target_max: u32,
floor_difficulty: u64,
increase_ppm: u32,
decrease_ppm: u32,
) -> u32 {
unimplemented!()
}
#[action]
fn get_diff(nft_id: u32) -> u64 {
unimplemented!()
}
#[action]
fn increment(nft_id: u32, amount: u32) -> u64 {
unimplemented!()
}
#[action]
fn set_targets(nft_id: u32, target_min: u32, target_max: u32) {
unimplemented!()
}
#[action]
fn set_window(nft_id: u32, seconds: u32) {
unimplemented!()
}
#[action]
fn set_floor(nft_id: u32, difficulty: u64) {
unimplemented!()
}
#[action]
fn set_ppm(nft_id: u32, increase_ppm: u32, decrease_ppm: u32) {
unimplemented!()
}
#[action]
fn delete(nft_id: u32) {
unimplemented!()
}
#[action]
fn get_targets(nft_id: u32) -> (u32, u32) {
unimplemented!()
}
}
pub use Service::{RateLimit, RateLimitTable};
#[test]
fn verify_schema() {
crate::assert_schema_matches_package::<Wrapper>();
}