multiversx_sc_modules/bonding_curve/utils/
storage.rs1multiversx_sc::imports!();
2multiversx_sc::derive_imports!();
3
4use super::structs::TokenOwnershipData;
5
6#[multiversx_sc::module]
7pub trait StorageModule {
8 #[storage_mapper("token_details")]
9 fn token_details(
10 &self,
11 token: &EsdtTokenIdentifier,
12 ) -> SingleValueMapper<TokenOwnershipData<Self::Api>>;
13
14 #[storage_mapper("bonding_curve")]
15 fn bonding_curve(&self, token: &EsdtTokenIdentifier) -> SingleValueMapper<ManagedBuffer>;
16
17 #[storage_mapper("owned_tokens")]
18 fn owned_tokens(&self, owner: &ManagedAddress) -> SetMapper<EsdtTokenIdentifier>;
19
20 #[storage_mapper("nonce_amount")]
21 fn nonce_amount(
22 &self,
23 identifier: &EsdtTokenIdentifier,
24 nonce: u64,
25 ) -> SingleValueMapper<BigUint>;
26}