@@ -102,6 +102,16 @@ pub struct TransferBurn<'info> {
102
102
}
103
103
104
104
// TODO: fees for relaying?
105
+ /// Burns tokens and issues a corresponding notification to the outbox of the connected
106
+ /// [`NttManagerPeer`].
107
+ /// SECURITY: Owner checks are disabled here. Ownership checks are enforced by implicit
108
+ /// anchor constraints in the `Transfer` account struct.
109
+ /// transaction
110
+ /// SECURITY: Signer check is disabled here. The signer is checked via the `Transfer` struct
111
+ /// wrapped by`TransferBurn`.
112
+ #[ allow( unknown_lints) ]
113
+ #[ allow( missing_owner_check) ]
114
+ #[ allow( missing_signer_check) ]
105
115
pub fn transfer_burn ( ctx : Context < TransferBurn > , args : TransferArgs ) -> Result < ( ) > {
106
116
require_eq ! (
107
117
ctx. accounts. common. config. mode,
@@ -124,6 +134,8 @@ pub fn transfer_burn(ctx: Context<TransferBurn>, args: TransferArgs) -> Result<(
124
134
accs. peer . token_decimals ,
125
135
) ;
126
136
137
+ // Missing ownership checks are OK here. These accounts are verified via
138
+ // implicit constraints in `InterfaceAccount`, `TokenAccount` and `Mint` defined above.
127
139
token_interface:: burn (
128
140
CpiContext :: new_with_signer (
129
141
accs. common . token_program . to_account_info ( ) ,
@@ -186,6 +198,16 @@ pub struct TransferLock<'info> {
186
198
187
199
// TODO: fees for relaying?
188
200
// TODO: factor out common bits
201
+ /// Locks tokens and issues a corresponding notification to the outbox of the connected
202
+ /// [`NttManagerPeer`].
203
+ /// SECURITY: Owner checks are disabled here. Ownership checks are enforced by implicit
204
+ /// anchor constraints in the `Transfer` account struct.
205
+ /// transaction
206
+ /// SECURITY: Signer check is disabled here. The signer is checked via the `Transfer` struct
207
+ /// wrapped by`TransferLock`
208
+ #[ allow( unknown_lints) ]
209
+ #[ allow( missing_owner_check) ]
210
+ #[ allow( missing_signer_check) ]
189
211
pub fn transfer_lock ( ctx : Context < TransferLock > , args : TransferArgs ) -> Result < ( ) > {
190
212
require_eq ! (
191
213
ctx. accounts. common. config. mode,
@@ -208,6 +230,8 @@ pub fn transfer_lock(ctx: Context<TransferLock>, args: TransferArgs) -> Result<(
208
230
accs. peer . token_decimals ,
209
231
) ;
210
232
233
+ // Missing ownership checks are OK here. These accounts are verified via
234
+ // implicit constraints in `InterfaceAccount`, `TokenAccount` and `Mint` defined above.
211
235
token_interface:: transfer_checked (
212
236
CpiContext :: new_with_signer (
213
237
accs. common . token_program . to_account_info ( ) ,
0 commit comments