Skip to content

Commit 348e8ce

Browse files
Fix: fixed seievm mainnet missing ntt executor (#696)
* Fix: fixed seievm mainnet missing ntt executor * Refactor: fix double quote marks
1 parent e06ef71 commit 348e8ce

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

evm/ts/src/nttWithExecutor.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const nttManagerWithExecutorAddresses: Partial<
4444
Worldchain: '0x66b1644400D51e104272337226De3EF1A820eC79',
4545
// @ts-ignore
4646
XRPLEVM: '0x6bBd1ff3bB303F88835A714EE3241bF45DE26d29',
47+
Seievm: '0x3F2D6441C7a59Dfe80f8e14142F9E28F6D440445',
4748
},
4849
Testnet: {
4950
ArbitrumSepolia: '0xd048170F1ECB8D47E499D3459aC379DA023E2C1B',
@@ -85,11 +86,11 @@ export class EvmNttWithExecutor<N extends Network, C extends EvmChains>
8586
readonly network: N,
8687
readonly chain: C,
8788
readonly provider: Provider,
88-
readonly contracts: Contracts & { ntt?: Ntt.Contracts }
89+
readonly contracts: Contracts & { ntt?: Ntt.Contracts },
8990
) {
9091
this.chainId = nativeChainIds.networkChainToNativeChainId.get(
9192
network,
92-
chain
93+
chain,
9394
) as bigint;
9495

9596
const executorAddress =
@@ -101,7 +102,7 @@ export class EvmNttWithExecutor<N extends Network, C extends EvmChains>
101102

102103
static async fromRpc<N extends Network>(
103104
provider: Provider,
104-
config: ChainsConfig<N, EvmPlatformType>
105+
config: ChainsConfig<N, EvmPlatformType>,
105106
): Promise<EvmNttWithExecutor<N, EvmChains>> {
106107
const [network, chain] = await EvmPlatform.chainFromRpc(provider);
107108
const conf = config[chain]!;
@@ -112,7 +113,7 @@ export class EvmNttWithExecutor<N extends Network, C extends EvmChains>
112113
network as N,
113114
chain,
114115
provider,
115-
conf.contracts
116+
conf.contracts,
116117
);
117118
}
118119

@@ -122,7 +123,7 @@ export class EvmNttWithExecutor<N extends Network, C extends EvmChains>
122123
amount: bigint,
123124
quote: NttWithExecutor.Quote,
124125
ntt: EvmNtt<N, C>,
125-
wrapNative: boolean = false
126+
wrapNative: boolean = false,
126127
): AsyncGenerator<UnsignedTransaction<N, C>> {
127128
const senderAddress = new EvmAddress(sender).toString();
128129

@@ -131,7 +132,7 @@ export class EvmNttWithExecutor<N extends Network, C extends EvmChains>
131132
// This will include any transceiver fees
132133
const deliveryPrice = await ntt.quoteDeliveryPrice(
133134
destination.chain,
134-
options
135+
options,
135136
);
136137

137138
if (wrapNative) {
@@ -140,18 +141,18 @@ export class EvmNttWithExecutor<N extends Network, C extends EvmChains>
140141

141142
const tokenContract = EvmPlatform.getTokenImplementation(
142143
this.provider,
143-
ntt.tokenAddress
144+
ntt.tokenAddress,
144145
);
145146

146147
const allowance = await tokenContract.allowance(
147148
senderAddress,
148-
this.executorAddress
149+
this.executorAddress,
149150
);
150151

151152
if (allowance < amount) {
152153
const txReq = await tokenContract.approve.populateTransaction(
153154
this.executorAddress,
154-
amount
155+
amount,
155156
);
156157

157158
yield ntt.createUnsignedTx(txReq, 'Ntt.Approve');
@@ -172,7 +173,7 @@ export class EvmNttWithExecutor<N extends Network, C extends EvmChains>
172173
.toUint8Array();
173174
const refundAddress = sender.toUniversalAddress().toUint8Array();
174175
const encodedInstructions = Ntt.encodeTransceiverInstructions(
175-
ntt.encodeOptions({ queue: false, automatic: false })
176+
ntt.encodeOptions({ queue: false, automatic: false }),
176177
);
177178
const executorArgs = {
178179
value: quote.estimatedCost,
@@ -206,7 +207,7 @@ export class EvmNttWithExecutor<N extends Network, C extends EvmChains>
206207
}
207208

208209
async estimateMsgValueAndGasLimit(
209-
recipient: ChainAddress | undefined
210+
recipient: ChainAddress | undefined,
210211
): Promise<{ msgValue: bigint; gasLimit: bigint }> {
211212
const gasLimit = gasLimitOverrides[this.network]?.[this.chain] ?? 500_000n;
212213
return { msgValue: 0n, gasLimit };

0 commit comments

Comments
 (0)