For the complete documentation index, see llms.txt. This page is also available as Markdown.

swap_callback.gno

SwapCallback

func SwapCallback(
	cur realm,
	token0Path string,
	token1Path string,
	amount0Delta int64,
	amount1Delta int64,
	payer address
) error

SwapCallback transfers amounts owed by a pool during a swap.

Halt check: reverts while the Router halt scope is active.

Parameters

Name
Type
Description

cur

realm

current realm context; callers use cross(cur) when crossing into this realm

token0Path

string

token0 path

token1Path

string

token1 path

amount0Delta

int64

token0 amount owed to or by the pool

amount1Delta

int64

token1 amount owed to or by the pool

payer

address

address that supplies positive deltas

Return Values

Name
Type
Description

err

error

non-nil when payment validation or transfer fails

source

Last updated