@@ -165,54 +165,6 @@ export class EvmNttWormholeTranceiver<N extends Network, C extends EvmChains>
165165 "WormholeTransceiver.receiveMessage"
166166 ) ;
167167 }
168-
169- async isWormholeRelayingEnabled ( destChain : Chain ) : Promise < boolean > {
170- if ( ! ( "isWormholeRelayingEnabled" in this . transceiver ) ) return false ;
171- return await this . transceiver . isWormholeRelayingEnabled (
172- toChainId ( destChain )
173- ) ;
174- }
175-
176- async * setIsWormholeRelayingEnabled ( destChain : Chain , enabled : boolean ) {
177- if ( ! ( "setIsWormholeRelayingEnabled" in this . transceiver ) ) {
178- throw new Error (
179- "setIsWormholeRelayingEnabled is not supported by this ABI version"
180- ) ;
181- }
182- const tx =
183- await this . transceiver . setIsWormholeRelayingEnabled . populateTransaction (
184- toChainId ( destChain ) ,
185- enabled
186- ) ;
187- yield this . manager . createUnsignedTx (
188- tx ,
189- "WormholeTransceiver.setWormholeRelayingEnabled"
190- ) ;
191- }
192-
193- async isSpecialRelayingEnabled ( destChain : Chain ) : Promise < boolean > {
194- if ( ! ( "isSpecialRelayingEnabled" in this . transceiver ) ) return false ;
195- return await this . transceiver . isSpecialRelayingEnabled (
196- toChainId ( destChain )
197- ) ;
198- }
199-
200- async * setIsSpecialRelayingEnabled ( destChain : Chain , enabled : boolean ) {
201- if ( ! ( "setIsSpecialRelayingEnabled" in this . transceiver ) ) {
202- throw new Error (
203- "setIsSpecialRelayingEnabled is not supported by this ABI version"
204- ) ;
205- }
206- const tx =
207- await this . transceiver . setIsSpecialRelayingEnabled . populateTransaction (
208- toChainId ( destChain ) ,
209- enabled
210- ) ;
211- yield this . manager . createUnsignedTx (
212- tx ,
213- "WormholeTransceiver.setSpecialRelayingEnabled"
214- ) ;
215- }
216168}
217169
218170export class EvmNtt < N extends Network , C extends EvmChains >
@@ -374,25 +326,8 @@ export class EvmNtt<N extends Network, C extends EvmChains>
374326 yield this . createUnsignedTx ( tx , "Ntt.setThreshold" ) ;
375327 }
376328
377- async isRelayingAvailable ( destination : Chain ) : Promise < boolean > {
378- const enabled = await Promise . all (
379- this . xcvrs . map ( async ( x ) => {
380- const [ wh , special ] = await Promise . all ( [
381- x . isWormholeRelayingEnabled ( destination ) ,
382- x . isSpecialRelayingEnabled ( destination ) ,
383- ] ) ;
384- return wh || special ;
385- } )
386- ) ;
387-
388- return enabled . filter ( ( x ) => x ) . length > 0 ;
389- }
390-
391329 async getIsExecuted ( attestation : Ntt . Attestation ) : Promise < boolean > {
392- const payload =
393- attestation . payloadName === "WormholeTransfer"
394- ? attestation . payload
395- : attestation . payload [ "payload" ] ;
330+ const payload = attestation . payload ;
396331 const isExecuted = await this . manager . isMessageExecuted (
397332 Ntt . messageDigest ( attestation . emitterChain , payload [ "nttManagerPayload" ] )
398333 ) ;
@@ -404,10 +339,7 @@ export class EvmNtt<N extends Network, C extends EvmChains>
404339 async getIsTransferInboundQueued (
405340 attestation : Ntt . Attestation
406341 ) : Promise < boolean > {
407- const payload =
408- attestation . payloadName === "WormholeTransfer"
409- ? attestation . payload
410- : attestation . payload [ "payload" ] ;
342+ const payload = attestation . payload ;
411343 return (
412344 ( await this . getInboundQueuedTransfer (
413345 attestation . emitterChain ,
@@ -417,10 +349,7 @@ export class EvmNtt<N extends Network, C extends EvmChains>
417349 }
418350
419351 getIsApproved ( attestation : Ntt . Attestation ) : Promise < boolean > {
420- const payload =
421- attestation . payloadName === "WormholeTransfer"
422- ? attestation . payload
423- : attestation . payload [ "payload" ] ;
352+ const payload = attestation . payload ;
424353 return this . manager . isMessageApproved (
425354 Ntt . messageDigest ( attestation . emitterChain , payload [ "nttManagerPayload" ] )
426355 ) ;
0 commit comments