@wormhole-labs/cctp-executor-route 0.0.1-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -0
- package/dist/cjs/aptos/executor.d.ts +18 -0
- package/dist/cjs/aptos/executor.d.ts.map +1 -0
- package/dist/cjs/aptos/executor.js +73 -0
- package/dist/cjs/aptos/executor.js.map +1 -0
- package/dist/cjs/aptos/index.d.ts +2 -0
- package/dist/cjs/aptos/index.d.ts.map +1 -0
- package/dist/cjs/aptos/index.js +22 -0
- package/dist/cjs/aptos/index.js.map +1 -0
- package/dist/cjs/consts.d.ts +13 -0
- package/dist/cjs/consts.d.ts.map +1 -0
- package/dist/cjs/consts.js +94 -0
- package/dist/cjs/consts.js.map +1 -0
- package/dist/cjs/evm/executor.d.ts +19 -0
- package/dist/cjs/evm/executor.d.ts.map +1 -0
- package/dist/cjs/evm/executor.js +69 -0
- package/dist/cjs/evm/executor.js.map +1 -0
- package/dist/cjs/evm/index.d.ts +2 -0
- package/dist/cjs/evm/index.d.ts.map +1 -0
- package/dist/cjs/evm/index.js +22 -0
- package/dist/cjs/evm/index.js.map +1 -0
- package/dist/cjs/index.d.ts +96 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +321 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/layouts/conversions.d.ts +5 -0
- package/dist/cjs/layouts/conversions.d.ts.map +1 -0
- package/dist/cjs/layouts/conversions.js +8 -0
- package/dist/cjs/layouts/conversions.js.map +1 -0
- package/dist/cjs/layouts/index.d.ts +4 -0
- package/dist/cjs/layouts/index.d.ts.map +1 -0
- package/dist/cjs/layouts/index.js +20 -0
- package/dist/cjs/layouts/index.js.map +1 -0
- package/dist/cjs/layouts/relayInstruction.d.ts +86 -0
- package/dist/cjs/layouts/relayInstruction.d.ts.map +1 -0
- package/dist/cjs/layouts/relayInstruction.js +32 -0
- package/dist/cjs/layouts/relayInstruction.js.map +1 -0
- package/dist/cjs/layouts/requestForExecution.d.ts +18 -0
- package/dist/cjs/layouts/requestForExecution.d.ts.map +1 -0
- package/dist/cjs/layouts/requestForExecution.js +15 -0
- package/dist/cjs/layouts/requestForExecution.js.map +1 -0
- package/dist/cjs/layouts/signedQuote.d.ts +102 -0
- package/dist/cjs/layouts/signedQuote.d.ts.map +1 -0
- package/dist/cjs/layouts/signedQuote.js +46 -0
- package/dist/cjs/layouts/signedQuote.js.map +1 -0
- package/dist/cjs/sui/executor.d.ts +24 -0
- package/dist/cjs/sui/executor.d.ts.map +1 -0
- package/dist/cjs/sui/executor.js +129 -0
- package/dist/cjs/sui/executor.js.map +1 -0
- package/dist/cjs/sui/index.d.ts +2 -0
- package/dist/cjs/sui/index.d.ts.map +1 -0
- package/dist/cjs/sui/index.js +22 -0
- package/dist/cjs/sui/index.js.map +1 -0
- package/dist/cjs/svm/executor.d.ts +21 -0
- package/dist/cjs/svm/executor.d.ts.map +1 -0
- package/dist/cjs/svm/executor.js +89 -0
- package/dist/cjs/svm/executor.js.map +1 -0
- package/dist/cjs/svm/idl/example_cctp_with_executor.d.ts +72 -0
- package/dist/cjs/svm/idl/example_cctp_with_executor.d.ts.map +1 -0
- package/dist/cjs/svm/idl/example_cctp_with_executor.js +74 -0
- package/dist/cjs/svm/idl/example_cctp_with_executor.js.map +1 -0
- package/dist/cjs/svm/index.d.ts +2 -0
- package/dist/cjs/svm/index.d.ts.map +1 -0
- package/dist/cjs/svm/index.js +22 -0
- package/dist/cjs/svm/index.js.map +1 -0
- package/dist/cjs/types.d.ts +6 -0
- package/dist/cjs/types.d.ts.map +1 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/utils.d.ts +64 -0
- package/dist/cjs/utils.d.ts.map +1 -0
- package/dist/cjs/utils.js +74 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/aptos/executor.d.ts +18 -0
- package/dist/esm/aptos/executor.d.ts.map +1 -0
- package/dist/esm/aptos/executor.js +69 -0
- package/dist/esm/aptos/executor.js.map +1 -0
- package/dist/esm/aptos/index.d.ts +2 -0
- package/dist/esm/aptos/index.d.ts.map +1 -0
- package/dist/esm/aptos/index.js +6 -0
- package/dist/esm/aptos/index.js.map +1 -0
- package/dist/esm/consts.d.ts +13 -0
- package/dist/esm/consts.d.ts.map +1 -0
- package/dist/esm/consts.js +91 -0
- package/dist/esm/consts.js.map +1 -0
- package/dist/esm/evm/executor.d.ts +19 -0
- package/dist/esm/evm/executor.d.ts.map +1 -0
- package/dist/esm/evm/executor.js +65 -0
- package/dist/esm/evm/executor.js.map +1 -0
- package/dist/esm/evm/index.d.ts +2 -0
- package/dist/esm/evm/index.d.ts.map +1 -0
- package/dist/esm/evm/index.js +6 -0
- package/dist/esm/evm/index.js.map +1 -0
- package/dist/esm/index.d.ts +96 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +316 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/layouts/conversions.d.ts +5 -0
- package/dist/esm/layouts/conversions.d.ts.map +1 -0
- package/dist/esm/layouts/conversions.js +5 -0
- package/dist/esm/layouts/conversions.js.map +1 -0
- package/dist/esm/layouts/index.d.ts +4 -0
- package/dist/esm/layouts/index.d.ts.map +1 -0
- package/dist/esm/layouts/index.js +4 -0
- package/dist/esm/layouts/index.js.map +1 -0
- package/dist/esm/layouts/relayInstruction.d.ts +86 -0
- package/dist/esm/layouts/relayInstruction.d.ts.map +1 -0
- package/dist/esm/layouts/relayInstruction.js +29 -0
- package/dist/esm/layouts/relayInstruction.js.map +1 -0
- package/dist/esm/layouts/requestForExecution.d.ts +18 -0
- package/dist/esm/layouts/requestForExecution.d.ts.map +1 -0
- package/dist/esm/layouts/requestForExecution.js +12 -0
- package/dist/esm/layouts/requestForExecution.js.map +1 -0
- package/dist/esm/layouts/signedQuote.d.ts +102 -0
- package/dist/esm/layouts/signedQuote.d.ts.map +1 -0
- package/dist/esm/layouts/signedQuote.js +43 -0
- package/dist/esm/layouts/signedQuote.js.map +1 -0
- package/dist/esm/sui/executor.d.ts +24 -0
- package/dist/esm/sui/executor.d.ts.map +1 -0
- package/dist/esm/sui/executor.js +125 -0
- package/dist/esm/sui/executor.js.map +1 -0
- package/dist/esm/sui/index.d.ts +2 -0
- package/dist/esm/sui/index.d.ts.map +1 -0
- package/dist/esm/sui/index.js +6 -0
- package/dist/esm/sui/index.js.map +1 -0
- package/dist/esm/svm/executor.d.ts +21 -0
- package/dist/esm/svm/executor.d.ts.map +1 -0
- package/dist/esm/svm/executor.js +85 -0
- package/dist/esm/svm/executor.js.map +1 -0
- package/dist/esm/svm/idl/example_cctp_with_executor.d.ts +72 -0
- package/dist/esm/svm/idl/example_cctp_with_executor.d.ts.map +1 -0
- package/dist/esm/svm/idl/example_cctp_with_executor.js +71 -0
- package/dist/esm/svm/idl/example_cctp_with_executor.js.map +1 -0
- package/dist/esm/svm/index.d.ts +2 -0
- package/dist/esm/svm/index.d.ts.map +1 -0
- package/dist/esm/svm/index.js +6 -0
- package/dist/esm/svm/index.js.map +1 -0
- package/dist/esm/types.d.ts +6 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils.d.ts +64 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/dist/esm/utils.js +64 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Chain, Network } from "@wormhole-foundation/sdk-base";
|
|
2
|
+
import { amount } from "@wormhole-foundation/sdk-base";
|
|
3
|
+
import { EmptyPlatformMap, type ChainAddress, type ChainContext, type Signer, type TokenId } from "@wormhole-foundation/sdk-definitions";
|
|
4
|
+
import { routes, Wormhole } from "@wormhole-foundation/sdk-connect";
|
|
5
|
+
import { CCTPW7Executor } from "./types";
|
|
6
|
+
import "./aptos/index.js";
|
|
7
|
+
import "./evm/index.js";
|
|
8
|
+
import "./sui/index.js";
|
|
9
|
+
import "./svm/index.js";
|
|
10
|
+
export declare namespace CCTPW7ExecutorRoute {
|
|
11
|
+
type Options = {
|
|
12
|
+
nativeGas?: number;
|
|
13
|
+
};
|
|
14
|
+
type NormalizedParams = {
|
|
15
|
+
amount: amount.Amount;
|
|
16
|
+
};
|
|
17
|
+
interface ValidatedParams extends routes.ValidatedTransferParams<Options> {
|
|
18
|
+
normalizedParams: NormalizedParams;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
type Op = CCTPW7ExecutorRoute.Options;
|
|
22
|
+
type Vp = CCTPW7ExecutorRoute.ValidatedParams;
|
|
23
|
+
type Tp = routes.TransferParams<Op>;
|
|
24
|
+
type Vr = routes.ValidationResult<Op>;
|
|
25
|
+
export type QuoteDetails = {
|
|
26
|
+
signedQuote: Uint8Array;
|
|
27
|
+
relayInstructions: Uint8Array;
|
|
28
|
+
estimatedCost: bigint;
|
|
29
|
+
referrer: ChainAddress;
|
|
30
|
+
referrerFee: bigint;
|
|
31
|
+
remainingAmount: bigint;
|
|
32
|
+
referrerFeeDbps: bigint;
|
|
33
|
+
};
|
|
34
|
+
type Q = routes.Quote<Op, Vp, QuoteDetails>;
|
|
35
|
+
type QR = routes.QuoteResult<Op, Vp>;
|
|
36
|
+
type AT = {
|
|
37
|
+
id: string;
|
|
38
|
+
attestation: {};
|
|
39
|
+
};
|
|
40
|
+
type R = routes.Receipt<AT>;
|
|
41
|
+
export declare namespace CCTPW7ExecutorRoute {
|
|
42
|
+
type Config = {
|
|
43
|
+
referrerFeeDbps: bigint;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export declare function cctpW7ExecutorRoute(config: CCTPW7ExecutorRoute.Config): {
|
|
47
|
+
new <N extends Network>(wh: Wormhole<N>): {
|
|
48
|
+
readonly staticConfig: any;
|
|
49
|
+
getDefaultOptions(): Op;
|
|
50
|
+
validate(request: routes.RouteTransferRequest<N>, params: Tp): Promise<Vr>;
|
|
51
|
+
quote(request: routes.RouteTransferRequest<N>, params: Vp): Promise<QR>;
|
|
52
|
+
initiate(request: routes.RouteTransferRequest<N>, signer: Signer, quote: Q, to: ChainAddress): Promise<R>;
|
|
53
|
+
track(receipt: R, timeout?: number): AsyncGenerator<import("@wormhole-foundation/sdk-connect").SourceInitiatedTransferReceipt<"Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").FailedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").SourceFinalizedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").AttestedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").CompletedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia">, R, unknown>;
|
|
54
|
+
wh: Wormhole<N>;
|
|
55
|
+
transferUrl(txid: string): string;
|
|
56
|
+
};
|
|
57
|
+
config: CCTPW7ExecutorRoute.Config;
|
|
58
|
+
NATIVE_GAS_DROPOFF_SUPPORTED: boolean;
|
|
59
|
+
meta: {
|
|
60
|
+
name: string;
|
|
61
|
+
provider: string;
|
|
62
|
+
};
|
|
63
|
+
supportedNetworks(): Network[];
|
|
64
|
+
supportedChains(network: Network): Chain[];
|
|
65
|
+
supportedDestinationTokens<N extends Network>(sourceToken: TokenId, fromChain: ChainContext<N>, toChain: ChainContext<N>): Promise<TokenId[]>;
|
|
66
|
+
IS_AUTOMATIC: boolean;
|
|
67
|
+
};
|
|
68
|
+
export declare class CCTPW7ExecutorRoute<N extends Network> extends routes.AutomaticRoute<N, Op, Vp, R> implements routes.StaticRouteMethods<typeof CCTPW7ExecutorRoute> {
|
|
69
|
+
static NATIVE_GAS_DROPOFF_SUPPORTED: boolean;
|
|
70
|
+
readonly staticConfig: any;
|
|
71
|
+
static config: CCTPW7ExecutorRoute.Config;
|
|
72
|
+
static meta: {
|
|
73
|
+
name: string;
|
|
74
|
+
provider: string;
|
|
75
|
+
};
|
|
76
|
+
static supportedNetworks(): Network[];
|
|
77
|
+
static supportedChains(network: Network): Chain[];
|
|
78
|
+
static supportedDestinationTokens<N extends Network>(sourceToken: TokenId, fromChain: ChainContext<N>, toChain: ChainContext<N>): Promise<TokenId[]>;
|
|
79
|
+
getDefaultOptions(): Op;
|
|
80
|
+
validate(request: routes.RouteTransferRequest<N>, params: Tp): Promise<Vr>;
|
|
81
|
+
quote(request: routes.RouteTransferRequest<N>, params: Vp): Promise<QR>;
|
|
82
|
+
initiate(request: routes.RouteTransferRequest<N>, signer: Signer, quote: Q, to: ChainAddress): Promise<R>;
|
|
83
|
+
track(receipt: R, timeout?: number): AsyncGenerator<import("@wormhole-foundation/sdk-connect").SourceInitiatedTransferReceipt<"Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").FailedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").SourceFinalizedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").AttestedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia"> | import("@wormhole-foundation/sdk-connect").CompletedTransferReceipt<AT, "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia", "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia">, R, unknown>;
|
|
84
|
+
}
|
|
85
|
+
declare module "@wormhole-foundation/sdk-definitions" {
|
|
86
|
+
namespace WormholeRegistry {
|
|
87
|
+
interface ProtocolToInterfaceMapping<N, C> {
|
|
88
|
+
CCTPW7Executor: CCTPW7Executor<N, C>;
|
|
89
|
+
}
|
|
90
|
+
interface ProtocolToPlatformMapping {
|
|
91
|
+
CCTPW7Executor: EmptyPlatformMap<"CCTPW7Executor">;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EACL,MAAM,EAQP,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAIhB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAML,MAAM,EAGN,QAAQ,EACT,MAAM,kCAAkC,CAAC;AAS1C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAMzC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AAExB,yBAAiB,mBAAmB,CAAC;IACnC,KAAY,OAAO,GAAG;QAEpB,SAAS,CAAC,EAAE,MAAM,CAAC;KAC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AoB,CAAC,CAAC,CAAC,EACvC,MAAM,EAAE,EAAE,GACT,OAAO,CAAC,EAAE,CAAC;IAwMR,QAAQ,CACZ,OAAO,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,EACvC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,CAAC,EACR,EAAE,EAAE,YAAY,GACf,OAAO,CAAC,CAAC,CAAC;IAgDU,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM;CAqE1D;AAED,OAAO,QAAQ,sCAAsC,CAAC;IACpD,UAAiB,gBAAgB,CAAC;QAChC,UAAU,0BAA0B,CAAC,CAAC,EAAE,CAAC;YACvC,cAAc,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACtC;QACD,UAAU,yBAAyB;YACjC,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;SACpD;KACF;CACF"}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { amount, circle, contracts, deserializeLayout, encoding, finality, serializeLayout, toChainId, } from "@wormhole-foundation/sdk-base";
|
|
2
|
+
import { isSameToken, nativeTokenId, UniversalAddress, } from "@wormhole-foundation/sdk-definitions";
|
|
3
|
+
import { isAttested, isCompleted, isFailed, isSourceFinalized, isSourceInitiated, routes, signSendWait, TransferState, Wormhole, } from "@wormhole-foundation/sdk-connect";
|
|
4
|
+
import { calculateReferrerFee, fetchCapabilities, fetchSignedQuote, fetchStatus as fetchTxStatus, RelayStatus, } from "./utils";
|
|
5
|
+
import { relayInstructionsLayout, signedQuoteLayout } from "./layouts";
|
|
6
|
+
import { gasLimits, referrers, SOLANA_MSG_VALUE_BASE_FEE } from "./consts";
|
|
7
|
+
import { SolanaAddress } from "@wormhole-foundation/sdk-solana";
|
|
8
|
+
// IMPORTANT: register the platform specific implementations of the protocol
|
|
9
|
+
import "./aptos/index.js";
|
|
10
|
+
import "./evm/index.js";
|
|
11
|
+
import "./sui/index.js";
|
|
12
|
+
import "./svm/index.js";
|
|
13
|
+
// The minimum rent exemption amount for a 165 byte account (e.g. an ATA)
|
|
14
|
+
// cache it here to avoid fetching it from the Solana RPC
|
|
15
|
+
let ataMinRentAmount = undefined;
|
|
16
|
+
// Use this function to create a new CCTPW7ExecutorRoute with custom config
|
|
17
|
+
export function cctpW7ExecutorRoute(config) {
|
|
18
|
+
if (config.referrerFeeDbps < 0 || config.referrerFeeDbps > 65535n) {
|
|
19
|
+
throw new Error("Referrer fee must be between 0 and 65535");
|
|
20
|
+
}
|
|
21
|
+
class CCTPW7ExecutorRouteImpl extends CCTPW7ExecutorRoute {
|
|
22
|
+
static config = config;
|
|
23
|
+
}
|
|
24
|
+
return CCTPW7ExecutorRouteImpl;
|
|
25
|
+
}
|
|
26
|
+
export class CCTPW7ExecutorRoute extends routes.AutomaticRoute {
|
|
27
|
+
static NATIVE_GAS_DROPOFF_SUPPORTED = true;
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
// Since we set the config on the static class, access it with this param
|
|
30
|
+
// the CCTPW7ExecutorRoute.config will always be empty
|
|
31
|
+
staticConfig = this.constructor.config;
|
|
32
|
+
static config = { referrerFeeDbps: 0n };
|
|
33
|
+
static meta = {
|
|
34
|
+
name: "CCTPW7ExecutorRoute",
|
|
35
|
+
provider: "W7 Executor",
|
|
36
|
+
};
|
|
37
|
+
static supportedNetworks() {
|
|
38
|
+
return ["Mainnet", "Testnet"];
|
|
39
|
+
}
|
|
40
|
+
static supportedChains(network) {
|
|
41
|
+
if (contracts.circleContractChains.has(network)) {
|
|
42
|
+
return contracts.circleContractChains.get(network);
|
|
43
|
+
}
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
static async supportedDestinationTokens(sourceToken, fromChain, toChain) {
|
|
47
|
+
// Ensure the source token is USDC
|
|
48
|
+
const sourceChainUsdcContract = circle.usdcContract.get(fromChain.network, fromChain.chain);
|
|
49
|
+
if (!(sourceChainUsdcContract &&
|
|
50
|
+
isSameToken(sourceToken, Wormhole.tokenId(fromChain.chain, sourceChainUsdcContract)))) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
const { network, chain } = toChain;
|
|
54
|
+
if (!circle.usdcContract.has(network, chain))
|
|
55
|
+
return [];
|
|
56
|
+
return [
|
|
57
|
+
Wormhole.chainAddress(chain, circle.usdcContract.get(network, chain)),
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
getDefaultOptions() {
|
|
61
|
+
return {
|
|
62
|
+
nativeGas: 0,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
async validate(request, params) {
|
|
66
|
+
if (params.options?.nativeGas &&
|
|
67
|
+
(params.options.nativeGas < 0 || params.options.nativeGas > 1)) {
|
|
68
|
+
return {
|
|
69
|
+
valid: false,
|
|
70
|
+
error: new Error("Invalid native gas percentage"),
|
|
71
|
+
params,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const validatedParams = {
|
|
75
|
+
normalizedParams: {
|
|
76
|
+
amount: request.parseAmount(params.amount),
|
|
77
|
+
},
|
|
78
|
+
options: params.options ?? this.getDefaultOptions(),
|
|
79
|
+
...params,
|
|
80
|
+
};
|
|
81
|
+
return { valid: true, params: validatedParams };
|
|
82
|
+
}
|
|
83
|
+
async quote(request, params) {
|
|
84
|
+
const { fromChain, toChain } = request;
|
|
85
|
+
const srcUsdcAddress = circle.usdcContract.get(fromChain.network, fromChain.chain);
|
|
86
|
+
if (!srcUsdcAddress) {
|
|
87
|
+
throw new Error("Invalid transfer, no USDC contract on source");
|
|
88
|
+
}
|
|
89
|
+
const dstUsdcAddress = circle.usdcContract.get(toChain.network, toChain.chain);
|
|
90
|
+
if (!dstUsdcAddress) {
|
|
91
|
+
throw new Error("Invalid transfer, no USDC contract on destination");
|
|
92
|
+
}
|
|
93
|
+
const referrerAddress = referrers[fromChain.network]?.[fromChain.chain];
|
|
94
|
+
if (!referrerAddress) {
|
|
95
|
+
return {
|
|
96
|
+
success: false,
|
|
97
|
+
error: new Error("No referrer address found"),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const referrer = Wormhole.chainAddress(fromChain.chain, referrerAddress);
|
|
101
|
+
const referrerFeeDbps = this.staticConfig.referrerFeeDbps;
|
|
102
|
+
const { referrerFee, remainingAmount } = calculateReferrerFee(amount.units(params.normalizedParams.amount), this.staticConfig.referrerFeeDbps);
|
|
103
|
+
if (remainingAmount <= 0n) {
|
|
104
|
+
return {
|
|
105
|
+
success: false,
|
|
106
|
+
error: new Error("Amount after fee <= 0"),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
const gasLimit = gasLimits[fromChain.network]?.[toChain.chain];
|
|
110
|
+
if (!gasLimit) {
|
|
111
|
+
return {
|
|
112
|
+
success: false,
|
|
113
|
+
error: new Error("Gas limit not found"),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const capabilities = await fetchCapabilities(fromChain.network);
|
|
117
|
+
const srcCapabilities = capabilities[toChainId(fromChain.chain)];
|
|
118
|
+
if (!srcCapabilities) {
|
|
119
|
+
return {
|
|
120
|
+
success: false,
|
|
121
|
+
error: new Error("Unsupported source chain"),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
const dstCapabilities = capabilities[toChainId(toChain.chain)];
|
|
125
|
+
if (!dstCapabilities || !dstCapabilities.requestPrefixes.includes("ERC1")) {
|
|
126
|
+
return {
|
|
127
|
+
success: false,
|
|
128
|
+
error: new Error("Unsupported destination chain"),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
const { recipient } = request;
|
|
132
|
+
let tokenAccountExists = true;
|
|
133
|
+
// Check if the associated token account (ATA) exists on Solana.
|
|
134
|
+
// If it doesn't, include a gas drop-off instruction so the relayer can create it.
|
|
135
|
+
// Note: There's a potential race condition — the account might exist during this check,
|
|
136
|
+
// but could be closed before the transfer completes.
|
|
137
|
+
if (recipient && toChain.chain === "Solana") {
|
|
138
|
+
const usdcAddress = Wormhole.parseAddress("Solana", dstUsdcAddress);
|
|
139
|
+
const ata = await toChain.getTokenAccount(recipient.address, usdcAddress);
|
|
140
|
+
const connection = await toChain.getRpc();
|
|
141
|
+
const ataAccount = await connection.getAccountInfo(new SolanaAddress(ata.address).unwrap());
|
|
142
|
+
tokenAccountExists = ataAccount !== null;
|
|
143
|
+
if (!tokenAccountExists && !ataMinRentAmount) {
|
|
144
|
+
ataMinRentAmount = BigInt(await connection.getMinimumBalanceForRentExemption(165));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
let msgValue = 0n;
|
|
148
|
+
if (toChain.chain === "Solana") {
|
|
149
|
+
msgValue += SOLANA_MSG_VALUE_BASE_FEE;
|
|
150
|
+
if (!tokenAccountExists && ataMinRentAmount) {
|
|
151
|
+
msgValue += ataMinRentAmount;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
const relayRequests = [];
|
|
155
|
+
// Add the gas instruction
|
|
156
|
+
relayRequests.push({
|
|
157
|
+
request: {
|
|
158
|
+
type: "GasInstruction",
|
|
159
|
+
gasLimit,
|
|
160
|
+
msgValue,
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
// Calculate the gas dropOff value
|
|
164
|
+
const gasDropOffLimit = BigInt(dstCapabilities.gasDropOffLimit);
|
|
165
|
+
const dropOff = params.options.nativeGas && gasDropOffLimit > 0n
|
|
166
|
+
? (BigInt(Math.round(params.options.nativeGas * 100)) *
|
|
167
|
+
gasDropOffLimit) /
|
|
168
|
+
100n
|
|
169
|
+
: 0n;
|
|
170
|
+
// Add the gas drop-off instruction if applicable
|
|
171
|
+
if (dropOff > 0n || !tokenAccountExists) {
|
|
172
|
+
relayRequests.push({
|
|
173
|
+
request: {
|
|
174
|
+
type: "GasDropOffInstruction",
|
|
175
|
+
dropOff,
|
|
176
|
+
// If the recipient is undefined (e.g. the user hasn’t connected their wallet yet),
|
|
177
|
+
// we temporarily use a dummy address to fetch a quote.
|
|
178
|
+
// The recipient address is validated later in the `initiate` method, which will throw if it's still missing.
|
|
179
|
+
recipient: recipient
|
|
180
|
+
? recipient.address.toUniversalAddress()
|
|
181
|
+
: new UniversalAddress(new Uint8Array(32)),
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
const relayInstructions = serializeLayout(relayInstructionsLayout, {
|
|
186
|
+
requests: relayRequests,
|
|
187
|
+
});
|
|
188
|
+
const quote = await fetchSignedQuote(fromChain.network, fromChain.chain, toChain.chain, encoding.hex.encode(relayInstructions, true));
|
|
189
|
+
if (!quote.estimatedCost) {
|
|
190
|
+
return {
|
|
191
|
+
success: false,
|
|
192
|
+
error: new Error("No estimated cost"),
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
const signedQuoteBytes = encoding.hex.decode(quote.signedQuote);
|
|
196
|
+
const signedQuote = deserializeLayout(signedQuoteLayout, signedQuoteBytes);
|
|
197
|
+
// https://developers.circle.com/stablecoins/docs/required-block-confirmations
|
|
198
|
+
const eta = fromChain.chain === "Polygon"
|
|
199
|
+
? 2_000 * 200
|
|
200
|
+
: finality.estimateFinalityTime(fromChain.chain) + 1_000; // buffer for the relayer
|
|
201
|
+
const estimatedCost = BigInt(quote.estimatedCost);
|
|
202
|
+
const details = {
|
|
203
|
+
signedQuote: signedQuoteBytes,
|
|
204
|
+
relayInstructions: relayInstructions,
|
|
205
|
+
estimatedCost,
|
|
206
|
+
referrer,
|
|
207
|
+
referrerFee,
|
|
208
|
+
remainingAmount,
|
|
209
|
+
referrerFeeDbps,
|
|
210
|
+
};
|
|
211
|
+
const [srcNativeDecimals, dstNativeDecimals] = await Promise.all([
|
|
212
|
+
fromChain.getDecimals("native"),
|
|
213
|
+
toChain.getDecimals("native"),
|
|
214
|
+
]);
|
|
215
|
+
return {
|
|
216
|
+
success: true,
|
|
217
|
+
params,
|
|
218
|
+
sourceToken: {
|
|
219
|
+
token: request.source.id,
|
|
220
|
+
amount: params.normalizedParams.amount,
|
|
221
|
+
},
|
|
222
|
+
destinationToken: {
|
|
223
|
+
token: request.destination.id,
|
|
224
|
+
amount: amount.fromBaseUnits(remainingAmount, request.destination.decimals),
|
|
225
|
+
},
|
|
226
|
+
relayFee: {
|
|
227
|
+
token: nativeTokenId(fromChain.chain),
|
|
228
|
+
amount: amount.fromBaseUnits(estimatedCost, srcNativeDecimals),
|
|
229
|
+
},
|
|
230
|
+
destinationNativeGas: amount.fromBaseUnits(dropOff, dstNativeDecimals),
|
|
231
|
+
eta,
|
|
232
|
+
expires: signedQuote.quote.expiryTime,
|
|
233
|
+
details,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
async initiate(request, signer, quote, to) {
|
|
237
|
+
if (!quote.details) {
|
|
238
|
+
throw new Error("Missing quote details");
|
|
239
|
+
}
|
|
240
|
+
const relayInstructions = deserializeLayout(relayInstructionsLayout, quote.details.relayInstructions);
|
|
241
|
+
// Make sure that the gas drop-off recipient matches the actual recipient
|
|
242
|
+
relayInstructions.requests.forEach(({ request }) => {
|
|
243
|
+
if (request.type === "GasDropOffInstruction" &&
|
|
244
|
+
!request.recipient.equals(to.address.toUniversalAddress())) {
|
|
245
|
+
throw new Error("Gas drop-off recipient does not match");
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
const executor = await request.fromChain.getProtocol("CCTPW7Executor");
|
|
249
|
+
const sender = Wormhole.parseAddress(signer.chain(), signer.address());
|
|
250
|
+
// When transferring to Solana, the recipient address is the ATA for CCTP transfers
|
|
251
|
+
let cctpRecipient = to;
|
|
252
|
+
if (to.chain === "Solana") {
|
|
253
|
+
const usdcAddress = Wormhole.parseAddress("Solana", circle.usdcContract.get(request.toChain.network, request.toChain.chain));
|
|
254
|
+
cctpRecipient = await request.toChain.getTokenAccount(to.address, usdcAddress);
|
|
255
|
+
}
|
|
256
|
+
const xfer = await executor.transfer(sender, cctpRecipient, quote.details);
|
|
257
|
+
const txids = await signSendWait(request.fromChain, xfer, signer);
|
|
258
|
+
return {
|
|
259
|
+
from: request.fromChain.chain,
|
|
260
|
+
to: request.toChain.chain,
|
|
261
|
+
state: TransferState.SourceInitiated,
|
|
262
|
+
originTxs: txids,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
async *track(receipt, timeout) {
|
|
266
|
+
if (isCompleted(receipt) || isFailed(receipt))
|
|
267
|
+
return receipt;
|
|
268
|
+
let leftover = timeout ? timeout : 60 * 60 * 1000;
|
|
269
|
+
while (leftover > 0) {
|
|
270
|
+
const start = Date.now();
|
|
271
|
+
if (isSourceInitiated(receipt) ||
|
|
272
|
+
isSourceFinalized(receipt) ||
|
|
273
|
+
isAttested(receipt)) {
|
|
274
|
+
try {
|
|
275
|
+
const [txStatus] = await fetchTxStatus(this.wh.network, receipt.originTxs.at(-1).txid, receipt.from);
|
|
276
|
+
if (!txStatus) {
|
|
277
|
+
throw new Error("No transaction status found");
|
|
278
|
+
}
|
|
279
|
+
const relayStatus = txStatus?.status;
|
|
280
|
+
if (relayStatus === RelayStatus.Failed || // this could happen if simulation fails
|
|
281
|
+
relayStatus === RelayStatus.Underpaid || // only happens if you don't pay at least the costEstimate
|
|
282
|
+
relayStatus === RelayStatus.Unsupported || // capabilities check didn't pass
|
|
283
|
+
relayStatus === RelayStatus.Aborted // An unrecoverable error indicating the attempt should stop (bad data, pre-flight checks failed, or chain-specific conditions)
|
|
284
|
+
) {
|
|
285
|
+
receipt = {
|
|
286
|
+
...receipt,
|
|
287
|
+
state: TransferState.Failed,
|
|
288
|
+
error: new routes.RelayFailedError(`Relay failed with status: ${relayStatus}`),
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
if (relayStatus === RelayStatus.Submitted) {
|
|
292
|
+
receipt = {
|
|
293
|
+
...receipt,
|
|
294
|
+
state: TransferState.DestinationFinalized,
|
|
295
|
+
attestation: { id: txStatus.id, attestation: {} },
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
// Important to yield before checking for completion
|
|
299
|
+
// so the caller can update the receipt state
|
|
300
|
+
yield receipt;
|
|
301
|
+
if (isCompleted(receipt) || isFailed(receipt)) {
|
|
302
|
+
return receipt;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
catch (error) {
|
|
306
|
+
console.error(`Error fetching transaction status: ${error.message || error}`);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
// Sleep so we don't spam the endpoint
|
|
310
|
+
await new Promise((resolve) => setTimeout(resolve, 3000));
|
|
311
|
+
leftover -= Date.now() - start;
|
|
312
|
+
}
|
|
313
|
+
return receipt;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,SAAS,GACV,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,WAAW,EACX,aAAa,EACb,gBAAgB,GAKjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,YAAY,EACZ,aAAa,EACb,QAAQ,GACT,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,IAAI,aAAa,EAC5B,WAAW,GACZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,4EAA4E;AAC5E,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,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BACnK,CAAC;wBACD,OAAO,GAAG;4BACR,GAAG,OAAO;4BACV,KAAK,EAAE,aAAa,CAAC,MAAM;4BAC3B,KAAK,EAAE,IAAI,MAAM,CAAC,gBAAgB,CAChC,6BAA6B,WAAW,EAAE,CAC3C;yBACF,CAAC;oBACJ,CAAC;oBAED,IAAI,WAAW,KAAK,WAAW,CAAC,SAAS,EAAE,CAAC;wBAC1C,OAAO,GAAG;4BACR,GAAG,OAAO;4BACV,KAAK,EAAE,aAAa,CAAC,oBAAoB;4BACzC,WAAW,EAAE,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;yBAClD,CAAC;oBACJ,CAAC;oBAED,oDAAoD;oBACpD,6CAA6C;oBAC7C,MAAM,OAAO,CAAC;oBAEd,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;wBAC9C,OAAO,OAAO,CAAC;oBACjB,CAAC;gBACH,CAAC;gBAAC,OAAO,KAAU,EAAE,CAAC;oBACpB,OAAO,CAAC,KAAK,CACX,sCAAsC,KAAK,CAAC,OAAO,IAAI,KAAK,EAAE,CAC/D,CAAC;gBACJ,CAAC;YACH,CAAC;YAED,sCAAsC;YACtC,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;YAC1D,QAAQ,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;QACjC,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversions.d.ts","sourceRoot":"","sources":["../../../src/layouts/conversions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;2BACX,MAAM;6BACJ,IAAI;CAC6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversions.js","sourceRoot":"","sources":["../../../src/layouts/conversions.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,EAAE,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;IAC1D,IAAI,EAAE,CAAC,OAAa,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK;CACT,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { DeriveType } from "binary-layout";
|
|
2
|
+
export declare const gasInstructionLayout: readonly [{
|
|
3
|
+
readonly name: "gasLimit";
|
|
4
|
+
readonly binary: "uint";
|
|
5
|
+
readonly size: 16;
|
|
6
|
+
}, {
|
|
7
|
+
readonly name: "msgValue";
|
|
8
|
+
readonly binary: "uint";
|
|
9
|
+
readonly size: 16;
|
|
10
|
+
}];
|
|
11
|
+
export type GasInstruction = DeriveType<typeof gasInstructionLayout>;
|
|
12
|
+
export declare const gasDropOffInstructionLayout: readonly [{
|
|
13
|
+
readonly name: "dropOff";
|
|
14
|
+
readonly binary: "uint";
|
|
15
|
+
readonly size: 16;
|
|
16
|
+
}, {
|
|
17
|
+
readonly binary: "bytes";
|
|
18
|
+
readonly size: 32;
|
|
19
|
+
readonly custom: {
|
|
20
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-connect").UniversalAddress;
|
|
21
|
+
from: (val: import("@wormhole-foundation/sdk-connect").UniversalAddress) => Uint8Array;
|
|
22
|
+
};
|
|
23
|
+
readonly name: "recipient";
|
|
24
|
+
}];
|
|
25
|
+
export type GasDropOffInstruction = DeriveType<typeof gasDropOffInstructionLayout>;
|
|
26
|
+
export declare const relayInstructionLayout: readonly [{
|
|
27
|
+
readonly name: "request";
|
|
28
|
+
readonly binary: "switch";
|
|
29
|
+
readonly idSize: 1;
|
|
30
|
+
readonly idTag: "type";
|
|
31
|
+
readonly layouts: readonly [readonly [readonly [1, "GasInstruction"], readonly [{
|
|
32
|
+
readonly name: "gasLimit";
|
|
33
|
+
readonly binary: "uint";
|
|
34
|
+
readonly size: 16;
|
|
35
|
+
}, {
|
|
36
|
+
readonly name: "msgValue";
|
|
37
|
+
readonly binary: "uint";
|
|
38
|
+
readonly size: 16;
|
|
39
|
+
}]], readonly [readonly [2, "GasDropOffInstruction"], readonly [{
|
|
40
|
+
readonly name: "dropOff";
|
|
41
|
+
readonly binary: "uint";
|
|
42
|
+
readonly size: 16;
|
|
43
|
+
}, {
|
|
44
|
+
readonly binary: "bytes";
|
|
45
|
+
readonly size: 32;
|
|
46
|
+
readonly custom: {
|
|
47
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-connect").UniversalAddress;
|
|
48
|
+
from: (val: import("@wormhole-foundation/sdk-connect").UniversalAddress) => Uint8Array;
|
|
49
|
+
};
|
|
50
|
+
readonly name: "recipient";
|
|
51
|
+
}]]];
|
|
52
|
+
}];
|
|
53
|
+
export type RelayInstruction = DeriveType<typeof relayInstructionLayout>;
|
|
54
|
+
export declare const relayInstructionsLayout: readonly [{
|
|
55
|
+
readonly name: "requests";
|
|
56
|
+
readonly binary: "array";
|
|
57
|
+
readonly layout: readonly [{
|
|
58
|
+
readonly name: "request";
|
|
59
|
+
readonly binary: "switch";
|
|
60
|
+
readonly idSize: 1;
|
|
61
|
+
readonly idTag: "type";
|
|
62
|
+
readonly layouts: readonly [readonly [readonly [1, "GasInstruction"], readonly [{
|
|
63
|
+
readonly name: "gasLimit";
|
|
64
|
+
readonly binary: "uint";
|
|
65
|
+
readonly size: 16;
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "msgValue";
|
|
68
|
+
readonly binary: "uint";
|
|
69
|
+
readonly size: 16;
|
|
70
|
+
}]], readonly [readonly [2, "GasDropOffInstruction"], readonly [{
|
|
71
|
+
readonly name: "dropOff";
|
|
72
|
+
readonly binary: "uint";
|
|
73
|
+
readonly size: 16;
|
|
74
|
+
}, {
|
|
75
|
+
readonly binary: "bytes";
|
|
76
|
+
readonly size: 32;
|
|
77
|
+
readonly custom: {
|
|
78
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-connect").UniversalAddress;
|
|
79
|
+
from: (val: import("@wormhole-foundation/sdk-connect").UniversalAddress) => Uint8Array;
|
|
80
|
+
};
|
|
81
|
+
readonly name: "recipient";
|
|
82
|
+
}]]];
|
|
83
|
+
}];
|
|
84
|
+
}];
|
|
85
|
+
export type RelayInstructions = DeriveType<typeof relayInstructionsLayout>;
|
|
86
|
+
//# sourceMappingURL=relayInstruction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relayInstruction.d.ts","sourceRoot":"","sources":["../../../src/layouts/relayInstruction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAU,MAAM,eAAe,CAAC;AAEnD,eAAO,MAAM,oBAAoB;;;;;;;;EAGN,CAAC;AAE5B,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAErE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;EAGb,CAAC;AAE5B,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAC5C,OAAO,2BAA2B,CACnC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;EAWR,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEzE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMT,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|