swap_callback.gno

SwapCallback

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

SwapCallback is called by pools to transfer tokens during a swap.

Parameters

Name
Type
Description

token0Path

string

path of token0

token1Path

string

path of token1

amount0Delta

int64

amount change for token0

amount1Delta

int64

amount change for token1

payer

address

address that will pay for the swap

Return Values

Name
Type
Description

err

error

error if callback fails

Last updated