@b3dotfun/sdk 0.0.29 → 0.0.30-alpha.0
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/dist/cjs/anyspend/constants/index.d.ts +1 -0
- package/dist/cjs/anyspend/constants/index.js +2 -1
- package/dist/cjs/anyspend/react/components/AnySpend.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +23 -24
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +1 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +4 -2
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +17 -10
- package/dist/cjs/anyspend/react/components/common/ConnectWalletPayment.js +9 -1
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +130 -41
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +6 -3
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +6 -4
- package/dist/cjs/anyspend/react/components/common/OrderStatus.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/common/OrderStatus.js +2 -2
- package/dist/cjs/anyspend/react/components/common/PaySection.js +6 -4
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +2 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +34 -3
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +1 -1
- package/dist/cjs/bondkit/abis/BondkitTokenABI.d.ts +62 -17
- package/dist/cjs/bondkit/abis/BondkitTokenABI.js +41 -9
- package/dist/cjs/bondkit/abis/BondkitTokenFactoryABI.d.ts +0 -25
- package/dist/cjs/bondkit/abis/BondkitTokenFactoryABI.js +0 -9
- package/dist/cjs/bondkit/constants.js +1 -1
- package/dist/cjs/global-account/react/components/LinkAccount/LinkAccount.js +28 -15
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +1 -1
- package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.d.ts +1 -0
- package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +1 -0
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +4 -2
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +2 -2
- package/dist/cjs/shared/constants/chains/supported.d.ts +4 -4
- package/dist/esm/anyspend/constants/index.d.ts +1 -0
- package/dist/esm/anyspend/constants/index.js +1 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBondKit.js +23 -24
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +1 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +4 -2
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +19 -12
- package/dist/esm/anyspend/react/components/common/ConnectWalletPayment.js +6 -1
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +133 -44
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +7 -4
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +7 -5
- package/dist/esm/anyspend/react/components/common/OrderStatus.d.ts +2 -0
- package/dist/esm/anyspend/react/components/common/OrderStatus.js +2 -2
- package/dist/esm/anyspend/react/components/common/PaySection.js +7 -5
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +2 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +35 -4
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +1 -1
- package/dist/esm/bondkit/abis/BondkitTokenABI.d.ts +62 -17
- package/dist/esm/bondkit/abis/BondkitTokenABI.js +41 -9
- package/dist/esm/bondkit/abis/BondkitTokenFactoryABI.d.ts +0 -25
- package/dist/esm/bondkit/abis/BondkitTokenFactoryABI.js +0 -9
- package/dist/esm/bondkit/constants.js +1 -1
- package/dist/esm/global-account/react/components/LinkAccount/LinkAccount.js +28 -15
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +1 -1
- package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.d.ts +1 -0
- package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +1 -0
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +4 -2
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +2 -2
- package/dist/esm/shared/constants/chains/supported.d.ts +4 -4
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/constants/index.d.ts +1 -0
- package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +4 -2
- package/dist/types/anyspend/react/components/common/OrderStatus.d.ts +2 -0
- package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +2 -1
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +1 -1
- package/dist/types/bondkit/abis/BondkitTokenABI.d.ts +62 -17
- package/dist/types/bondkit/abis/BondkitTokenFactoryABI.d.ts +0 -25
- package/dist/types/global-account/react/hooks/useUnifiedChainSwitchAndExecute.d.ts +1 -0
- package/dist/types/global-account/react/stores/useModalStore.d.ts +4 -2
- package/dist/types/shared/constants/chains/b3Chain.d.ts +2 -2
- package/dist/types/shared/constants/chains/supported.d.ts +4 -4
- package/package.json +1 -1
- package/src/anyspend/constants/index.ts +2 -0
- package/src/anyspend/react/components/AnySpend.tsx +1 -1
- package/src/anyspend/react/components/AnySpendBondKit.tsx +28 -28
- package/src/anyspend/react/components/AnySpendCustom.tsx +1 -1
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +142 -130
- package/src/anyspend/react/components/common/ConnectWalletPayment.tsx +9 -0
- package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +289 -103
- package/src/anyspend/react/components/common/OrderDetails.tsx +7 -3
- package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +10 -4
- package/src/anyspend/react/components/common/OrderStatus.tsx +9 -2
- package/src/anyspend/react/components/common/PaySection.tsx +9 -7
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +41 -3
- package/src/bondkit/abis/BondkitTokenABI.ts +41 -9
- package/src/bondkit/abis/BondkitTokenFactoryABI.ts +0 -9
- package/src/bondkit/constants.ts +1 -1
- package/src/global-account/react/components/LinkAccount/LinkAccount.tsx +26 -10
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +5 -1
- package/src/global-account/react/hooks/useUnifiedChainSwitchAndExecute.ts +1 -0
- package/src/global-account/react/stores/useModalStore.ts +4 -2
- package/dist/cjs/anyspend/abis/bondKit.d.ts +0 -35
- package/dist/cjs/anyspend/abis/bondKit.js +0 -29
- package/dist/esm/anyspend/abis/bondKit.d.ts +0 -35
- package/dist/esm/anyspend/abis/bondKit.js +0 -26
- package/dist/types/anyspend/abis/bondKit.d.ts +0 -35
- package/src/anyspend/abis/bondKit.ts +0 -26
|
@@ -49,6 +49,9 @@ function getOrderSuccessText({ order, tournament, formattedActualDstAmount, dstT
|
|
|
49
49
|
actionText = `funded ${tournament?.name}`;
|
|
50
50
|
return `Successfully ${actionText}`;
|
|
51
51
|
case "custom":
|
|
52
|
+
if (order.metadata.action === anyspend_1.DEPOSIT_HYPE_ACTION) {
|
|
53
|
+
return `Successfully deposited ${(0, number_1.formatTokenAmount)(BigInt(order.payload?.amount || "0"), 18)} HYPE to ${recipient}`;
|
|
54
|
+
}
|
|
52
55
|
actionText = order.metadata.action || `executed contract`;
|
|
53
56
|
return `Successfully ${actionText}`;
|
|
54
57
|
default:
|
|
@@ -145,7 +148,7 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
145
148
|
const [txHash, setTxHash] = (0, react_5.useState)();
|
|
146
149
|
const [showQRCode, setShowQRCode] = (0, react_5.useState)(false);
|
|
147
150
|
const { isLoading: txLoading, isSuccess: txSuccess } = (0, wagmi_1.useWaitForTransactionReceipt)({ hash: txHash });
|
|
148
|
-
const {
|
|
151
|
+
const { switchChainAndExecuteWithEOA, isSwitchingOrExecuting } = (0, react_1.useUnifiedChainSwitchAndExecute)();
|
|
149
152
|
const { colorMode } = (0, react_2.useColorMode)();
|
|
150
153
|
const roundedUpSrcAmount = (0, react_5.useMemo)(() => {
|
|
151
154
|
// Display the full transfer amount without rounding since users need to see the exact value they're transferring.
|
|
@@ -175,11 +178,11 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
175
178
|
to = order.srcTokenAddress;
|
|
176
179
|
value = BigInt(0);
|
|
177
180
|
}
|
|
178
|
-
const txHash = await
|
|
181
|
+
const txHash = await switchChainAndExecuteWithEOA(order.srcChain, { to, data: txData, value });
|
|
179
182
|
if (txHash) {
|
|
180
183
|
setTxHash(txHash);
|
|
181
184
|
}
|
|
182
|
-
}, [order,
|
|
185
|
+
}, [order, switchChainAndExecuteWithEOA]);
|
|
183
186
|
// Main payment handler that triggers chain switch and payment
|
|
184
187
|
const handlePayment = async () => {
|
|
185
188
|
console.log("Initiating payment process. Target chain:", order.srcChain, "Current chain:", walletClient?.chain?.id);
|
|
@@ -35,8 +35,10 @@ exports.OrderDetailsCollapsible = (0, react_3.memo)(function OrderDetailsCollaps
|
|
|
35
35
|
: order.type === "fund_tournament"
|
|
36
36
|
? "Fund tournament"
|
|
37
37
|
: order.type === "custom"
|
|
38
|
-
? order.metadata.action
|
|
39
|
-
?
|
|
40
|
-
:
|
|
41
|
-
|
|
38
|
+
? order.metadata.action === anyspend_1.DEPOSIT_HYPE_ACTION
|
|
39
|
+
? "Deposit HYPE"
|
|
40
|
+
: order.metadata.action
|
|
41
|
+
? (0, anyspend_1.capitalizeFirstLetter)(order.metadata.action)
|
|
42
|
+
: "Contract execution"
|
|
43
|
+
: "" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-end gap-2", children: [order.type === "swap" ? (`~${finalFormattedExpectedDstAmount} ${dstToken.symbol}`) : order.type === "mint_nft" ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("img", { src: nft?.imageUrl, alt: nft?.name || "NFT", className: "h-5 w-5" }), (0, jsx_runtime_1.jsx)("div", { children: nft?.name || "NFT" })] })) : order.type === "join_tournament" || order.type === "fund_tournament" ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("img", { src: tournament?.imageUrl, alt: tournament?.name || "Tournament", className: "h-5 w-5" }), (0, jsx_runtime_1.jsx)("div", { children: tournament?.name || "Tournament" })] })) : order.type === "custom" && order.metadata.action === anyspend_1.DEPOSIT_HYPE_ACTION ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2", children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, number_1.formatTokenAmount)(BigInt(order.payload.amount), dstToken.decimals), " HYPE"] }) })) : null, (0, jsx_runtime_1.jsxs)("div", { className: "text-as-primary/50 flex items-center gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { children: ["on ", order.dstChain !== chains_1.b3.id && (0, anyspend_1.getChainName)(order.dstChain)] }), (0, jsx_runtime_1.jsx)("img", { src: anyspend_1.ALL_CHAINS[order.dstChain].logoUrl, alt: (0, anyspend_1.getChainName)(order.dstChain), className: (0, utils_1.cn)("h-3", order.dstChain !== chains_1.b3.id && "w-3 rounded-full", order.dstChain === chains_1.b3.id && "h-4") })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full justify-between gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-tertiarry", children: showTotal ? "Total (included fee)" : "Order ID" }), (0, jsx_runtime_1.jsx)("div", { className: "text-as-primary overflow-hidden text-ellipsis whitespace-nowrap", children: showTotal && totalAmount ? totalAmount : order.id })] })] }) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsx)("button", { className: "whitespace-nowrap text-sm", onClick: () => setShowOrderDetails(true), children: "Order Details" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "text-as-primary mx-1 h-4 min-h-4 w-4 min-w-4" }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" })] })) }));
|
|
42
44
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { components } from "../../../../anyspend/types/api";
|
|
2
|
+
import { CryptoPaymentMethodType } from "./CryptoPaymentMethod";
|
|
2
3
|
export declare const OrderStatus: import("react").NamedExoticComponent<{
|
|
3
4
|
order: components["schemas"]["Order"];
|
|
5
|
+
selectedCryptoPaymentMethod?: CryptoPaymentMethodType;
|
|
4
6
|
}>;
|
|
@@ -7,11 +7,11 @@ const react_1 = require("../../../../shared/react");
|
|
|
7
7
|
const lucide_react_1 = require("lucide-react");
|
|
8
8
|
const react_2 = require("react");
|
|
9
9
|
const StepProgress_1 = require("./StepProgress");
|
|
10
|
-
exports.OrderStatus = (0, react_2.memo)(function OrderStatus({ order }) {
|
|
10
|
+
exports.OrderStatus = (0, react_2.memo)(function OrderStatus({ order, selectedCryptoPaymentMethod, }) {
|
|
11
11
|
const isComplete = order.status === "executed";
|
|
12
12
|
const { text, status: displayStatus, description } = (0, anyspend_1.getStatusDisplay)(order);
|
|
13
13
|
const searchParams = (0, react_1.useSearchParams)();
|
|
14
|
-
const cryptoPaymentMethod = searchParams.get("cryptoPaymentMethod");
|
|
14
|
+
const cryptoPaymentMethod = selectedCryptoPaymentMethod || searchParams.get("cryptoPaymentMethod");
|
|
15
15
|
console.log("OrderStatus", displayStatus);
|
|
16
16
|
console.log("OrderStatus", order);
|
|
17
17
|
const paymentSteps = [
|
|
@@ -9,13 +9,15 @@ const number_1 = require("../../../../shared/utils/number");
|
|
|
9
9
|
const lucide_react_1 = require("lucide-react");
|
|
10
10
|
const react_2 = require("motion/react");
|
|
11
11
|
const react_3 = require("react");
|
|
12
|
+
const wagmi_1 = require("wagmi");
|
|
12
13
|
const CryptoPaymentMethod_1 = require("./CryptoPaymentMethod");
|
|
13
14
|
const FiatPaymentMethod_1 = require("./FiatPaymentMethod");
|
|
14
15
|
const OrderTokenAmount_1 = require("./OrderTokenAmount");
|
|
15
16
|
const TokenBalance_1 = require("./TokenBalance");
|
|
16
17
|
function PaySection({ paymentType, selectedSrcChainId, setSelectedSrcChainId, selectedSrcToken, setSelectedSrcToken, srcAmount, setSrcAmount, setIsSrcInputDirty, selectedCryptoPaymentMethod, selectedFiatPaymentMethod, onSelectCryptoPaymentMethod, onSelectFiatPaymentMethod, anyspendQuote, }) {
|
|
17
|
-
const { address:
|
|
18
|
-
const
|
|
18
|
+
const { address: connectedAddress, isConnected } = (0, wagmi_1.useAccount)();
|
|
19
|
+
const { data: profileData } = (0, react_1.useProfile)({ address: connectedAddress });
|
|
20
|
+
const connectedName = profileData?.displayName;
|
|
19
21
|
const { data: srcTokenMetadata } = (0, react_1.useTokenData)(selectedSrcToken?.chainId, selectedSrcToken?.address);
|
|
20
22
|
// Add ref to track if we've applied metadata
|
|
21
23
|
const appliedSrcMetadataRef = (0, react_3.useRef)(false);
|
|
@@ -41,13 +43,13 @@ function PaySection({ paymentType, selectedSrcChainId, setSelectedSrcChainId, se
|
|
|
41
43
|
(0, react_3.useEffect)(() => {
|
|
42
44
|
appliedSrcMetadataRef.current = false;
|
|
43
45
|
}, [selectedSrcToken.address, selectedSrcToken.chainId]);
|
|
44
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "bg-as-surface-secondary border-as-border-secondary relative flex w-full flex-col gap-2 rounded-2xl border p-4 sm:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/50 flex h-7 items-center text-sm", children: "Pay" }), paymentType === "crypto" ? ((0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex h-7 items-center gap-2 text-sm transition-colors", onClick: onSelectCryptoPaymentMethod, children: selectedCryptoPaymentMethod === CryptoPaymentMethod_1.CryptoPaymentMethodType.CONNECT_WALLET ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [
|
|
46
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "bg-as-surface-secondary border-as-border-secondary relative flex w-full flex-col gap-2 rounded-2xl border p-4 sm:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/50 flex h-7 items-center text-sm", children: "Pay" }), paymentType === "crypto" ? ((0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex h-7 items-center gap-2 text-sm transition-colors focus:!outline-none", onClick: onSelectCryptoPaymentMethod, children: selectedCryptoPaymentMethod === CryptoPaymentMethod_1.CryptoPaymentMethodType.CONNECT_WALLET ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isConnected ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-1", children: connectedName ? (0, utils_1.formatUsername)(connectedName) : (0, formatAddress_1.shortenAddress)(connectedAddress || "") })) : ("Connect wallet"), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : selectedCryptoPaymentMethod === CryptoPaymentMethod_1.CryptoPaymentMethodType.TRANSFER_CRYPTO ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Transfer crypto", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Select payment method", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) })) : ((0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex h-7 items-center gap-2 text-sm transition-colors", onClick: onSelectFiatPaymentMethod, children: selectedFiatPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.COINBASE_PAY ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "C" }) }), "Coinbase Pay"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : selectedFiatPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.STRIPE ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "S" }) }), "Credit/Debit Card"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Select payment method", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) }))] }), paymentType === "crypto" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderTokenAmount_1.OrderTokenAmount, { address: connectedAddress, context: "from", inputValue: srcAmount, onChangeInput: value => {
|
|
45
47
|
setIsSrcInputDirty(true);
|
|
46
48
|
setSrcAmount(value);
|
|
47
49
|
}, chainId: selectedSrcChainId, setChainId: setSelectedSrcChainId, token: selectedSrcToken, setToken: setSelectedSrcToken }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/50 flex h-5 items-center text-sm", children: (0, number_1.formatDisplayNumber)(anyspendQuote?.data?.currencyIn?.amountUsd, {
|
|
48
50
|
style: "currency",
|
|
49
51
|
fallback: "",
|
|
50
|
-
}) }), (0, jsx_runtime_1.jsx)(TokenBalance_1.TokenBalance, { token: selectedSrcToken, walletAddress:
|
|
52
|
+
}) }), (0, jsx_runtime_1.jsx)(TokenBalance_1.TokenBalance, { token: selectedSrcToken, walletAddress: connectedAddress, onChangeInput: value => {
|
|
51
53
|
setIsSrcInputDirty(true);
|
|
52
54
|
setSrcAmount(value);
|
|
53
55
|
} })] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center pb-2 pt-8", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry text-2xl font-bold", children: "$" }), (0, jsx_runtime_1.jsx)(react_1.Input, { type: "text", value: srcAmount, onChange: e => setSrcAmount(e.target.value.replace(/[^0-9.]/g, "")), placeholder: "5", className: "text-as-primary placeholder:text-as-primary/50 h-auto min-w-[70px] border-0 bg-transparent p-0 px-3 pt-1 text-4xl font-bold focus-visible:ring-0 focus-visible:ring-offset-0", style: {
|
|
@@ -18,8 +18,9 @@ interface UseAnyspendFlowProps {
|
|
|
18
18
|
onTransactionSuccess?: () => void;
|
|
19
19
|
sourceTokenAddress?: string;
|
|
20
20
|
sourceTokenChainId?: number;
|
|
21
|
+
slippage?: number;
|
|
21
22
|
}
|
|
22
|
-
export declare function useAnyspendFlow({ paymentType, recipientAddress, loadOrder, isDepositMode, onOrderSuccess, onTransactionSuccess, sourceTokenAddress, sourceTokenChainId, }: UseAnyspendFlowProps): {
|
|
23
|
+
export declare function useAnyspendFlow({ paymentType, recipientAddress, loadOrder, isDepositMode, onOrderSuccess, onTransactionSuccess, sourceTokenAddress, sourceTokenChainId, slippage, }: UseAnyspendFlowProps): {
|
|
23
24
|
activePanel: PanelView;
|
|
24
25
|
setActivePanel: import("react").Dispatch<import("react").SetStateAction<PanelView>>;
|
|
25
26
|
orderId: string | undefined;
|
|
@@ -22,7 +22,9 @@ var PanelView;
|
|
|
22
22
|
PanelView[PanelView["ORDER_DETAILS"] = 4] = "ORDER_DETAILS";
|
|
23
23
|
PanelView[PanelView["LOADING"] = 5] = "LOADING";
|
|
24
24
|
})(PanelView || (exports.PanelView = PanelView = {}));
|
|
25
|
-
function useAnyspendFlow({ paymentType = "crypto", recipientAddress, loadOrder, isDepositMode = false, onOrderSuccess, onTransactionSuccess, sourceTokenAddress, sourceTokenChainId, }) {
|
|
25
|
+
function useAnyspendFlow({ paymentType = "crypto", recipientAddress, loadOrder, isDepositMode = false, onOrderSuccess, onTransactionSuccess, sourceTokenAddress, sourceTokenChainId, slippage = 0, }) {
|
|
26
|
+
const searchParams = (0, react_2.useSearchParamsSSR)();
|
|
27
|
+
const router = (0, react_2.useRouter)();
|
|
26
28
|
// Panel and order state
|
|
27
29
|
const [activePanel, setActivePanel] = (0, react_3.useState)(loadOrder ? PanelView.ORDER_DETAILS : PanelView.MAIN);
|
|
28
30
|
const [orderId, setOrderId] = (0, react_3.useState)(loadOrder);
|
|
@@ -49,6 +51,11 @@ function useAnyspendFlow({ paymentType = "crypto", recipientAddress, loadOrder,
|
|
|
49
51
|
setSelectedRecipientAddress(globalAddress);
|
|
50
52
|
}
|
|
51
53
|
}, [selectedRecipientAddress, globalAddress]);
|
|
54
|
+
(0, react_3.useEffect)(() => {
|
|
55
|
+
if (paymentType === "crypto") {
|
|
56
|
+
setSelectedCryptoPaymentMethod(CryptoPaymentMethod_1.CryptoPaymentMethodType.CONNECT_WALLET);
|
|
57
|
+
}
|
|
58
|
+
}, [paymentType]);
|
|
52
59
|
// Fetch specific token when sourceTokenAddress and sourceTokenChainId are provided
|
|
53
60
|
(0, react_3.useEffect)(() => {
|
|
54
61
|
const fetchSourceToken = async () => {
|
|
@@ -96,13 +103,25 @@ function useAnyspendFlow({ paymentType = "crypto", recipientAddress, loadOrder,
|
|
|
96
103
|
if (anyspendQuote?.data?.currencyOut?.amount && anyspendQuote.data.currencyOut.currency?.decimals) {
|
|
97
104
|
const amount = anyspendQuote.data.currencyOut.amount;
|
|
98
105
|
const decimals = anyspendQuote.data.currencyOut.currency.decimals;
|
|
99
|
-
|
|
106
|
+
// Apply slippage (0-100) - reduce amount by slippage percentageFixed slippage value
|
|
107
|
+
const amountWithSlippage = (BigInt(amount) * BigInt(100 - slippage)) / BigInt(100);
|
|
108
|
+
const formattedAmount = (0, number_1.formatTokenAmount)(amountWithSlippage, decimals, 6, false);
|
|
100
109
|
setDstAmount(formattedAmount);
|
|
101
110
|
}
|
|
102
111
|
else {
|
|
103
112
|
setDstAmount("");
|
|
104
113
|
}
|
|
105
|
-
}, [anyspendQuote]);
|
|
114
|
+
}, [anyspendQuote, slippage]);
|
|
115
|
+
// Update useEffect for URL parameter to not override loadOrder
|
|
116
|
+
(0, react_3.useEffect)(() => {
|
|
117
|
+
if (loadOrder)
|
|
118
|
+
return; // Skip if we have a loadOrder
|
|
119
|
+
const orderIdParam = searchParams.get("orderId");
|
|
120
|
+
if (orderIdParam) {
|
|
121
|
+
setOrderId(orderIdParam);
|
|
122
|
+
setActivePanel(PanelView.ORDER_DETAILS);
|
|
123
|
+
}
|
|
124
|
+
}, [searchParams, loadOrder]);
|
|
106
125
|
// Order creation hooks
|
|
107
126
|
const { createOrder, isCreatingOrder } = (0, react_1.useAnyspendCreateOrder)({
|
|
108
127
|
onSuccess: data => {
|
|
@@ -110,6 +129,18 @@ function useAnyspendFlow({ paymentType = "crypto", recipientAddress, loadOrder,
|
|
|
110
129
|
setOrderId(newOrderId);
|
|
111
130
|
setActivePanel(PanelView.ORDER_DETAILS);
|
|
112
131
|
onOrderSuccess?.(newOrderId);
|
|
132
|
+
// Add orderId and payment method to URL for persistence
|
|
133
|
+
const params = new URLSearchParams(searchParams.toString()); // Preserve existing params
|
|
134
|
+
params.set("orderId", newOrderId);
|
|
135
|
+
if (selectedCryptoPaymentMethod !== CryptoPaymentMethod_1.CryptoPaymentMethodType.NONE) {
|
|
136
|
+
console.log("Setting cryptoPaymentMethod in URL:", selectedCryptoPaymentMethod);
|
|
137
|
+
params.set("cryptoPaymentMethod", selectedCryptoPaymentMethod);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
console.log("Payment method is NONE, not setting in URL");
|
|
141
|
+
}
|
|
142
|
+
console.log("Final URL params:", params.toString());
|
|
143
|
+
router.push(`${window.location.pathname}?${params.toString()}`);
|
|
113
144
|
},
|
|
114
145
|
onError: error => {
|
|
115
146
|
console.error(error);
|
|
@@ -286,14 +286,6 @@ export declare const BondkitTokenABI: readonly [{
|
|
|
286
286
|
}];
|
|
287
287
|
readonly name: "ValidationInvalidLPSplitRatio";
|
|
288
288
|
readonly type: "error";
|
|
289
|
-
}, {
|
|
290
|
-
readonly inputs: readonly [{
|
|
291
|
-
readonly internalType: "address";
|
|
292
|
-
readonly name: "providedAddress";
|
|
293
|
-
readonly type: "address";
|
|
294
|
-
}];
|
|
295
|
-
readonly name: "ValidationInvalidMigrationAdminAddress";
|
|
296
|
-
readonly type: "error";
|
|
297
289
|
}, {
|
|
298
290
|
readonly inputs: readonly [{
|
|
299
291
|
readonly internalType: "uint24";
|
|
@@ -330,6 +322,21 @@ export declare const BondkitTokenABI: readonly [{
|
|
|
330
322
|
}];
|
|
331
323
|
readonly name: "Approval";
|
|
332
324
|
readonly type: "event";
|
|
325
|
+
}, {
|
|
326
|
+
readonly anonymous: false;
|
|
327
|
+
readonly inputs: readonly [{
|
|
328
|
+
readonly indexed: true;
|
|
329
|
+
readonly internalType: "address";
|
|
330
|
+
readonly name: "previousAdmin";
|
|
331
|
+
readonly type: "address";
|
|
332
|
+
}, {
|
|
333
|
+
readonly indexed: true;
|
|
334
|
+
readonly internalType: "address";
|
|
335
|
+
readonly name: "newAdmin";
|
|
336
|
+
readonly type: "address";
|
|
337
|
+
}];
|
|
338
|
+
readonly name: "B3AdminUpdated";
|
|
339
|
+
readonly type: "event";
|
|
333
340
|
}, {
|
|
334
341
|
readonly anonymous: false;
|
|
335
342
|
readonly inputs: readonly [{
|
|
@@ -465,6 +472,21 @@ export declare const BondkitTokenABI: readonly [{
|
|
|
465
472
|
}];
|
|
466
473
|
readonly name: "BondkitTokenMigrated";
|
|
467
474
|
readonly type: "event";
|
|
475
|
+
}, {
|
|
476
|
+
readonly anonymous: false;
|
|
477
|
+
readonly inputs: readonly [{
|
|
478
|
+
readonly indexed: false;
|
|
479
|
+
readonly internalType: "uint256";
|
|
480
|
+
readonly name: "totalRaisedBonding";
|
|
481
|
+
readonly type: "uint256";
|
|
482
|
+
}, {
|
|
483
|
+
readonly indexed: false;
|
|
484
|
+
readonly internalType: "uint256";
|
|
485
|
+
readonly name: "targetAmount";
|
|
486
|
+
readonly type: "uint256";
|
|
487
|
+
}];
|
|
488
|
+
readonly name: "DexTriggerThresholdMet";
|
|
489
|
+
readonly type: "event";
|
|
468
490
|
}, {
|
|
469
491
|
readonly anonymous: false;
|
|
470
492
|
readonly inputs: readonly [{
|
|
@@ -591,6 +613,16 @@ export declare const BondkitTokenABI: readonly [{
|
|
|
591
613
|
}];
|
|
592
614
|
readonly stateMutability: "nonpayable";
|
|
593
615
|
readonly type: "function";
|
|
616
|
+
}, {
|
|
617
|
+
readonly inputs: readonly [];
|
|
618
|
+
readonly name: "b3Admin";
|
|
619
|
+
readonly outputs: readonly [{
|
|
620
|
+
readonly internalType: "address";
|
|
621
|
+
readonly name: "";
|
|
622
|
+
readonly type: "address";
|
|
623
|
+
}];
|
|
624
|
+
readonly stateMutability: "view";
|
|
625
|
+
readonly type: "function";
|
|
594
626
|
}, {
|
|
595
627
|
readonly inputs: readonly [{
|
|
596
628
|
readonly internalType: "address";
|
|
@@ -627,7 +659,7 @@ export declare const BondkitTokenABI: readonly [{
|
|
|
627
659
|
}];
|
|
628
660
|
readonly name: "buy";
|
|
629
661
|
readonly outputs: readonly [];
|
|
630
|
-
readonly stateMutability: "
|
|
662
|
+
readonly stateMutability: "nonpayable";
|
|
631
663
|
readonly type: "function";
|
|
632
664
|
}, {
|
|
633
665
|
readonly inputs: readonly [{
|
|
@@ -645,7 +677,7 @@ export declare const BondkitTokenABI: readonly [{
|
|
|
645
677
|
}];
|
|
646
678
|
readonly name: "buyFor";
|
|
647
679
|
readonly outputs: readonly [];
|
|
648
|
-
readonly stateMutability: "
|
|
680
|
+
readonly stateMutability: "nonpayable";
|
|
649
681
|
readonly type: "function";
|
|
650
682
|
}, {
|
|
651
683
|
readonly inputs: readonly [];
|
|
@@ -743,6 +775,16 @@ export declare const BondkitTokenABI: readonly [{
|
|
|
743
775
|
}];
|
|
744
776
|
readonly stateMutability: "view";
|
|
745
777
|
readonly type: "function";
|
|
778
|
+
}, {
|
|
779
|
+
readonly inputs: readonly [];
|
|
780
|
+
readonly name: "getB3Admin";
|
|
781
|
+
readonly outputs: readonly [{
|
|
782
|
+
readonly internalType: "address";
|
|
783
|
+
readonly name: "";
|
|
784
|
+
readonly type: "address";
|
|
785
|
+
}];
|
|
786
|
+
readonly stateMutability: "view";
|
|
787
|
+
readonly type: "function";
|
|
746
788
|
}, {
|
|
747
789
|
readonly inputs: readonly [];
|
|
748
790
|
readonly name: "getBondingCurveConfig";
|
|
@@ -979,10 +1021,6 @@ export declare const BondkitTokenABI: readonly [{
|
|
|
979
1021
|
readonly internalType: "address";
|
|
980
1022
|
readonly name: "tradingToken";
|
|
981
1023
|
readonly type: "address";
|
|
982
|
-
}, {
|
|
983
|
-
readonly internalType: "address";
|
|
984
|
-
readonly name: "migrationAdminAddress";
|
|
985
|
-
readonly type: "address";
|
|
986
1024
|
}, {
|
|
987
1025
|
readonly internalType: "address";
|
|
988
1026
|
readonly name: "bondingPhaseSplitter";
|
|
@@ -1182,6 +1220,16 @@ export declare const BondkitTokenABI: readonly [{
|
|
|
1182
1220
|
readonly outputs: readonly [];
|
|
1183
1221
|
readonly stateMutability: "nonpayable";
|
|
1184
1222
|
readonly type: "function";
|
|
1223
|
+
}, {
|
|
1224
|
+
readonly inputs: readonly [{
|
|
1225
|
+
readonly internalType: "address";
|
|
1226
|
+
readonly name: "_newAdmin";
|
|
1227
|
+
readonly type: "address";
|
|
1228
|
+
}];
|
|
1229
|
+
readonly name: "updateB3Admin";
|
|
1230
|
+
readonly outputs: readonly [];
|
|
1231
|
+
readonly stateMutability: "nonpayable";
|
|
1232
|
+
readonly type: "function";
|
|
1185
1233
|
}, {
|
|
1186
1234
|
readonly inputs: readonly [{
|
|
1187
1235
|
readonly internalType: "address";
|
|
@@ -1242,7 +1290,4 @@ export declare const BondkitTokenABI: readonly [{
|
|
|
1242
1290
|
}];
|
|
1243
1291
|
readonly stateMutability: "view";
|
|
1244
1292
|
readonly type: "function";
|
|
1245
|
-
}, {
|
|
1246
|
-
readonly stateMutability: "payable";
|
|
1247
|
-
readonly type: "receive";
|
|
1248
1293
|
}];
|
|
@@ -161,11 +161,6 @@ exports.BondkitTokenABI = [
|
|
|
161
161
|
name: "ValidationInvalidLPSplitRatio",
|
|
162
162
|
type: "error",
|
|
163
163
|
},
|
|
164
|
-
{
|
|
165
|
-
inputs: [{ internalType: "address", name: "providedAddress", type: "address" }],
|
|
166
|
-
name: "ValidationInvalidMigrationAdminAddress",
|
|
167
|
-
type: "error",
|
|
168
|
-
},
|
|
169
164
|
{
|
|
170
165
|
inputs: [{ internalType: "uint24", name: "value", type: "uint24" }],
|
|
171
166
|
name: "ValidationInvalidV4PoolFee",
|
|
@@ -186,6 +181,15 @@ exports.BondkitTokenABI = [
|
|
|
186
181
|
name: "Approval",
|
|
187
182
|
type: "event",
|
|
188
183
|
},
|
|
184
|
+
{
|
|
185
|
+
anonymous: false,
|
|
186
|
+
inputs: [
|
|
187
|
+
{ indexed: true, internalType: "address", name: "previousAdmin", type: "address" },
|
|
188
|
+
{ indexed: true, internalType: "address", name: "newAdmin", type: "address" },
|
|
189
|
+
],
|
|
190
|
+
name: "B3AdminUpdated",
|
|
191
|
+
type: "event",
|
|
192
|
+
},
|
|
189
193
|
{
|
|
190
194
|
anonymous: false,
|
|
191
195
|
inputs: [
|
|
@@ -237,6 +241,15 @@ exports.BondkitTokenABI = [
|
|
|
237
241
|
name: "BondkitTokenMigrated",
|
|
238
242
|
type: "event",
|
|
239
243
|
},
|
|
244
|
+
{
|
|
245
|
+
anonymous: false,
|
|
246
|
+
inputs: [
|
|
247
|
+
{ indexed: false, internalType: "uint256", name: "totalRaisedBonding", type: "uint256" },
|
|
248
|
+
{ indexed: false, internalType: "uint256", name: "targetAmount", type: "uint256" },
|
|
249
|
+
],
|
|
250
|
+
name: "DexTriggerThresholdMet",
|
|
251
|
+
type: "event",
|
|
252
|
+
},
|
|
240
253
|
{
|
|
241
254
|
anonymous: false,
|
|
242
255
|
inputs: [
|
|
@@ -305,6 +318,13 @@ exports.BondkitTokenABI = [
|
|
|
305
318
|
stateMutability: "nonpayable",
|
|
306
319
|
type: "function",
|
|
307
320
|
},
|
|
321
|
+
{
|
|
322
|
+
inputs: [],
|
|
323
|
+
name: "b3Admin",
|
|
324
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
325
|
+
stateMutability: "view",
|
|
326
|
+
type: "function",
|
|
327
|
+
},
|
|
308
328
|
{
|
|
309
329
|
inputs: [{ internalType: "address", name: "account", type: "address" }],
|
|
310
330
|
name: "balanceOf",
|
|
@@ -326,7 +346,7 @@ exports.BondkitTokenABI = [
|
|
|
326
346
|
],
|
|
327
347
|
name: "buy",
|
|
328
348
|
outputs: [],
|
|
329
|
-
stateMutability: "
|
|
349
|
+
stateMutability: "nonpayable",
|
|
330
350
|
type: "function",
|
|
331
351
|
},
|
|
332
352
|
{
|
|
@@ -337,7 +357,7 @@ exports.BondkitTokenABI = [
|
|
|
337
357
|
],
|
|
338
358
|
name: "buyFor",
|
|
339
359
|
outputs: [],
|
|
340
|
-
stateMutability: "
|
|
360
|
+
stateMutability: "nonpayable",
|
|
341
361
|
type: "function",
|
|
342
362
|
},
|
|
343
363
|
{
|
|
@@ -400,6 +420,13 @@ exports.BondkitTokenABI = [
|
|
|
400
420
|
stateMutability: "view",
|
|
401
421
|
type: "function",
|
|
402
422
|
},
|
|
423
|
+
{
|
|
424
|
+
inputs: [],
|
|
425
|
+
name: "getB3Admin",
|
|
426
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
427
|
+
stateMutability: "view",
|
|
428
|
+
type: "function",
|
|
429
|
+
},
|
|
403
430
|
{
|
|
404
431
|
inputs: [],
|
|
405
432
|
name: "getBondingCurveConfig",
|
|
@@ -542,7 +569,6 @@ exports.BondkitTokenABI = [
|
|
|
542
569
|
{ internalType: "uint256", name: "lpSplitRatioFeeRecipientBps", type: "uint256" },
|
|
543
570
|
{ internalType: "uint256", name: "targetAmount", type: "uint256" },
|
|
544
571
|
{ internalType: "address", name: "tradingToken", type: "address" },
|
|
545
|
-
{ internalType: "address", name: "migrationAdminAddress", type: "address" },
|
|
546
572
|
{ internalType: "address", name: "bondingPhaseSplitter", type: "address" },
|
|
547
573
|
{ internalType: "address", name: "v4PoolManager", type: "address" },
|
|
548
574
|
{ internalType: "address", name: "v4Hook", type: "address" },
|
|
@@ -662,6 +688,13 @@ exports.BondkitTokenABI = [
|
|
|
662
688
|
stateMutability: "nonpayable",
|
|
663
689
|
type: "function",
|
|
664
690
|
},
|
|
691
|
+
{
|
|
692
|
+
inputs: [{ internalType: "address", name: "_newAdmin", type: "address" }],
|
|
693
|
+
name: "updateB3Admin",
|
|
694
|
+
outputs: [],
|
|
695
|
+
stateMutability: "nonpayable",
|
|
696
|
+
type: "function",
|
|
697
|
+
},
|
|
665
698
|
{
|
|
666
699
|
inputs: [{ internalType: "address", name: "_bondingPhaseSplitter", type: "address" }],
|
|
667
700
|
name: "updateSplitter",
|
|
@@ -704,5 +737,4 @@ exports.BondkitTokenABI = [
|
|
|
704
737
|
stateMutability: "view",
|
|
705
738
|
type: "function",
|
|
706
739
|
},
|
|
707
|
-
{ stateMutability: "payable", type: "receive" },
|
|
708
740
|
];
|
|
@@ -106,14 +106,6 @@ export declare const BondkitTokenFactoryABI: readonly [{
|
|
|
106
106
|
}];
|
|
107
107
|
readonly name: "ValidationInvalidLPSplitRatio";
|
|
108
108
|
readonly type: "error";
|
|
109
|
-
}, {
|
|
110
|
-
readonly inputs: readonly [{
|
|
111
|
-
readonly internalType: "address";
|
|
112
|
-
readonly name: "providedAddress";
|
|
113
|
-
readonly type: "address";
|
|
114
|
-
}];
|
|
115
|
-
readonly name: "ValidationInvalidMigrationAdminAddress";
|
|
116
|
-
readonly type: "error";
|
|
117
109
|
}, {
|
|
118
110
|
readonly inputs: readonly [{
|
|
119
111
|
readonly internalType: "uint24";
|
|
@@ -157,11 +149,6 @@ export declare const BondkitTokenFactoryABI: readonly [{
|
|
|
157
149
|
readonly internalType: "address";
|
|
158
150
|
readonly name: "feeRecipient";
|
|
159
151
|
readonly type: "address";
|
|
160
|
-
}, {
|
|
161
|
-
readonly indexed: false;
|
|
162
|
-
readonly internalType: "address";
|
|
163
|
-
readonly name: "migrationAdmin";
|
|
164
|
-
readonly type: "address";
|
|
165
152
|
}];
|
|
166
153
|
readonly name: "BondkitTokenCreated";
|
|
167
154
|
readonly type: "event";
|
|
@@ -259,10 +246,6 @@ export declare const BondkitTokenFactoryABI: readonly [{
|
|
|
259
246
|
readonly internalType: "address";
|
|
260
247
|
readonly name: "tradingToken";
|
|
261
248
|
readonly type: "address";
|
|
262
|
-
}, {
|
|
263
|
-
readonly internalType: "address";
|
|
264
|
-
readonly name: "migrationAdminAddress";
|
|
265
|
-
readonly type: "address";
|
|
266
249
|
}, {
|
|
267
250
|
readonly internalType: "address";
|
|
268
251
|
readonly name: "bondingPhaseSplitter";
|
|
@@ -350,10 +333,6 @@ export declare const BondkitTokenFactoryABI: readonly [{
|
|
|
350
333
|
readonly internalType: "address";
|
|
351
334
|
readonly name: "tradingToken";
|
|
352
335
|
readonly type: "address";
|
|
353
|
-
}, {
|
|
354
|
-
readonly internalType: "address";
|
|
355
|
-
readonly name: "migrationAdminAddress";
|
|
356
|
-
readonly type: "address";
|
|
357
336
|
}, {
|
|
358
337
|
readonly internalType: "address";
|
|
359
338
|
readonly name: "bondingPhaseSplitter";
|
|
@@ -461,10 +440,6 @@ export declare const BondkitTokenFactoryABI: readonly [{
|
|
|
461
440
|
readonly internalType: "address";
|
|
462
441
|
readonly name: "tradingToken";
|
|
463
442
|
readonly type: "address";
|
|
464
|
-
}, {
|
|
465
|
-
readonly internalType: "address";
|
|
466
|
-
readonly name: "migrationAdminAddress";
|
|
467
|
-
readonly type: "address";
|
|
468
443
|
}, {
|
|
469
444
|
readonly internalType: "address";
|
|
470
445
|
readonly name: "bondingPhaseSplitter";
|
|
@@ -60,11 +60,6 @@ exports.BondkitTokenFactoryABI = [
|
|
|
60
60
|
name: "ValidationInvalidLPSplitRatio",
|
|
61
61
|
type: "error",
|
|
62
62
|
},
|
|
63
|
-
{
|
|
64
|
-
inputs: [{ internalType: "address", name: "providedAddress", type: "address" }],
|
|
65
|
-
name: "ValidationInvalidMigrationAdminAddress",
|
|
66
|
-
type: "error",
|
|
67
|
-
},
|
|
68
63
|
{
|
|
69
64
|
inputs: [{ internalType: "uint24", name: "value", type: "uint24" }],
|
|
70
65
|
name: "ValidationInvalidV4PoolFee",
|
|
@@ -83,7 +78,6 @@ exports.BondkitTokenFactoryABI = [
|
|
|
83
78
|
{ indexed: false, internalType: "string", name: "name", type: "string" },
|
|
84
79
|
{ indexed: false, internalType: "string", name: "symbol", type: "string" },
|
|
85
80
|
{ indexed: true, internalType: "address", name: "feeRecipient", type: "address" },
|
|
86
|
-
{ indexed: false, internalType: "address", name: "migrationAdmin", type: "address" },
|
|
87
81
|
],
|
|
88
82
|
name: "BondkitTokenCreated",
|
|
89
83
|
type: "event",
|
|
@@ -135,7 +129,6 @@ exports.BondkitTokenFactoryABI = [
|
|
|
135
129
|
{ internalType: "uint256", name: "lpSplitRatioFeeRecipientBps", type: "uint256" },
|
|
136
130
|
{ internalType: "uint256", name: "targetAmount", type: "uint256" },
|
|
137
131
|
{ internalType: "address", name: "tradingToken", type: "address" },
|
|
138
|
-
{ internalType: "address", name: "migrationAdminAddress", type: "address" },
|
|
139
132
|
{ internalType: "address", name: "bondingPhaseSplitter", type: "address" },
|
|
140
133
|
{ internalType: "address", name: "v4PoolManager", type: "address" },
|
|
141
134
|
{ internalType: "address", name: "v4Hook", type: "address" },
|
|
@@ -178,7 +171,6 @@ exports.BondkitTokenFactoryABI = [
|
|
|
178
171
|
{ internalType: "uint256", name: "lpSplitRatioFeeRecipientBps", type: "uint256" },
|
|
179
172
|
{ internalType: "uint256", name: "targetAmount", type: "uint256" },
|
|
180
173
|
{ internalType: "address", name: "tradingToken", type: "address" },
|
|
181
|
-
{ internalType: "address", name: "migrationAdminAddress", type: "address" },
|
|
182
174
|
{ internalType: "address", name: "bondingPhaseSplitter", type: "address" },
|
|
183
175
|
{ internalType: "address", name: "v4PoolManager", type: "address" },
|
|
184
176
|
{ internalType: "address", name: "v4Hook", type: "address" },
|
|
@@ -230,7 +222,6 @@ exports.BondkitTokenFactoryABI = [
|
|
|
230
222
|
{ internalType: "uint256", name: "lpSplitRatioFeeRecipientBps", type: "uint256" },
|
|
231
223
|
{ internalType: "uint256", name: "targetAmount", type: "uint256" },
|
|
232
224
|
{ internalType: "address", name: "tradingToken", type: "address" },
|
|
233
|
-
{ internalType: "address", name: "migrationAdminAddress", type: "address" },
|
|
234
225
|
{ internalType: "address", name: "bondingPhaseSplitter", type: "address" },
|
|
235
226
|
{ internalType: "address", name: "v4PoolManager", type: "address" },
|
|
236
227
|
{ internalType: "address", name: "v4Hook", type: "address" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseMainnetRpcUrl = exports.BaseBondkitTokenFactoryContractAddress = void 0;
|
|
4
|
-
exports.BaseBondkitTokenFactoryContractAddress = "
|
|
4
|
+
exports.BaseBondkitTokenFactoryContractAddress = "0x5d641bbB206d4B5585eCCd919F36270200A9A2Ad";
|
|
5
5
|
exports.BaseMainnetRpcUrl = "https://base-rpc.publicnode.com";
|