Skip to main content

IHooks

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new IHooks(at): IHooks

Wraps a smart contract exposing standard token FFI.

Parameters​

NameTypeDescription
atAddressAddress of the smart contract.

Returns​

IHooks

Defined in​

assembly/interfaces/IHooks.ts:16

Properties​

_origin​

• _origin: Address

Defined in​

assembly/interfaces/IHooks.ts:9

Methods​

afterBatchTransferFrom​

▸ afterBatchTransferFrom(sender, from, to, ids, amounts): void

Parameters​

NameType
senderAddress
fromAddress
toAddress
idsu64[]
amountsu256[]

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:149


afterBurn​

▸ afterBurn(sender, to, ids, amountsToBurn): void

Parameters​

NameType
senderAddress
toAddress
idsu64[]
amountsToBurnu256[]

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:128


afterFlashLoan​

▸ afterFlashLoan(sender, to, fees, feesReceived): void

Parameters​

NameType
senderAddress
toAddress
feesu256
feesReceivedu256

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:72


afterMint​

▸ afterMint(sender, to, ids, distributionX, distributionY, amountsIn): void

Parameters​

NameType
senderAddress
toAddress
idsu64[]
distributionXu256[]
distributionYu256[]
amountsInu256[]

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:100


afterSwap​

▸ afterSwap(sender, to, swapForY, amountOut): void

Parameters​

NameType
senderAddress
toAddress
swapForYbool
amountOutu256

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:57


beforeBatchTransferFrom​

▸ beforeBatchTransferFrom(sender, from, to, ids, amounts): void

Parameters​

NameType
senderAddress
fromAddress
toAddress
idsu64[]
amountsu256[]

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:138


beforeBurn​

▸ beforeBurn(sender, to, ids, amountsToBurn): void

Parameters​

NameType
senderAddress
toAddress
idsu64[]
amountsToBurnu256[]

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:118


beforeFlashLoan​

▸ beforeFlashLoan(sender, to, amount): void

Parameters​

NameType
senderAddress
toAddress
amountu256

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:67


beforeMint​

▸ beforeMint(sender, to, ids, distributionX, distributionY, amountsReceived): void

Parameters​

NameType
senderAddress
toAddress
idsu64[]
distributionXu256[]
distributionYu256[]
amountsReceivedu256[]

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:82


beforeSwap​

▸ beforeSwap(sender, to, swapForY, amountIn): void

Parameters​

NameType
senderAddress
toAddress
swapForYbool
amountInu256

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:47


getPair​

▸ getPair(): IPair

Returns​

IPair

Defined in​

assembly/interfaces/IHooks.ts:30


init​

▸ init(pair, masToSend): void

Calls the constructor

Parameters​

NameTypeDescription
pairAddressThe pair associated to this hook
masToSendu64-

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:25


isLinked​

▸ isLinked(): bool

Returns​

bool

Defined in​

assembly/interfaces/IHooks.ts:34


onHooksSet​

▸ onHooksSet(hooksParameters, onHooksSetData): void

Parameters​

NameType
hooksParametersHooksParameters
onHooksSetDataStaticArray<u8>

Returns​

void

Defined in​

assembly/interfaces/IHooks.ts:39