create-stylus 0.1.4 → 0.1.6
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/cli.js +31 -5
- package/dist/cli.js.map +1 -1
- package/package.json +11 -2
- package/src/main.ts +11 -2
- package/src/tasks/config-to-sepolia.ts +25 -0
- package/src/tasks/copy-template-files.ts +7 -4
- package/src/tasks/index.ts +1 -0
- package/src/utils/prompt-for-missing-options.ts +1 -1
- package/templates/base/package.json +10 -1
- package/templates/base/packages/nextjs/app/debug/_components/DebugContracts.tsx +15 -5
- package/templates/base/packages/nextjs/app/debug/_components/contract/ContractInput.tsx +3 -3
- package/templates/base/packages/nextjs/app/debug/_components/contract/ContractUI.tsx +104 -28
- package/templates/base/packages/nextjs/app/debug/_components/contract/DisplayVariable.tsx +15 -2
- package/templates/base/packages/nextjs/app/debug/_components/contract/ReadOnlyFunctionForm.tsx +11 -4
- package/templates/base/packages/nextjs/app/debug/_components/contract/TxReceipt.tsx +37 -21
- package/templates/base/packages/nextjs/app/debug/_components/contract/WriteOnlyFunctionForm.tsx +26 -20
- package/templates/base/packages/nextjs/app/layout.tsx +10 -4
- package/templates/base/packages/nextjs/components/AngularBorder.tsx +41 -0
- package/templates/base/packages/nextjs/components/Footer.tsx +153 -44
- package/templates/base/packages/nextjs/components/Header.tsx +73 -10
- package/templates/base/packages/nextjs/components/SwitchTheme.tsx +34 -3
- package/templates/base/packages/nextjs/components/scaffold-eth/Faucet.tsx +40 -5
- package/templates/base/packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx +1 -9
- package/templates/base/packages/nextjs/components/scaffold-eth/Input/InputBase.tsx +1 -1
- package/templates/base/packages/nextjs/components/scaffold-eth/Input/IntegerInput.tsx +35 -25
- package/templates/base/packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/AddressInfoDropdown.tsx +138 -24
- package/templates/base/packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/RevealBurnerPKModal.tsx +59 -0
- package/templates/base/packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/index.tsx +2 -0
- package/templates/base/packages/nextjs/contracts/deployedContracts.ts +117 -1
- package/templates/base/packages/nextjs/hooks/scaffold-eth/useScaffoldEventHistory.ts +107 -28
- package/templates/base/packages/nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts +5 -1
- package/templates/base/packages/nextjs/hooks/scaffold-eth/useTransactor.tsx +7 -5
- package/templates/base/packages/nextjs/icons/EthIcon.tsx +28 -0
- package/templates/base/packages/nextjs/icons/LightBugAntIcon.tsx +7 -7
- package/templates/base/packages/nextjs/package.json +13 -5
- package/templates/base/packages/nextjs/public/logo.svg +20 -7
- package/templates/base/packages/nextjs/services/web3/wagmiConnectors.tsx +1 -0
- package/templates/base/packages/nextjs/styles/globals.css +339 -2
- package/templates/base/packages/nextjs/tailwind.config.js +2 -1
- package/templates/base/packages/nextjs/utils/scaffold-eth/contract.ts +74 -2
- package/templates/base/packages/nextjs/utils/scaffold-stylus/supportedChains.ts +1 -1
- package/templates/base/packages/stylus/package.json +9 -0
- package/templates/base/packages/stylus/scripts/deploy.ts +0 -8
- package/templates/base/packages/stylus/scripts/deploy_contract.ts +1 -0
- package/templates/base/packages/stylus/scripts/test_network.ts +6 -7
- package/templates/base/packages/stylus/scripts/utils/contract.ts +6 -2
- package/templates/base/packages/stylus/scripts/utils/deployment.ts +1 -0
- package/templates/base/packages/stylus/scripts/utils/network.ts +23 -5
- package/templates/base/packages/stylus/your-contract/Cargo.lock +4 -4
- package/templates/base/packages/stylus/your-contract/Cargo.toml +1 -1
- package/templates/base/packages/stylus/your-contract/src/lib.rs +3 -7
- package/templates/base/readme.md +55 -169
- package/templates/base/yarn.lock +1058 -1128
- package/templates/base/packages/stylus/counter/.cargo/config.toml +0 -18
- package/templates/base/packages/stylus/counter/Cargo.lock +0 -5788
- package/templates/base/packages/stylus/counter/Cargo.toml +0 -46
- package/templates/base/packages/stylus/counter/rust-toolchain.toml +0 -2
- package/templates/base/packages/stylus/counter/src/lib.rs +0 -121
- package/templates/base/packages/stylus/counter/src/main.rs +0 -10
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
import { rainbowkitBurnerWallet } from "burner-connector";
|
|
3
|
+
import { ShieldExclamationIcon } from "@heroicons/react/24/outline";
|
|
4
|
+
import { useCopyToClipboard } from "~~/hooks/scaffold-eth";
|
|
5
|
+
import { getParsedError, notification } from "~~/utils/scaffold-eth";
|
|
6
|
+
|
|
7
|
+
const BURNER_WALLET_PK_KEY = "burnerWallet.pk";
|
|
8
|
+
|
|
9
|
+
export const RevealBurnerPKModal = () => {
|
|
10
|
+
const { copyToClipboard, isCopiedToClipboard } = useCopyToClipboard();
|
|
11
|
+
const modalCheckboxRef = useRef<HTMLInputElement>(null);
|
|
12
|
+
|
|
13
|
+
const handleCopyPK = async () => {
|
|
14
|
+
try {
|
|
15
|
+
const storage = rainbowkitBurnerWallet.useSessionStorage ? sessionStorage : localStorage;
|
|
16
|
+
const burnerPK = storage?.getItem(BURNER_WALLET_PK_KEY);
|
|
17
|
+
if (!burnerPK) throw new Error("Burner wallet private key not found");
|
|
18
|
+
await copyToClipboard(burnerPK);
|
|
19
|
+
notification.success("Burner wallet private key copied to clipboard");
|
|
20
|
+
} catch (e) {
|
|
21
|
+
const parsedError = getParsedError(e);
|
|
22
|
+
notification.error(parsedError);
|
|
23
|
+
if (modalCheckboxRef.current) modalCheckboxRef.current.checked = false;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<>
|
|
29
|
+
<div>
|
|
30
|
+
<input type="checkbox" id="reveal-burner-pk-modal" className="modal-toggle" ref={modalCheckboxRef} />
|
|
31
|
+
<label htmlFor="reveal-burner-pk-modal" className="modal cursor-pointer">
|
|
32
|
+
<label className="modal-box relative">
|
|
33
|
+
{/* dummy input to capture event onclick on modal box */}
|
|
34
|
+
<input className="h-0 w-0 absolute top-0 left-0" />
|
|
35
|
+
<label htmlFor="reveal-burner-pk-modal" className="btn btn-ghost btn-sm btn-circle absolute right-3 top-3">
|
|
36
|
+
✕
|
|
37
|
+
</label>
|
|
38
|
+
<div>
|
|
39
|
+
<p className="text-lg font-semibold m-0 p-0">Copy Burner Wallet Private Key</p>
|
|
40
|
+
<div role="alert" className="alert alert-warning mt-4">
|
|
41
|
+
<ShieldExclamationIcon className="h-6 w-6" />
|
|
42
|
+
<span className="font-semibold">
|
|
43
|
+
Burner wallets are intended for local development only and are not safe for storing real funds.
|
|
44
|
+
</span>
|
|
45
|
+
</div>
|
|
46
|
+
<p>
|
|
47
|
+
Your Private Key provides <strong>full access</strong> to your entire wallet and funds. This is
|
|
48
|
+
currently stored <strong>temporarily</strong> in your browser.
|
|
49
|
+
</p>
|
|
50
|
+
<button className="btn btn-outline btn-error" onClick={handleCopyPK} disabled={isCopiedToClipboard}>
|
|
51
|
+
Copy Private Key To Clipboard
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
54
|
+
</label>
|
|
55
|
+
</label>
|
|
56
|
+
</div>
|
|
57
|
+
</>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
@@ -6,6 +6,7 @@ import { Balance } from "../Balance";
|
|
|
6
6
|
import { AddressInfoDropdown } from "./AddressInfoDropdown";
|
|
7
7
|
import { AddressQRCodeModal } from "./AddressQRCodeModal";
|
|
8
8
|
import { BurnerWalletModal } from "./BurnerWalletModal";
|
|
9
|
+
import { RevealBurnerPKModal } from "./RevealBurnerPKModal";
|
|
9
10
|
import { WrongNetworkDropdown } from "./WrongNetworkDropdown";
|
|
10
11
|
import { ConnectButton } from "@rainbow-me/rainbowkit";
|
|
11
12
|
import { Address } from "viem";
|
|
@@ -71,6 +72,7 @@ export const RainbowKitCustomConnectButton = () => {
|
|
|
71
72
|
onSwitchAccount={() => setIsBurnerModalOpen(true)}
|
|
72
73
|
/>
|
|
73
74
|
<AddressQRCodeModal address={account.address as Address} modalId="qrcode-modal" />
|
|
75
|
+
<RevealBurnerPKModal />
|
|
74
76
|
</>
|
|
75
77
|
);
|
|
76
78
|
})()}
|
|
@@ -4,6 +4,122 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { GenericContractsDeclaration } from "../utils/scaffold-eth/contract";
|
|
6
6
|
|
|
7
|
-
const deployedContracts = {
|
|
7
|
+
const deployedContracts = {
|
|
8
|
+
"412346": {
|
|
9
|
+
"your-contract": {
|
|
10
|
+
address: "0xe547a947fc6c8683c210a6a56a9de05dd87142ea",
|
|
11
|
+
txHash: "0x7a9d0a2de8a684efeabc47d502c6480da156a5f5f360c2469a01a88db782fc81",
|
|
12
|
+
abi: [
|
|
13
|
+
{
|
|
14
|
+
inputs: [
|
|
15
|
+
{
|
|
16
|
+
internalType: "address",
|
|
17
|
+
name: "",
|
|
18
|
+
type: "address",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
name: "OwnableInvalidOwner",
|
|
22
|
+
type: "error",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
inputs: [
|
|
26
|
+
{
|
|
27
|
+
internalType: "address",
|
|
28
|
+
name: "",
|
|
29
|
+
type: "address",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
name: "OwnableUnauthorizedAccount",
|
|
33
|
+
type: "error",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
inputs: [],
|
|
37
|
+
name: "greeting",
|
|
38
|
+
outputs: [
|
|
39
|
+
{
|
|
40
|
+
internalType: "string",
|
|
41
|
+
name: "",
|
|
42
|
+
type: "string",
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
stateMutability: "view",
|
|
46
|
+
type: "function",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
inputs: [],
|
|
50
|
+
name: "premium",
|
|
51
|
+
outputs: [
|
|
52
|
+
{
|
|
53
|
+
internalType: "bool",
|
|
54
|
+
name: "",
|
|
55
|
+
type: "bool",
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
stateMutability: "view",
|
|
59
|
+
type: "function",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
inputs: [],
|
|
63
|
+
name: "receiveEther",
|
|
64
|
+
outputs: [],
|
|
65
|
+
stateMutability: "payable",
|
|
66
|
+
type: "function",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
inputs: [
|
|
70
|
+
{
|
|
71
|
+
internalType: "string",
|
|
72
|
+
name: "new_greeting",
|
|
73
|
+
type: "string",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
name: "setGreeting",
|
|
77
|
+
outputs: [],
|
|
78
|
+
stateMutability: "payable",
|
|
79
|
+
type: "function",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
inputs: [],
|
|
83
|
+
name: "totalCounter",
|
|
84
|
+
outputs: [
|
|
85
|
+
{
|
|
86
|
+
internalType: "uint256",
|
|
87
|
+
name: "",
|
|
88
|
+
type: "uint256",
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
stateMutability: "view",
|
|
92
|
+
type: "function",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
inputs: [
|
|
96
|
+
{
|
|
97
|
+
internalType: "address",
|
|
98
|
+
name: "user",
|
|
99
|
+
type: "address",
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
name: "userGreetingCounter",
|
|
103
|
+
outputs: [
|
|
104
|
+
{
|
|
105
|
+
internalType: "uint256",
|
|
106
|
+
name: "",
|
|
107
|
+
type: "uint256",
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
stateMutability: "view",
|
|
111
|
+
type: "function",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
inputs: [],
|
|
115
|
+
name: "withdraw",
|
|
116
|
+
outputs: [],
|
|
117
|
+
stateMutability: "nonpayable",
|
|
118
|
+
type: "function",
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
} as const;
|
|
8
124
|
|
|
9
125
|
export default deployedContracts satisfies GenericContractsDeclaration;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
import { useInfiniteQuery } from "@tanstack/react-query";
|
|
2
|
+
import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
|
|
3
3
|
import { Abi, AbiEvent, ExtractAbiEventNames } from "abitype";
|
|
4
4
|
import { BlockNumber, GetLogsParameters } from "viem";
|
|
5
|
+
import { arbitrumNitro } from "~~/utils/scaffold-stylus/supportedChains";
|
|
5
6
|
import { Config, UsePublicClientReturnType, useBlockNumber, usePublicClient } from "wagmi";
|
|
6
7
|
import { useSelectedNetwork } from "~~/hooks/scaffold-eth";
|
|
7
8
|
import { useDeployedContractInfo } from "~~/hooks/scaffold-eth";
|
|
@@ -54,11 +55,15 @@ const getEvents = async (
|
|
|
54
55
|
};
|
|
55
56
|
|
|
56
57
|
/**
|
|
57
|
-
*
|
|
58
|
+
* @deprecated **Recommended only for local (arbitrum nitro) chains and development.**
|
|
59
|
+
* It uses getLogs which can overload RPC endpoints (especially on L2s with short block times).
|
|
60
|
+
* For production, use an indexer such as ponder.sh or similar to query contract events efficiently.
|
|
61
|
+
*
|
|
62
|
+
* Reads events from a deployed contract.
|
|
58
63
|
* @param config - The config settings
|
|
59
64
|
* @param config.contractName - deployed contract name
|
|
60
65
|
* @param config.eventName - name of the event to listen for
|
|
61
|
-
* @param config.fromBlock -
|
|
66
|
+
* @param config.fromBlock - optional block number to start reading events from (defaults to `deployedOnBlock` in deployedContracts.ts if set for contract, otherwise defaults to 0)
|
|
62
67
|
* @param config.toBlock - optional block number to stop reading events at (if not provided, reads until current block)
|
|
63
68
|
* @param config.chainId - optional chainId that is configured with the scaffold project to make use for multi-chain interactions.
|
|
64
69
|
* @param config.filters - filters to be applied to the event (parameterName: value)
|
|
@@ -91,10 +96,21 @@ export const useScaffoldEventHistory = <
|
|
|
91
96
|
}: UseScaffoldEventHistoryConfig<TContractName, TEventName, TBlockData, TTransactionData, TReceiptData>) => {
|
|
92
97
|
const selectedNetwork = useSelectedNetwork(chainId);
|
|
93
98
|
|
|
99
|
+
// Runtime warning for non-local chains
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
if (selectedNetwork.id !== arbitrumNitro.id) {
|
|
102
|
+
console.log(
|
|
103
|
+
"⚠️ useScaffoldEventHistory is not optimized for production use. It can overload RPC endpoints (especially on L2s)",
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}, [selectedNetwork.id]);
|
|
107
|
+
|
|
94
108
|
const publicClient = usePublicClient({
|
|
95
109
|
chainId: selectedNetwork.id,
|
|
96
110
|
});
|
|
97
|
-
const [
|
|
111
|
+
const [liveEvents, setLiveEvents] = useState<any[]>([]);
|
|
112
|
+
const [lastFetchedBlock, setLastFetchedBlock] = useState<bigint | null>(null);
|
|
113
|
+
const [isPollingActive, setIsPollingActive] = useState(false);
|
|
98
114
|
|
|
99
115
|
const { data: blockNumber } = useBlockNumber({ watch: watch, chainId: selectedNetwork.id });
|
|
100
116
|
|
|
@@ -109,6 +125,15 @@ export const useScaffoldEventHistory = <
|
|
|
109
125
|
|
|
110
126
|
const isContractAddressAndClientReady = Boolean(deployedContractData?.address) && Boolean(publicClient);
|
|
111
127
|
|
|
128
|
+
const fromBlockValue =
|
|
129
|
+
fromBlock !== undefined
|
|
130
|
+
? fromBlock
|
|
131
|
+
: BigInt(
|
|
132
|
+
deployedContractData && "deployedOnBlock" in deployedContractData
|
|
133
|
+
? (deployedContractData.deployedOnBlock as any) || 0
|
|
134
|
+
: 0,
|
|
135
|
+
);
|
|
136
|
+
|
|
112
137
|
const query = useInfiniteQuery({
|
|
113
138
|
queryKey: [
|
|
114
139
|
"eventHistory",
|
|
@@ -116,7 +141,7 @@ export const useScaffoldEventHistory = <
|
|
|
116
141
|
contractName,
|
|
117
142
|
address: deployedContractData?.address,
|
|
118
143
|
eventName,
|
|
119
|
-
fromBlock:
|
|
144
|
+
fromBlock: fromBlockValue?.toString(),
|
|
120
145
|
toBlock: toBlock?.toString(),
|
|
121
146
|
chainId: selectedNetwork.id,
|
|
122
147
|
filters: JSON.stringify(filters, replacer),
|
|
@@ -146,18 +171,16 @@ export const useScaffoldEventHistory = <
|
|
|
146
171
|
{ blockData, transactionData, receiptData },
|
|
147
172
|
);
|
|
148
173
|
|
|
174
|
+
setLastFetchedBlock(batchToBlock || blockNumber || 0n);
|
|
175
|
+
|
|
149
176
|
return data;
|
|
150
177
|
},
|
|
151
|
-
enabled: enabled && isContractAddressAndClientReady,
|
|
152
|
-
initialPageParam:
|
|
178
|
+
enabled: enabled && isContractAddressAndClientReady && !isPollingActive, // Disable when polling starts
|
|
179
|
+
initialPageParam: fromBlockValue,
|
|
153
180
|
getNextPageParam: (lastPage, allPages, lastPageParam) => {
|
|
154
|
-
if (!blockNumber ||
|
|
181
|
+
if (!blockNumber || fromBlockValue >= blockNumber) return undefined;
|
|
155
182
|
|
|
156
|
-
const
|
|
157
|
-
Number(lastPageParam),
|
|
158
|
-
...(lastPage || []).map(event => Number(event.blockNumber || 0)),
|
|
159
|
-
);
|
|
160
|
-
const nextBlock = BigInt(Math.max(Number(lastPageParam), lastPageHighestBlock) + 1);
|
|
183
|
+
const nextBlock = lastPageParam + BigInt(blocksBatchSize);
|
|
161
184
|
|
|
162
185
|
// Don't go beyond the specified toBlock or current block
|
|
163
186
|
const maxBlock = toBlock && toBlock < blockNumber ? toBlock : blockNumber;
|
|
@@ -182,28 +205,84 @@ export const useScaffoldEventHistory = <
|
|
|
182
205
|
},
|
|
183
206
|
});
|
|
184
207
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
if (
|
|
188
|
-
// skipping on first render, since on first render we should call queryFn with
|
|
189
|
-
// fromBlock value, not blockNumber
|
|
190
|
-
if (isFirstRender) setIsFirstRender(false);
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
208
|
+
// Check if we're caught up and should start polling
|
|
209
|
+
const shouldStartPolling = () => {
|
|
210
|
+
if (!watch || !blockNumber || isPollingActive) return false;
|
|
193
211
|
|
|
194
|
-
query.
|
|
195
|
-
|
|
196
|
-
|
|
212
|
+
return !query.hasNextPage && query.status === "success";
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// Poll for new events when watch mode is enabled
|
|
216
|
+
useQuery({
|
|
217
|
+
queryKey: ["liveEvents", contractName, eventName, blockNumber?.toString(), lastFetchedBlock?.toString()],
|
|
218
|
+
enabled: Boolean(
|
|
219
|
+
watch && enabled && isContractAddressAndClientReady && blockNumber && (shouldStartPolling() || isPollingActive),
|
|
220
|
+
),
|
|
221
|
+
queryFn: async () => {
|
|
222
|
+
if (!isContractAddressAndClientReady || !blockNumber) return null;
|
|
223
|
+
|
|
224
|
+
if (!isPollingActive && shouldStartPolling()) {
|
|
225
|
+
setIsPollingActive(true);
|
|
226
|
+
}
|
|
197
227
|
|
|
198
|
-
|
|
228
|
+
const maxBlock = toBlock && toBlock < blockNumber ? toBlock : blockNumber;
|
|
229
|
+
const startBlock = lastFetchedBlock || maxBlock;
|
|
230
|
+
|
|
231
|
+
// Only fetch if there are new blocks to check
|
|
232
|
+
if (startBlock >= maxBlock) return null;
|
|
233
|
+
|
|
234
|
+
const newEvents = await getEvents(
|
|
235
|
+
{
|
|
236
|
+
address: deployedContractData?.address,
|
|
237
|
+
event,
|
|
238
|
+
fromBlock: startBlock + 1n,
|
|
239
|
+
toBlock: maxBlock,
|
|
240
|
+
args: filters,
|
|
241
|
+
},
|
|
242
|
+
publicClient,
|
|
243
|
+
{ blockData, transactionData, receiptData },
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
if (newEvents && newEvents.length > 0) {
|
|
247
|
+
setLiveEvents(prev => [...newEvents, ...prev]);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
setLastFetchedBlock(maxBlock);
|
|
251
|
+
return newEvents;
|
|
252
|
+
},
|
|
253
|
+
refetchInterval: false,
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
// Manual trigger to fetch next page when previous page completes (only when not polling)
|
|
199
257
|
useEffect(() => {
|
|
200
|
-
if (
|
|
258
|
+
if (
|
|
259
|
+
!isPollingActive &&
|
|
260
|
+
query.status === "success" &&
|
|
261
|
+
query.hasNextPage &&
|
|
262
|
+
!query.isFetchingNextPage &&
|
|
263
|
+
!query.error
|
|
264
|
+
) {
|
|
201
265
|
query.fetchNextPage();
|
|
202
266
|
}
|
|
203
|
-
}, [query]);
|
|
267
|
+
}, [query, isPollingActive]);
|
|
268
|
+
|
|
269
|
+
// Combine historical data from infinite query with live events from watch hook
|
|
270
|
+
const historicalEvents = query.data?.pages || [];
|
|
271
|
+
const allEvents = [...liveEvents, ...historicalEvents] as typeof historicalEvents;
|
|
272
|
+
|
|
273
|
+
// remove duplicates
|
|
274
|
+
const seenEvents = new Set<string>();
|
|
275
|
+
const combinedEvents = allEvents.filter(event => {
|
|
276
|
+
const eventKey = `${event?.transactionHash}-${event?.logIndex}-${event?.blockHash}`;
|
|
277
|
+
if (seenEvents.has(eventKey)) {
|
|
278
|
+
return false;
|
|
279
|
+
}
|
|
280
|
+
seenEvents.add(eventKey);
|
|
281
|
+
return true;
|
|
282
|
+
}) as typeof historicalEvents;
|
|
204
283
|
|
|
205
284
|
return {
|
|
206
|
-
data:
|
|
285
|
+
data: combinedEvents,
|
|
207
286
|
status: query.status,
|
|
208
287
|
error: query.error,
|
|
209
288
|
isLoading: query.isLoading,
|
|
@@ -117,7 +117,11 @@ export function useScaffoldWriteContract<TContractName extends ContractName>(
|
|
|
117
117
|
} as WriteContractVariables<Abi, string, any[], Config, number>;
|
|
118
118
|
|
|
119
119
|
if (!finalConfig?.disableSimulate) {
|
|
120
|
-
await simulateContractWriteAndNotifyError({
|
|
120
|
+
await simulateContractWriteAndNotifyError({
|
|
121
|
+
wagmiConfig,
|
|
122
|
+
writeContractParams: writeContractObject,
|
|
123
|
+
chainId: selectedNetwork.id as AllowedChainIds,
|
|
124
|
+
});
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
const makeWriteWithParams = () =>
|
|
@@ -2,9 +2,10 @@ import { Hash, SendTransactionParameters, TransactionReceipt, WalletClient } fro
|
|
|
2
2
|
import { Config, useWalletClient } from "wagmi";
|
|
3
3
|
import { getPublicClient } from "wagmi/actions";
|
|
4
4
|
import { SendTransactionMutate } from "wagmi/query";
|
|
5
|
+
import scaffoldConfig from "~~/scaffold.config";
|
|
5
6
|
import { wagmiConfig } from "~~/services/web3/wagmiConfig";
|
|
6
|
-
import {
|
|
7
|
-
import { getBlockExplorerTxLink } from "~~/utils/scaffold-stylus";
|
|
7
|
+
import { getParsedErrorWithAllAbis, notification } from "~~/utils/scaffold-eth";
|
|
8
|
+
import { AllowedChainIds, getBlockExplorerTxLink } from "~~/utils/scaffold-stylus";
|
|
8
9
|
import { TransactorFuncOptions } from "~~/utils/scaffold-eth/contract";
|
|
9
10
|
|
|
10
11
|
type TransactionFunc = (
|
|
@@ -51,8 +52,9 @@ export const useTransactor = (_walletClient?: WalletClient): TransactionFunc =>
|
|
|
51
52
|
let transactionHash: Hash | undefined = undefined;
|
|
52
53
|
let transactionReceipt: TransactionReceipt | undefined;
|
|
53
54
|
let blockExplorerTxURL = "";
|
|
55
|
+
let chainId: number = scaffoldConfig.targetNetworks[0].id;
|
|
54
56
|
try {
|
|
55
|
-
|
|
57
|
+
chainId = await walletClient.getChainId();
|
|
56
58
|
// Get full transaction from public client
|
|
57
59
|
const publicClient = getPublicClient(wagmiConfig);
|
|
58
60
|
|
|
@@ -68,7 +70,7 @@ export const useTransactor = (_walletClient?: WalletClient): TransactionFunc =>
|
|
|
68
70
|
}
|
|
69
71
|
notification.remove(notificationId);
|
|
70
72
|
|
|
71
|
-
blockExplorerTxURL =
|
|
73
|
+
blockExplorerTxURL = chainId ? getBlockExplorerTxLink(chainId, transactionHash) : "";
|
|
72
74
|
|
|
73
75
|
notificationId = notification.loading(
|
|
74
76
|
<TxnNotification message="Waiting for transaction to complete." blockExplorerLink={blockExplorerTxURL} />,
|
|
@@ -95,7 +97,7 @@ export const useTransactor = (_walletClient?: WalletClient): TransactionFunc =>
|
|
|
95
97
|
notification.remove(notificationId);
|
|
96
98
|
}
|
|
97
99
|
console.error("⚡️ ~ file: useTransactor.ts ~ error", error);
|
|
98
|
-
const message =
|
|
100
|
+
const message = getParsedErrorWithAllAbis(error, chainId as AllowedChainIds);
|
|
99
101
|
|
|
100
102
|
// if receipt was reverted, show notification with block explorer link and return error
|
|
101
103
|
if (transactionReceipt?.status === "reverted") {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
const EthIcon = ({ width = 32, height = 32, className = "" }) => {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
width={width}
|
|
8
|
+
height={height}
|
|
9
|
+
viewBox="0 0 32 32"
|
|
10
|
+
fill="none"
|
|
11
|
+
className={className}
|
|
12
|
+
>
|
|
13
|
+
<g fill="none" fillRule="evenodd">
|
|
14
|
+
<circle cx="16" cy="16" r="16" fill="#627EEA" />
|
|
15
|
+
<g fill="#FFF" fillRule="nonzero">
|
|
16
|
+
<path fillOpacity=".602" d="M16.498 4v8.87l7.497 3.35z" />
|
|
17
|
+
<path d="M16.498 4L9 16.22l7.498-3.35z" />
|
|
18
|
+
<path fillOpacity=".602" d="M16.498 21.968v6.027L24 17.616z" />
|
|
19
|
+
<path d="M16.498 27.995v-6.028L9 17.616z" />
|
|
20
|
+
<path fillOpacity=".2" d="M16.498 20.573l7.497-4.353-7.497-3.348z" />
|
|
21
|
+
<path fillOpacity=".602" d="M9 16.22l7.498 4.353v-7.701z" />
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</svg>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default EthIcon;
|
|
@@ -17,9 +17,9 @@ const LightBugAntIcon = ({ width = 26, height = 30, className = "" }) => {
|
|
|
17
17
|
<path
|
|
18
18
|
d="M13.0007 16.0776C14.6792 16.0776 16.3313 16.1925 17.9469 16.4179C19.4631 16.6275 20.6752 17.8049 20.6752 19.3082C20.6752 24.6609 17.2393 29 12.9993 29C8.75924 29 5.32482 24.6609 5.32482 19.3082C5.32482 17.8063 6.53835 16.6275 8.05306 16.4179C9.69215 16.1909 11.3454 16.0772 13.0007 16.0776ZM13.0007 16.0776C17.2159 16.0776 21.2571 16.807 25 18.1452C24.8235 21.1048 24.2573 24.0295 23.3157 26.8463M13.0007 16.0776C8.78556 16.0776 4.74438 16.807 1 18.1452C1.18276 21.1661 1.76028 24.0837 2.68578 26.8463M13.0007 16.0776C13.4456 16.0777 13.8858 15.9891 14.2949 15.8174C14.7039 15.6456 15.0732 15.3941 15.3804 15.0782C15.6877 14.7622 15.9264 14.3884 16.0824 13.9792C16.2383 13.57 16.308 13.1341 16.2875 12.6977M13.0007 16.0776C12.5559 16.0777 12.1156 15.9891 11.7066 15.8174C11.2976 15.6456 10.9283 15.3941 10.621 15.0782C10.3138 14.7622 10.075 14.3884 9.91911 13.9792C9.7632 13.57 9.69342 13.1341 9.71398 12.6977M16.2875 12.6977C16.2484 11.8675 15.885 11.0841 15.2729 10.5102C14.6607 9.93635 13.847 9.61623 13.0007 9.61638M16.2875 12.6977C18.884 12.4615 21.447 11.9404 23.9254 11.1441C23.845 9.52592 23.652 7.93646 23.3522 6.38578M9.71398 12.6977C9.7531 11.8675 10.1165 11.0841 10.7286 10.5102C11.3407 9.93635 12.1545 9.61623 13.0007 9.61638M9.71398 12.6977C7.07201 12.4564 4.5163 11.9281 2.07755 11.1441C2.15617 9.54687 2.34767 7.95693 2.65069 6.38578M13.0007 9.61638C14.4555 9.61638 15.8825 9.50151 17.2729 9.27752C17.8621 9.18276 18.3549 8.7635 18.4353 8.18343C18.5851 7.07324 18.3813 5.94474 17.8519 4.95282M13.0007 9.61638C11.546 9.61638 10.1204 9.50151 8.72854 9.27752C8.14079 9.18276 7.6466 8.7635 7.56619 8.18343C7.4116 7.07159 7.61615 5.94014 8.15102 4.94852M8.15102 4.94852C7.52825 4.54124 6.9608 4.05923 6.46232 3.51126C6.56467 2.60669 6.85708 1.75668 7.30155 1.00287M8.15102 4.94852C8.61646 4.08119 9.31421 3.35657 10.169 2.85008C11.0238 2.3436 12.0031 2.07592 13.0015 2.07592C13.9998 2.07592 14.9792 2.3436 15.8339 2.85008C16.6887 3.35657 17.3865 4.08263 17.8519 4.94995C18.4762 4.54361 19.0435 4.05974 19.5406 3.51556C19.4414 2.62879 19.1551 1.77205 18.6999 1"
|
|
19
19
|
stroke="url(#paint1_linear_2148_348)"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
strokeWidth="1.5"
|
|
21
|
+
strokeLinecap="round"
|
|
22
|
+
strokeLinejoin="round"
|
|
23
23
|
/>
|
|
24
24
|
<defs>
|
|
25
25
|
<linearGradient
|
|
@@ -30,8 +30,8 @@ const LightBugAntIcon = ({ width = 26, height = 30, className = "" }) => {
|
|
|
30
30
|
y2="15"
|
|
31
31
|
gradientUnits="userSpaceOnUse"
|
|
32
32
|
>
|
|
33
|
-
<stop
|
|
34
|
-
<stop offset="1"
|
|
33
|
+
<stop stopColor="#E3066E" />
|
|
34
|
+
<stop offset="1" stopColor="#203147" />
|
|
35
35
|
</linearGradient>
|
|
36
36
|
<linearGradient
|
|
37
37
|
id="paint1_linear_2148_348"
|
|
@@ -41,8 +41,8 @@ const LightBugAntIcon = ({ width = 26, height = 30, className = "" }) => {
|
|
|
41
41
|
y2="15"
|
|
42
42
|
gradientUnits="userSpaceOnUse"
|
|
43
43
|
>
|
|
44
|
-
<stop
|
|
45
|
-
<stop offset="1"
|
|
44
|
+
<stop stopColor="#E3066E" />
|
|
45
|
+
<stop offset="1" stopColor="#203147" />
|
|
46
46
|
</linearGradient>
|
|
47
47
|
</defs>
|
|
48
48
|
</svg>
|
|
@@ -13,15 +13,23 @@
|
|
|
13
13
|
"vercel": "vercel",
|
|
14
14
|
"vercel:yolo": "vercel --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true"
|
|
15
15
|
},
|
|
16
|
+
"overrides": {
|
|
17
|
+
"chalk": "5.3.0",
|
|
18
|
+
"strip-ansi": "7.1.0",
|
|
19
|
+
"color-convert": "2.0.1",
|
|
20
|
+
"color-name": "1.1.4",
|
|
21
|
+
"is-core-module": "2.13.1",
|
|
22
|
+
"error-ex": "1.3.2",
|
|
23
|
+
"has-ansi": "5.0.1"
|
|
24
|
+
},
|
|
16
25
|
"dependencies": {
|
|
17
|
-
"@ethersproject/providers": "^5.7.2",
|
|
18
26
|
"@heroicons/react": "^2.1.5",
|
|
19
|
-
"@rainbow-me/rainbowkit": "2.2.
|
|
27
|
+
"@rainbow-me/rainbowkit": "2.2.8",
|
|
20
28
|
"@tanstack/react-query": "^5.59.15",
|
|
21
29
|
"@uniswap/sdk-core": "^5.8.2",
|
|
22
30
|
"@uniswap/v2-sdk": "^4.6.1",
|
|
23
31
|
"blo": "^1.2.0",
|
|
24
|
-
"burner-connector": "0.0.
|
|
32
|
+
"burner-connector": "0.0.18",
|
|
25
33
|
"daisyui": "4.5.0",
|
|
26
34
|
"kubo-rpc-client": "^5.0.2",
|
|
27
35
|
"next": "^15.2.3",
|
|
@@ -32,8 +40,8 @@
|
|
|
32
40
|
"react-dom": "^19.0.0",
|
|
33
41
|
"react-hot-toast": "^2.4.0",
|
|
34
42
|
"usehooks-ts": "^3.1.0",
|
|
35
|
-
"viem": "2.
|
|
36
|
-
"wagmi": "2.
|
|
43
|
+
"viem": "2.34.0",
|
|
44
|
+
"wagmi": "2.16.4",
|
|
37
45
|
"zustand": "^5.0.0"
|
|
38
46
|
},
|
|
39
47
|
"devDependencies": {
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<path d="
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="
|
|
5
|
-
<path d="
|
|
6
|
-
<path d="
|
|
7
|
-
<path d="
|
|
1
|
+
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0 6C0 2.68629 2.68629 0 6 0H42C45.3137 0 48 2.68629 48 6V42C48 45.3137 45.3137 48 42 48H6C2.68629 48 0 45.3137 0 42V6Z" fill="#020202"/>
|
|
3
|
+
<path d="M0 6C0 2.68629 2.68629 0 6 0H42C45.3137 0 48 2.68629 48 6V42C48 45.3137 45.3137 48 42 48H6C2.68629 48 0 45.3137 0 42V6Z" fill="url(#paint0_linear_203_709)" fill-opacity="0.3"/>
|
|
4
|
+
<path d="M9.75907 10.6256L7.26708 15.4397H14.299L14.3159 32.7282C14.3159 35.7434 11.3632 36.0117 9.29256 36.0117L6.8269 39.7194V40.1518H28.8639V39.6818L26.3834 36.0134H22.7469C20.613 36.0134 19.6704 34.2796 19.6704 32.7137V19.1777C19.6704 16.278 21.7848 15.4775 22.842 15.4397H38.0246L35.2452 10.6256H19.6704V5.69836L14.4599 7.62396V10.6256H9.75907Z" fill="url(#paint1_linear_203_709)"/>
|
|
5
|
+
<path d="M31.754 27.7199L33.2964 28.1758L32.5989 28.8467L32.5355 28.9077L31.4749 28.5951C30.4673 28.2977 29.7143 27.5331 29.4599 26.5497C29.2054 25.5663 29.498 24.5516 30.2431 23.835L34.4006 19.8348C34.4134 19.8402 34.426 19.8463 34.4379 19.8532C34.4506 19.8592 34.4632 19.8661 34.4751 19.8723C34.4966 19.8829 34.5171 19.8952 34.5386 19.9066C34.5591 19.9181 34.5797 19.9302 34.6005 19.9433C34.6171 19.9533 34.633 19.9631 34.6488 19.9737C34.6646 19.9837 34.6804 19.9943 34.6964 20.0058C34.7115 20.0158 34.7257 20.0264 34.7399 20.037C34.7527 20.0454 34.7653 20.0553 34.7772 20.0652C34.7883 20.0728 34.7986 20.0812 34.8088 20.0903C34.8104 20.0912 34.8121 20.0918 34.8136 20.0935C34.8612 20.1316 34.9063 20.1712 34.9507 20.2138L35.1521 20.4075L30.9153 24.4816C30.4088 24.9695 30.2098 25.6594 30.3826 26.3287C30.5554 26.9981 31.0682 27.5179 31.754 27.7199Z" fill="#1A1A1A"/>
|
|
6
|
+
<path d="M32.2079 26.3798L34.5399 26.9798L33.7632 27.7268L31.9622 27.2633C31.4494 27.1321 31.0617 26.7593 30.9238 26.2661C30.7867 25.7729 30.9286 25.2635 31.3034 24.903L35.5649 20.8046L36.2379 21.4518L31.9764 25.5495C31.9241 25.6005 31.8844 25.6584 31.8584 25.7225C31.8196 25.8202 31.814 25.926 31.8426 26.0297C31.8482 26.0503 31.8553 26.0701 31.864 26.0893C31.9251 26.2326 32.0496 26.3394 32.2081 26.3798H32.2079Z" fill="#1A1A1A"/>
|
|
7
|
+
<path d="M36.7257 28.6896L32.5674 32.6897L31.9848 33.25C31.7953 33.1387 31.6186 33.0044 31.4577 32.8497L31.2563 32.656L31.8168 32.117L36.0536 28.0429C36.5609 27.555 36.7599 26.8644 36.5863 26.1958C36.4126 25.5265 35.9007 25.0066 35.2149 24.8046L33.6731 24.3495L33.7365 24.2885L34.434 23.6177L35.4947 23.9303C36.5021 24.2277 37.2552 24.9922 37.5096 25.9756C37.7632 26.9591 37.4709 27.9738 36.7257 28.6896Z" fill="white"/>
|
|
8
|
+
<path d="M35.6649 27.6224L31.4043 31.7209L30.8439 32.2599L30.1709 31.6126L30.7313 31.0736L34.9928 26.976C35.0458 26.9241 35.0855 26.8662 35.1101 26.8021C35.1489 26.7044 35.1545 26.5986 35.1259 26.4955C35.1203 26.4749 35.1132 26.4551 35.1054 26.436C35.0452 26.2927 34.9198 26.1859 34.7606 26.1448L32.4293 25.5456L32.4942 25.4832L33.1411 24.8611L33.206 24.7986L35.0062 25.2605C35.519 25.3932 35.9066 25.766 36.0446 26.2585C36.1817 26.7517 36.0398 27.2617 35.6649 27.6224Z" fill="white"/>
|
|
9
|
+
<path d="M40.3805 26.2623C40.3805 26.7952 40.1648 27.2961 39.7733 27.6727L34.9506 32.3109C34.559 32.6875 34.0382 32.8949 33.4841 32.8949C33.4516 32.8949 33.4191 32.8941 33.3873 32.8926H33.3778C33.3525 32.8911 33.3278 32.8895 33.3033 32.8872C33.2946 32.8864 33.2866 32.8857 33.278 32.8849C33.2535 32.8826 33.2297 32.8803 33.205 32.8766C33.2011 32.8766 33.197 32.8758 33.1931 32.8751C33.1827 32.8743 33.1717 32.8728 33.1606 32.8713C33.1329 32.8668 33.1058 32.8622 33.079 32.8576C33.0751 32.8561 33.071 32.8553 33.0679 32.8553C33.0434 32.8499 33.0188 32.8447 32.9949 32.8393C32.972 32.8339 32.949 32.8286 32.9261 32.8218C32.9102 32.818 32.8951 32.8134 32.8801 32.8095C32.8533 32.8018 32.8262 32.7935 32.8 32.7843C32.792 32.7812 32.7842 32.7789 32.7762 32.776C32.7738 32.7752 32.7723 32.7745 32.7699 32.7737C32.747 32.766 32.7247 32.7577 32.7026 32.7485C32.693 32.7454 32.6835 32.7408 32.674 32.737C32.6415 32.7233 32.609 32.7096 32.5765 32.6943C32.5733 32.6929 32.5702 32.6912 32.567 32.6898L36.7254 28.6896C37.4705 27.9738 37.7631 26.9591 37.5093 25.9757C37.2549 24.9923 36.5017 24.2276 35.4943 23.9303L34.4337 23.6177L33.7362 24.2886L33.6727 24.3496L35.2145 24.8047C35.9001 25.0067 36.4123 25.5265 36.5859 26.1959C36.7596 26.8644 36.5606 27.5552 36.0532 28.043L31.8164 32.1171L31.256 32.6561L30.8439 32.2597L31.4043 31.7207L35.6649 27.6223C36.0398 27.2618 36.1818 26.7517 36.0445 26.2584C35.9066 25.7658 35.519 25.3931 35.0062 25.2604L33.206 24.7984L33.141 24.8609L32.4942 25.483L32.4292 25.5455L34.7606 26.1447C34.92 26.1859 35.0451 26.2926 35.1053 26.4359C35.1133 26.455 35.1205 26.4748 35.1259 26.4954C35.1545 26.5983 35.1489 26.7043 35.1101 26.8019C35.0856 26.8659 35.0458 26.924 34.9927 26.9758L30.7313 31.0735L27.1951 27.6725C26.8036 27.296 26.5879 26.7951 26.5879 26.2621C26.5879 25.7292 26.8036 25.2283 27.1951 24.8518L32.0178 20.2139C32.4093 19.8373 32.9301 19.6299 33.4843 19.6299C33.5168 19.6299 33.5492 19.6307 33.5811 19.6322H33.5906C33.6239 19.6336 33.6571 19.6368 33.6904 19.6399C33.7173 19.6422 33.7443 19.6453 33.7705 19.649C33.7753 19.649 33.7792 19.6498 33.7833 19.6505C33.7937 19.6513 33.8032 19.6528 33.8125 19.6543C33.8379 19.658 33.8625 19.6626 33.887 19.6672C33.8918 19.668 33.8957 19.6687 33.9005 19.6695C33.925 19.6749 33.9488 19.6801 33.9734 19.6855C33.9964 19.6909 34.0194 19.6961 34.0423 19.703C34.0542 19.7061 34.0668 19.7091 34.0787 19.713C34.0969 19.7184 34.1151 19.7236 34.1335 19.7298C34.1692 19.7413 34.2056 19.7534 34.2405 19.7671C34.2587 19.7725 34.2762 19.7794 34.2935 19.7877C34.3117 19.7946 34.3299 19.8023 34.3474 19.8106C34.3656 19.8183 34.3832 19.8267 34.4005 19.835L30.243 23.8351C29.4979 24.5518 29.2053 25.5664 29.4598 26.5499C29.7142 27.5333 30.4672 28.298 31.4747 28.5953L32.5354 28.9078L32.5988 28.8468L33.2963 28.176L31.7538 27.7201C31.0682 27.5181 30.5553 26.9981 30.3825 26.3289C30.2097 25.6595 30.4087 24.9696 30.9152 24.4818L35.1519 20.4077L35.5649 20.8049L31.3035 24.9033C30.9286 25.2638 30.7866 25.7732 30.9238 26.2664C31.0618 26.7596 31.4494 27.1324 31.9622 27.2636L33.7632 27.7271L34.54 26.9801L32.208 26.3801C32.0494 26.3397 31.9249 26.233 31.8639 26.0896C31.8552 26.0704 31.8481 26.0506 31.8425 26.03C31.8139 25.9263 31.8195 25.8203 31.8583 25.7228C31.8845 25.6589 31.9241 25.6008 31.9763 25.5498L36.2378 21.4521L39.7731 24.8523C40.1647 25.2288 40.3803 25.7297 40.3803 26.2626L40.3805 26.2623Z" fill="#213147"/>
|
|
10
|
+
<path d="M40.3336 24.3123L36.7982 20.9122L36.1252 20.2649L35.5117 19.6749C35.3508 19.5201 35.1732 19.386 34.9838 19.2746C34.5375 19.0093 34.0223 18.8674 33.484 18.8674C32.7183 18.8674 31.9985 19.154 31.4571 19.6747L26.6345 24.3123C26.0932 24.8338 25.7952 25.526 25.7952 26.2625C25.7952 26.9989 26.0932 27.6911 26.6345 28.2126L30.1707 31.6128L30.7312 31.0738L27.195 27.6728C26.8034 27.2963 26.5878 26.7954 26.5878 26.2625C26.5878 25.7295 26.8034 25.2286 27.195 24.8521L32.0177 20.2138C32.4092 19.8373 32.93 19.6299 33.4841 19.6299C33.5166 19.6299 33.5491 19.6307 33.5809 19.6322H33.5904C33.6238 19.6336 33.6569 19.6367 33.6903 19.6398C33.7172 19.6421 33.7442 19.6452 33.7704 19.649C33.7752 19.649 33.7791 19.6498 33.7831 19.6505C33.7935 19.6513 33.803 19.6528 33.8124 19.6542C33.8377 19.658 33.8624 19.6626 33.8869 19.6672C33.8917 19.668 33.8956 19.6686 33.9003 19.6695C33.9248 19.6749 33.9486 19.6801 33.9733 19.6855C33.9963 19.6909 34.0192 19.6961 34.0422 19.703C34.0541 19.7061 34.0667 19.709 34.0786 19.713C34.0968 19.7184 34.115 19.7236 34.1333 19.7298C34.1691 19.7413 34.2055 19.7534 34.2403 19.7671C34.2585 19.7725 34.276 19.7794 34.2934 19.7877C34.3116 19.7946 34.3298 19.8023 34.3473 19.8106C34.3655 19.8183 34.383 19.8267 34.4004 19.835L30.2429 23.8351C29.4977 24.5518 29.2052 25.5664 29.4596 26.5499C29.7141 27.5333 30.467 28.298 31.4746 28.5952L32.5352 28.9078L32.5987 28.8468L33.2962 28.176L31.7537 27.7201C31.0681 27.5181 30.5551 26.9981 30.3823 26.3289C30.2095 25.6595 30.4085 24.9695 30.915 24.4817L35.1518 20.4077L35.1462 20.4023L35.5648 20.8048L31.3033 24.9033C30.9285 25.2638 30.7864 25.7732 30.9237 26.2664C31.0616 26.7596 31.4493 27.1324 31.9621 27.2635L33.7631 27.7271L34.5398 26.9801L32.2078 26.3801C32.0493 26.3397 31.9248 26.233 31.8638 26.0896C31.8551 26.0704 31.8479 26.0506 31.8423 26.03C31.8137 25.9263 31.8194 25.8203 31.8581 25.7228C31.8843 25.6589 31.924 25.6008 31.9762 25.5497L36.2376 21.4521L39.773 24.8523C40.1645 25.2288 40.3802 25.7297 40.3802 26.2626C40.3802 26.7956 40.1645 27.2964 39.773 27.673L34.9503 32.3112C34.5587 32.6878 34.0379 32.8952 33.4838 32.8952C33.4513 32.8952 33.4188 32.8944 33.387 32.8929H33.3775C33.3522 32.8914 33.3275 32.8898 33.303 32.8875C33.2943 32.8867 33.2863 32.886 33.2777 32.8852C33.2532 32.8829 33.2294 32.8806 33.2047 32.8769C33.2008 32.8769 33.1967 32.8761 33.1928 32.8754C33.1824 32.8746 33.1714 32.8731 33.1603 32.8717C33.1326 32.8671 33.1055 32.8625 33.0787 32.8579C33.0747 32.8564 33.0707 32.8556 33.0676 32.8556C33.0431 32.8502 33.0185 32.845 32.9946 32.8396C32.9717 32.8342 32.9487 32.829 32.9258 32.8221C32.9099 32.8183 32.8948 32.8137 32.8798 32.8098C32.853 32.8021 32.8259 32.7938 32.7997 32.7846C32.7917 32.7815 32.7839 32.7792 32.7759 32.7763C32.7735 32.7755 32.772 32.7748 32.7696 32.774C32.7467 32.7663 32.7244 32.758 32.7023 32.7488C32.6927 32.7457 32.6832 32.7411 32.6737 32.7374C32.6412 32.7236 32.6087 32.7099 32.5762 32.6947C32.573 32.6932 32.5699 32.6916 32.5667 32.6901L31.9842 33.2503C32.4305 33.5157 32.9457 33.6575 33.484 33.6575C34.2497 33.6575 34.9695 33.3709 35.5117 32.8502L40.3336 28.2128C40.875 27.6913 41.1729 26.999 41.1729 26.2626C41.1729 25.5262 40.875 24.8339 40.3336 24.3124V24.3123Z" fill="#E3066E"/>
|
|
11
|
+
<defs>
|
|
12
|
+
<linearGradient id="paint0_linear_203_709" x1="24" y1="-12.0009" x2="24" y2="48" gradientUnits="userSpaceOnUse">
|
|
13
|
+
<stop stop-opacity="0"/>
|
|
14
|
+
<stop offset="1" stop-color="#E3066E"/>
|
|
15
|
+
</linearGradient>
|
|
16
|
+
<linearGradient id="paint1_linear_203_709" x1="22.4258" y1="5.69836" x2="22.4258" y2="40.1518" gradientUnits="userSpaceOnUse">
|
|
17
|
+
<stop stop-color="white"/>
|
|
18
|
+
<stop offset="1" stop-color="white" stop-opacity="0.5"/>
|
|
19
|
+
</linearGradient>
|
|
20
|
+
</defs>
|
|
8
21
|
</svg>
|
|
@@ -38,6 +38,7 @@ const wallets = [
|
|
|
38
38
|
*/
|
|
39
39
|
export const wagmiConnectors = () => {
|
|
40
40
|
// Only create connectors on client-side to avoid SSR issues
|
|
41
|
+
// TODO: update when https://github.com/rainbow-me/rainbowkit/issues/2476 is resolved
|
|
41
42
|
if (typeof window === "undefined") {
|
|
42
43
|
return [];
|
|
43
44
|
}
|