IHooks
Table of contents
Constructors
Properties
Methods
- afterBatchTransferFrom
- afterBurn
- afterFlashLoan
- afterMint
- afterSwap
- beforeBatchTransferFrom
- beforeBurn
- beforeFlashLoan
- beforeMint
- beforeSwap
- getPair
- init
- isLinked
- onHooksSet
Constructors
constructor
• new IHooks(at): IHooks
Wraps a smart contract exposing standard token FFI.
Parameters
| Name | Type | Description |
|---|---|---|
at | Address | Address of the smart contract. |
Returns
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
| Name | Type |
|---|---|
sender | Address |
from | Address |
to | Address |
ids | u64[] |
amounts | u256[] |
Returns
void
Defined in
assembly/interfaces/IHooks.ts:149
afterBurn
▸ afterBurn(sender, to, ids, amountsToBurn): void
Parameters
| Name | Type |
|---|---|
sender | Address |
to | Address |
ids | u64[] |
amountsToBurn | u256[] |
Returns
void
Defined in
assembly/interfaces/IHooks.ts:128
afterFlashLoan
▸ afterFlashLoan(sender, to, fees, feesReceived): void
Parameters
| Name | Type |
|---|---|
sender | Address |
to | Address |
fees | u256 |
feesReceived | u256 |
Returns
void
Defined in
assembly/interfaces/IHooks.ts:72
afterMint
▸ afterMint(sender, to, ids, distributionX, distributionY, amountsIn): void
Parameters
| Name | Type |
|---|---|
sender | Address |
to | Address |
ids | u64[] |
distributionX | u256[] |
distributionY | u256[] |
amountsIn | u256[] |
Returns
void
Defined in
assembly/interfaces/IHooks.ts:100
afterSwap
▸ afterSwap(sender, to, swapForY, amountOut): void
Parameters
| Name | Type |
|---|---|
sender | Address |
to | Address |
swapForY | bool |
amountOut | u256 |
Returns
void
Defined in
assembly/interfaces/IHooks.ts:57
beforeBatchTransferFrom
▸ beforeBatchTransferFrom(sender, from, to, ids, amounts): void
Parameters
| Name | Type |
|---|---|
sender | Address |
from | Address |
to | Address |
ids | u64[] |
amounts | u256[] |
Returns
void
Defined in
assembly/interfaces/IHooks.ts:138
beforeBurn
▸ beforeBurn(sender, to, ids, amountsToBurn): void
Parameters
| Name | Type |
|---|---|
sender | Address |
to | Address |
ids | u64[] |
amountsToBurn | u256[] |
Returns
void
Defined in
assembly/interfaces/IHooks.ts:118
beforeFlashLoan
▸ beforeFlashLoan(sender, to, amount): void
Parameters
| Name | Type |
|---|---|
sender | Address |
to | Address |
amount | u256 |
Returns
void
Defined in
assembly/interfaces/IHooks.ts:67
beforeMint
▸ beforeMint(sender, to, ids, distributionX, distributionY, amountsReceived): void
Parameters
| Name | Type |
|---|---|
sender | Address |
to | Address |
ids | u64[] |
distributionX | u256[] |
distributionY | u256[] |
amountsReceived | u256[] |
Returns
void
Defined in
assembly/interfaces/IHooks.ts:82
beforeSwap
▸ beforeSwap(sender, to, swapForY, amountIn): void
Parameters
| Name | Type |
|---|---|
sender | Address |
to | Address |
swapForY | bool |
amountIn | u256 |
Returns
void
Defined in
assembly/interfaces/IHooks.ts:47
getPair
▸ getPair(): IPair
Returns
Defined in
assembly/interfaces/IHooks.ts:30
init
▸ init(pair, masToSend): void
Calls the constructor
Parameters
| Name | Type | Description |
|---|---|---|
pair | Address | The pair associated to this hook |
masToSend | u64 | - |
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
| Name | Type |
|---|---|
hooksParameters | HooksParameters |
onHooksSetData | StaticArray<u8> |
Returns
void