@@ -21,124 +21,28 @@ An abstract contract that implements core token pool functionality for burning a
2121
2222- [ TokenPool] ( /ccip/api-reference/evm/v1.6.1/token-pool )
2323
24- ## Events
25-
26- ### Burned
27-
28- ``` solidity
29- event Burned(address indexed sender, uint256 amount);
30- ```
31-
32- <Aside >Emitted when tokens are burned in the pool.</Aside >
33-
34- ** Parameters**
35-
36- | Name | Type | Indexed | Description |
37- | -------- | --------- | ------- | ----------------------------------------- |
38- | ` sender ` | ` address ` | Yes | The address initiating the burn operation |
39- | ` amount ` | ` uint256 ` | No | The number of tokens burned |
40-
41- ### Minted
42-
43- ``` solidity
44- event Minted(address indexed sender, address indexed recipient, uint256 amount);
45- ```
46-
47- <Aside >Emitted when new tokens are minted from the pool.</Aside >
48-
49- ** Parameters**
50-
51- | Name | Type | Indexed | Description |
52- | ----------- | --------- | ------- | ----------------------------------------- |
53- | ` sender ` | ` address ` | Yes | The address initiating the mint operation |
54- | ` recipient ` | ` address ` | Yes | The address receiving the minted tokens |
55- | ` amount ` | ` uint256 ` | No | The number of tokens minted |
56-
5724## Functions
5825
59- ### \_ burn
60-
61- Internal function that executes the token burning operation.
62-
63- ``` solidity
64- function _burn(uint256 amount) internal virtual;
65- ```
66-
67- <Aside >
68- Contains the specific burn call for a pool.
69-
70- This method can be overridden to create pools with different burn signatures without duplicating the underlying logic.
26+ ### \_ releaseOrMint
7127
72- </Aside >
73-
74- ** Parameters**
75-
76- | Name | Type | Description |
77- | -------- | --------- | ---------------------------- |
78- | ` amount ` | ` uint256 ` | The number of tokens to burn |
79-
80- ### lockOrBurn
81-
82- Burns tokens in the pool during a cross-chain transfer.
83-
84- ``` solidity
85- function lockOrBurn(
86- Pool.LockOrBurnInV1 calldata lockOrBurnIn
87- ) external virtual override returns (Pool.LockOrBurnOutV1 memory);
88- ```
89-
90- <Aside >
91-
92- Burns tokens in the pool with essential security validation:
93-
94- - Performs security validation through ` _validateLockOrBurn `
95- - Burns the specified amount of tokens
96- - Emits a ` Burned ` event
97- - Returns destination token information
98-
99- </Aside >
100-
101- ** Parameters**
102-
103- | Name | Type | Description |
104- | -------------- | --------------------------------------------------------------------------- | --------------------------------------- |
105- | ` lockOrBurnIn ` | [ ` Pool.LockOrBurnInV1 ` ] ( /ccip/api-reference/evm/v1.6.1/pool#lockorburninv1 ) | Input parameters for the burn operation |
106-
107- ** Returns**
108-
109- | Type | Description |
110- | ----------------------------------------------------------------------------- | ------------------------------------------------ |
111- | [ ` Pool.LockOrBurnOutV1 ` ] ( /ccip/api-reference/evm/v1.6.1/pool#lockorburnoutv1 ) | Contains destination token address and pool data |
112-
113- ### releaseOrMint
114-
115- Mints new tokens to a recipient during a cross-chain transfer.
28+ Internal function that implements the token minting logic for a ` BurnMintTokenPool ` .
11629
11730``` solidity
118- function releaseOrMint(
119- Pool.ReleaseOrMintInV1 calldata releaseOrMintIn
120- ) external virtual override returns (Pool.ReleaseOrMintOutV1 memory);
31+ function _releaseOrMint(address receiver, uint256 amount) internal virtual override;
12132```
12233
12334<Aside >
12435
125- Mints tokens to a specified recipient with the following steps :
36+ Overrides the virtual [ ` _releaseOrMint ` ] ( /ccip/api-reference/evm/v1.6.1/token-pool#_releaseormint ) function from the base ` TokenPool ` contract :
12637
127- - Performs security validation through ` _validateReleaseOrMint `
128- - Calculates the correct local token amount using decimal adjustments
129- - Mints tokens to the specified receiver
130- - Emits a ` Minted ` event
38+ - Provides the specific "mint" implementation for the ` BurnMintTokenPool ` .
39+ - Calls the token's ` mint(receiver, amount) ` function directly.
13140
13241</Aside >
13342
13443** Parameters**
13544
136- | Name | Type | Description |
137- | ----------------- | --------------------------------------------------------------------------------- | --------------------------------------- |
138- | ` releaseOrMintIn ` | [ ` Pool.ReleaseOrMintInV1 ` ] ( /ccip/api-reference/evm/v1.6.1/pool#releaseormintinv1 ) | Input parameters for the mint operation |
139-
140- ** Returns**
141-
142- | Type | Description |
143- | ----------------------------------------------------------------------------------- | ------------------------------------------------ |
144- | [ ` Pool.ReleaseOrMintOutV1 ` ] ( /ccip/api-reference/evm/v1.6.1/pool#releaseormintoutv1 ) | Contains the final amount minted in local tokens |
45+ | Name | Type | Description |
46+ | ---------- | --------- | --------------------------------- |
47+ | ` receiver ` | ` address ` | The address to receive the tokens |
48+ | ` amount ` | ` uint256 ` | The number of tokens to mint |
0 commit comments