๐งญAggregators
Take advantage of liquidity in Ekubo pools to provide better pricing for users
Summary
#[starknet::interface]
trait ICore<TStorage> {
// ...
// Main entrypoint for any actions, which must be called before any other pool functions can be called.
// Other functions must be called within the callback to lock. The ILocker#locked function is called with the input data,
// and the returned array is passed through to the caller.
fn lock(ref self: TStorage, data: Array<felt252>) -> Array<felt252>;
// Make a swap against a pool.
// You must call this within a lock callback.
fn swap(ref self: TStorage, pool_key: PoolKey, params: SwapParameters) -> Delta;
// ...
}
// This interface must be implemented by any contract that intends to call ICore#lock
#[starknet::interface]
trait ILocker<TStorage> {
// This function is called on the caller of lock, i.e. a callback
// The input is the data passed to ICore#lock, the output is passed back through as the return value of #lock
fn locked(ref self: TStorage, id: u32, data: Array<felt252>) -> Array<felt252>;
}Locker utility method
Note on extensions
Last updated
Was this helpful?

