pool
Module0x8006…00bb
- Move path
- 0x91bf…9ca1::pool
- Functions
- 8720 public, 0 entry
- Structs
- 25
pool
- fee4
- fee10000bps1
- fee100bps1
- fee3000bps1
- fee500bps1
- full_math_u1286
- full_math_u326
- full_math_u646
- i12831
- i3230
- i6428
- math_bit2
- math_liquidity7
- math_sqrt_price8
- math_swap3
- math_tick7
- math_u12817
- math_u2565
- math_u647
- pool87
- pool_factory21
- pool_fetcher1
- position_manager34
- position_nft5
- reward_manager8
- string_tools5
- swap_router13
Declarations
Rebuilt from the module interface. No verified source is published, and function bodies are only available as bytecode.
module pool;
struct AddRewardEvent has copy, drop {
pool: ID,
reward_index: u64,
reward_vault: address,
reward_manager: address,
amount: u64,
}
struct BurnEvent has copy, drop {
pool: ID,
owner: address,
tick_lower_index: i32::I32,
tick_upper_index: i32::I32,
amount_a: u64,
amount_b: u64,
liquidity_delta: u128,
}
struct CollectEvent has copy, drop {
pool: ID,
recipient: address,
tick_lower_index: i32::I32,
tick_upper_index: i32::I32,
amount_a: u64,
amount_b: u64,
}
struct CollectProtocolFeeEvent has copy, drop {
pool: ID,
recipient: address,
amount_a: u64,
amount_b: u64,
}
struct CollectRewardEvent has copy, drop {
pool: ID,
recipient: address,
tick_lower_index: i32::I32,
tick_upper_index: i32::I32,
amount: u64,
vault: ID,
reward_index: u64,
}
struct ComputeSwapState has copy, drop {
amount_a: u128,
amount_b: u128,
amount_specified_remaining: u128,
amount_calculated: u128,
sqrt_price: u128,
tick_current_index: i32::I32,
fee_growth_global: u128,
protocol_fee: u128,
liquidity: u128,
fee_amount: u128,
}
struct FlashSwapReceipt<phantom T0, phantom T1> {
pool_id: ID,
a_to_b: bool,
pay_amount: u64,
}
struct InitRewardEvent has copy, drop {
pool: ID,
reward_index: u64,
reward_vault: address,
reward_manager: address,
}
struct MigratePositionEvent has copy, drop {
pool: ID,
old_key: String,
new_key: String,
}
struct MintEvent has copy, drop {
pool: ID,
owner: address,
tick_lower_index: i32::I32,
tick_upper_index: i32::I32,
amount_a: u64,
amount_b: u64,
liquidity_delta: u128,
}
struct ModifyTickRewardEvent has copy, drop {
pool: ID,
old_reward: u128,
new_reward: u128,
}
struct Pool<phantom T0, phantom T1, phantom T2> has store, key {
id: UID,
coin_a: Balance<T0>,
coin_b: Balance<T1>,
protocol_fees_a: u64,
protocol_fees_b: u64,
sqrt_price: u128,
tick_current_index: i32::I32,
tick_spacing: u32,
max_liquidity_per_tick: u128,
fee: u32,
fee_protocol: u32,
unlocked: bool,
fee_growth_global_a: u128,
fee_growth_global_b: u128,
liquidity: u128,
deploy_time_ms: u64,
reward_infos: vector<PoolRewardInfo>,
reward_last_updated_time_ms: u64,
}
struct PoolRewardInfo has store, key {
id: UID,
vault: address,
vault_coin_type: String,
emissions_per_second: u128,
growth_global: u128,
manager: address,
}
struct PoolRewardVault<phantom T0> has store, key {
id: UID,
coin: Balance<T0>,
}
struct Position has store, key {
id: UID,
liquidity: u128,
fee_growth_inside_a: u128,
fee_growth_inside_b: u128,
tokens_owed_a: u64,
tokens_owed_b: u64,
reward_infos: vector<PositionRewardInfo>,
}
struct PositionRewardInfo has store {
reward_growth_inside: u128,
amount_owed: u64,
}
struct RemoveRewardEvent has copy, drop {
pool: ID,
reward_index: u64,
reward_vault: address,
reward_manager: address,
amount: u64,
recipient: address,
}
struct SwapEvent has copy, drop {
pool: ID,
recipient: address,
amount_a: u64,
amount_b: u64,
liquidity: u128,
tick_current_index: i32::I32,
tick_pre_index: i32::I32,
sqrt_price: u128,
protocol_fee: u64,
fee_amount: u64,
a_to_b: bool,
is_exact_in: bool,
}
struct Tick has store, key {
id: UID,
liquidity_gross: u128,
liquidity_net: i128::I128,
fee_growth_outside_a: u128,
fee_growth_outside_b: u128,
reward_growths_outside: vector<u128>,
initialized: bool,
}
struct TogglePoolStatusEvent has copy, drop {
pool: ID,
status: bool,
}
struct UpdatePoolFeeProtocolEvent has copy, drop {
pool: ID,
fee_protocol: u32,
}
struct UpdateRewardEmissionsEvent has copy, drop {
pool: ID,
reward_index: u64,
reward_vault: address,
reward_manager: address,
reward_emissions_per_second: u128,
}
struct UpdateRewardManagerEvent has copy, drop {
pool: ID,
reward_index: u64,
reward_manager: address,
}
struct UpgradeEvent has copy, drop {
old_version: u64,
new_version: u64,
}
struct Versioned has store, key {
id: UID,
version: u64,
}
public(package) fun add_reward<T0, T1, T2, T3>(&mut Pool<T0, T1, T2>,&mut PoolRewardVault<T3>,u64,Coin<T3>,u64,&Clock)
public(package) fun collect_protocol_fee_with_return_<T0, T1, T2>(&mut Pool<T0, T1, T2>,u64,u64,address): (Coin<T0>, Coin<T1>)
public(package) fun collect_reward<T0, T1, T2, T3>(&mut Pool<T0, T1, T2>,&mut PoolRewardVault<T3>,address,i32::I32,i32::I32,u64,u64): u64
public(package) fun collect_reward_v2<T0, T1, T2, T3>(&mut Pool<T0, T1, T2>,&mut PoolRewardVault<T3>,address,address,i32::I32,i32::I32,u64,u64): u64
public(package) fun collect_reward_with_return_<T0, T1, T2, T3>(&mut Pool<T0, T1, T2>,&mut PoolRewardVault<T3>,address,address,i32::I32,i32::I32,u64,u64): Coin<T3>
public(package) fun compute_swap_result<T0, T1, T2>(&mut Pool<T0, T1, T2>,address,bool,u128,bool,u128,bool,&Clock): ComputeSwapState
public fun flash_swap<T0, T1, T2>(&mut Pool<T0, T1, T2>,address,bool,u128,bool,u128,&Clock,&Versioned): (Coin<T0>, Coin<T1>, FlashSwapReceipt<T0, T1>)
public fun get_position_base_info<T0, T1, T2>(&Pool<T0, T1, T2>,String): (u128, u128, u128, u64, u64, &vector<PositionRewardInfo>)
public fun get_position_reward_infos<T0, T1, T2>(&Pool<T0, T1, T2>,String): &vector<PositionRewardInfo>
fun init()
public(package) fun init_reward<T0, T1, T2, T3>(&mut Pool<T0, T1, T2>,u64,address): PoolRewardVault<T3>
public(package) fun merge_coin<T0>(vector<Coin<T0>>): Coin<T0>
fun modify_position<T0, T1, T2>(&mut Pool<T0, T1, T2>,address,i32::I32,i32::I32,i128::I128,&Clock): (i128::I128, i128::I128)
public(package) fun remove_reward<T0, T1, T2, T3>(&mut Pool<T0, T1, T2>,&mut PoolRewardVault<T3>,u64,u64,address,&Clock)
public fun repay_flash_swap<T0, T1, T2>(&mut Pool<T0, T1, T2>,Coin<T0>,Coin<T1>,FlashSwapReceipt<T0, T1>,&Versioned)
public(package) fun split_and_return_<T0, T1, T2>(&mut Pool<T0, T1, T2>,Coin<T0>,u64,Coin<T1>,u64): (Coin<T0>, Coin<T1>)
public(package) fun split_out_and_return_<T0, T1, T2>(&mut Pool<T0, T1, T2>,u64,u64): (Coin<T0>, Coin<T1>)
public(package) fun swap<T0, T1, T2>(&mut Pool<T0, T1, T2>,address,bool,u128,bool,u128,&Clock): (u128, u128)
public(package) fun swap_coin_a_b_with_return_<T0, T1, T2>(&mut Pool<T0, T1, T2>,Coin<T0>,u64,u64): (Coin<T1>, Coin<T0>)
public(package) fun swap_coin_b_a_with_return_<T0, T1, T2>(&mut Pool<T0, T1, T2>,Coin<T1>,u64,u64): (Coin<T0>, Coin<T1>)
fun update_position_metadata<T0, T1, T2>(&mut Pool<T0, T1, T2>,String,i128::I128,u128,u128,vector<u128>)
fun update_tick<T0, T1, T2>(&mut Pool<T0, T1, T2>,i32::I32,i32::I32,i128::I128,bool,vector<u128>): bool