@openzeppelin/ui-builder-adapter-evm 1.0.0 → 1.2.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/README.md +1 -1
- package/dist/index.cjs +375 -352
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +82 -69
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/__tests__/adapter-parsing.test.ts +67 -1
- package/src/__tests__/mocks/mock-network-configs.ts +3 -2
- package/src/__tests__/providerSelection.test.ts +1 -1
- package/src/abi/__tests__/etherscan-v2.test.ts +1 -1
- package/src/abi/__tests__/transformer.test.ts +1 -1
- package/src/abi/comparison.ts +1 -1
- package/src/abi/etherscan-v2.ts +2 -2
- package/src/abi/etherscan.ts +2 -2
- package/src/abi/loader.ts +2 -2
- package/src/abi/sourcify.ts +2 -2
- package/src/abi/transformer.ts +2 -6
- package/src/adapter.ts +11 -2
- package/src/config.ts +1 -1
- package/src/configuration/__tests__/explorer.test.ts +1 -1
- package/src/configuration/__tests__/rpc.test.ts +4 -4
- package/src/configuration/execution.ts +2 -2
- package/src/configuration/explorer.ts +2 -6
- package/src/configuration/network-services.ts +3 -3
- package/src/configuration/rpc.ts +2 -2
- package/src/mapping/__tests__/field-generator.test.ts +1 -1
- package/src/mapping/constants.ts +26 -1
- package/src/mapping/field-generator.ts +2 -2
- package/src/mapping/type-mapper.ts +1 -1
- package/src/proxy/detection.ts +1 -1
- package/src/query/handler.ts +2 -2
- package/src/query/view-checker.ts +1 -1
- package/src/transaction/components/AdvancedInfo.tsx +1 -1
- package/src/transaction/components/CustomGasParameters.tsx +2 -2
- package/src/transaction/components/EvmRelayerOptions.tsx +1 -1
- package/src/transaction/components/SpeedSelection.tsx +1 -1
- package/src/transaction/eoa.ts +2 -2
- package/src/transaction/execution-strategy.ts +1 -1
- package/src/transaction/formatter.ts +2 -2
- package/src/transaction/relayer.ts +2 -2
- package/src/transaction/sender.ts +2 -2
- package/src/transform/input-parser.ts +2 -2
- package/src/transform/output-formatter.ts +2 -2
- package/src/types.ts +1 -1
- package/src/validation/eoa.ts +2 -2
- package/src/validation/relayer.ts +1 -1
- package/src/wallet/README.md +4 -4
- package/src/wallet/__tests__/utils.test.ts +2 -2
- package/src/wallet/components/EvmWalletUiRoot.tsx +2 -2
- package/src/wallet/components/account/AccountDisplay.tsx +4 -4
- package/src/wallet/components/connect/ConnectButton.tsx +4 -7
- package/src/wallet/components/connect/ConnectorDialog.tsx +3 -6
- package/src/wallet/components/network/NetworkSwitcher.tsx +8 -8
- package/src/wallet/evmUiKitManager.ts +2 -2
- package/src/wallet/hooks/facade-hooks.ts +1 -1
- package/src/wallet/hooks/useUiKitConfig.ts +2 -2
- package/src/wallet/implementation/wagmi-implementation.ts +3 -3
- package/src/wallet/rainbowkit/__tests__/export-service.test.ts +1 -1
- package/src/wallet/rainbowkit/componentFactory.ts +1 -1
- package/src/wallet/rainbowkit/components.tsx +3 -3
- package/src/wallet/rainbowkit/config-generator.ts +1 -1
- package/src/wallet/rainbowkit/config-service.ts +2 -2
- package/src/wallet/rainbowkit/export-service.ts +1 -1
- package/src/wallet/rainbowkit/rainbowkitAssetManager.ts +1 -1
- package/src/wallet/rainbowkit/utils.ts +2 -2
- package/src/wallet/services/configResolutionService.ts +2 -2
- package/src/wallet/types.ts +1 -1
- package/src/wallet/utils/SafeWagmiComponent.tsx +1 -1
- package/src/wallet/utils/__tests__/uiKitService.test.ts +3 -3
- package/src/wallet/utils/connection.ts +2 -2
- package/src/wallet/utils/filterWalletComponents.ts +3 -3
- package/src/wallet/utils/uiKitService.ts +2 -2
- package/src/wallet/utils/walletImplementationManager.ts +2 -2
- package/src/wallet/utils.ts +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Chain, Abi, TransactionReceipt } from 'viem';
|
|
2
2
|
import React$1 from 'react';
|
|
3
|
-
import { EvmNetworkConfig, WalletConnectionStatus, ContractAdapter, UiKitConfiguration, NetworkServiceForm, ContractSchema, ProxyInfo, FieldType, FunctionParameter, FormFieldType, ExecutionConfig, TxStatus, TransactionStatusUpdate, RelayerDetails, RelayerDetailsRich, ExecutionMethodDetail, ContractFunction, Connector, NativeConfigLoader, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, EcosystemWalletComponents, AvailableUiKit, UserRpcProviderConfig, UserExplorerConfig, AdapterConfig } from '@openzeppelin/ui-
|
|
3
|
+
import { EvmNetworkConfig, WalletConnectionStatus, ContractAdapter, UiKitConfiguration, NetworkServiceForm, ContractSchema, ProxyInfo, FieldType, FunctionParameter, FormFieldType, ExecutionConfig, TxStatus, TransactionStatusUpdate, RelayerDetails, RelayerDetailsRich, ExecutionMethodDetail, ContractFunction, Connector, NativeConfigLoader, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, EcosystemWalletComponents, AvailableUiKit, UserRpcProviderConfig, UserExplorerConfig, TypeMappingInfo, AdapterConfig } from '@openzeppelin/ui-types';
|
|
4
4
|
import { RainbowKitProvider, ConnectButton } from '@rainbow-me/rainbowkit';
|
|
5
5
|
import { Speed } from '@openzeppelin/relayer-sdk';
|
|
6
6
|
|
|
@@ -307,6 +307,10 @@ declare class EvmAdapter implements ContractAdapter {
|
|
|
307
307
|
* @inheritdoc
|
|
308
308
|
*/
|
|
309
309
|
hashContractDefinition(definition: string): string;
|
|
310
|
+
/**
|
|
311
|
+
* @inheritdoc
|
|
312
|
+
*/
|
|
313
|
+
getTypeMappingInfo(): TypeMappingInfo;
|
|
310
314
|
}
|
|
311
315
|
|
|
312
316
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Chain, Abi, TransactionReceipt } from 'viem';
|
|
2
2
|
import React$1 from 'react';
|
|
3
|
-
import { EvmNetworkConfig, WalletConnectionStatus, ContractAdapter, UiKitConfiguration, NetworkServiceForm, ContractSchema, ProxyInfo, FieldType, FunctionParameter, FormFieldType, ExecutionConfig, TxStatus, TransactionStatusUpdate, RelayerDetails, RelayerDetailsRich, ExecutionMethodDetail, ContractFunction, Connector, NativeConfigLoader, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, EcosystemWalletComponents, AvailableUiKit, UserRpcProviderConfig, UserExplorerConfig, AdapterConfig } from '@openzeppelin/ui-
|
|
3
|
+
import { EvmNetworkConfig, WalletConnectionStatus, ContractAdapter, UiKitConfiguration, NetworkServiceForm, ContractSchema, ProxyInfo, FieldType, FunctionParameter, FormFieldType, ExecutionConfig, TxStatus, TransactionStatusUpdate, RelayerDetails, RelayerDetailsRich, ExecutionMethodDetail, ContractFunction, Connector, NativeConfigLoader, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, EcosystemWalletComponents, AvailableUiKit, UserRpcProviderConfig, UserExplorerConfig, TypeMappingInfo, AdapterConfig } from '@openzeppelin/ui-types';
|
|
4
4
|
import { RainbowKitProvider, ConnectButton } from '@rainbow-me/rainbowkit';
|
|
5
5
|
import { Speed } from '@openzeppelin/relayer-sdk';
|
|
6
6
|
|
|
@@ -307,6 +307,10 @@ declare class EvmAdapter implements ContractAdapter {
|
|
|
307
307
|
* @inheritdoc
|
|
308
308
|
*/
|
|
309
309
|
hashContractDefinition(definition: string): string;
|
|
310
|
+
/**
|
|
311
|
+
* @inheritdoc
|
|
312
|
+
*/
|
|
313
|
+
getTypeMappingInfo(): TypeMappingInfo;
|
|
310
314
|
}
|
|
311
315
|
|
|
312
316
|
/**
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var rainbowkitAssetManager_exports = {};
|
|
|
15
15
|
__export(rainbowkitAssetManager_exports, {
|
|
16
16
|
ensureRainbowKitAssetsLoaded: () => ensureRainbowKitAssetsLoaded
|
|
17
17
|
});
|
|
18
|
-
import { logger as logger13 } from "@openzeppelin/ui-
|
|
18
|
+
import { logger as logger13 } from "@openzeppelin/ui-utils";
|
|
19
19
|
async function ensureRainbowKitAssetsLoaded() {
|
|
20
20
|
if (loadedAssets) {
|
|
21
21
|
logger13.debug("RainbowKitAssetManager", "Assets already loaded, returning cached.");
|
|
@@ -68,10 +68,10 @@ var init_rainbowkitAssetManager = __esm({
|
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
// src/adapter.ts
|
|
71
|
-
import { logger as logger34 } from "@openzeppelin/ui-
|
|
71
|
+
import { logger as logger34 } from "@openzeppelin/ui-utils";
|
|
72
72
|
|
|
73
73
|
// src/abi/comparison.ts
|
|
74
|
-
import { logger, simpleHash } from "@openzeppelin/ui-
|
|
74
|
+
import { logger, simpleHash } from "@openzeppelin/ui-utils";
|
|
75
75
|
|
|
76
76
|
// src/abi/types.ts
|
|
77
77
|
function isValidAbiArray(value) {
|
|
@@ -394,7 +394,7 @@ var AbiComparisonService = class {
|
|
|
394
394
|
var abiComparisonService = new AbiComparisonService();
|
|
395
395
|
|
|
396
396
|
// src/configuration/network-services.ts
|
|
397
|
-
import { appConfigService as appConfigService3, userNetworkServiceConfigService as userNetworkServiceConfigService3 } from "@openzeppelin/ui-
|
|
397
|
+
import { appConfigService as appConfigService3, userNetworkServiceConfigService as userNetworkServiceConfigService3 } from "@openzeppelin/ui-utils";
|
|
398
398
|
|
|
399
399
|
// src/types/providers.ts
|
|
400
400
|
var EvmProviderKeys = {
|
|
@@ -410,17 +410,13 @@ function isEvmProviderKey(value) {
|
|
|
410
410
|
}
|
|
411
411
|
|
|
412
412
|
// src/configuration/explorer.ts
|
|
413
|
-
import {
|
|
414
|
-
appConfigService,
|
|
415
|
-
logger as logger4,
|
|
416
|
-
userNetworkServiceConfigService
|
|
417
|
-
} from "@openzeppelin/ui-builder-utils";
|
|
413
|
+
import { appConfigService, logger as logger4, userNetworkServiceConfigService } from "@openzeppelin/ui-utils";
|
|
418
414
|
|
|
419
415
|
// src/abi/etherscan-v2.ts
|
|
420
|
-
import { logger as logger3 } from "@openzeppelin/ui-
|
|
416
|
+
import { logger as logger3 } from "@openzeppelin/ui-utils";
|
|
421
417
|
|
|
422
418
|
// src/abi/transformer.ts
|
|
423
|
-
import { logger as logger2 } from "@openzeppelin/ui-
|
|
419
|
+
import { logger as logger2 } from "@openzeppelin/ui-utils";
|
|
424
420
|
|
|
425
421
|
// src/types/artifacts.ts
|
|
426
422
|
function isEvmContractArtifacts(obj) {
|
|
@@ -896,7 +892,7 @@ import {
|
|
|
896
892
|
isValidUrl,
|
|
897
893
|
logger as logger5,
|
|
898
894
|
userNetworkServiceConfigService as userNetworkServiceConfigService2
|
|
899
|
-
} from "@openzeppelin/ui-
|
|
895
|
+
} from "@openzeppelin/ui-utils";
|
|
900
896
|
function buildRpcUrl(config) {
|
|
901
897
|
return config.url;
|
|
902
898
|
}
|
|
@@ -1283,17 +1279,17 @@ import { createConfig as createConfig2, http as http3 } from "@wagmi/core";
|
|
|
1283
1279
|
import { mainnet } from "viem/chains";
|
|
1284
1280
|
import { WagmiProvider } from "wagmi";
|
|
1285
1281
|
import { useEffect as useEffect5, useMemo, useState as useState5 } from "react";
|
|
1286
|
-
import { logger as logger15 } from "@openzeppelin/ui-
|
|
1282
|
+
import { logger as logger15 } from "@openzeppelin/ui-utils";
|
|
1287
1283
|
|
|
1288
1284
|
// src/wallet/context/wagmi-context.tsx
|
|
1289
1285
|
import { createContext } from "react";
|
|
1290
1286
|
var WagmiProviderInitializedContext = createContext(false);
|
|
1291
1287
|
|
|
1292
1288
|
// src/wallet/evmUiKitManager.ts
|
|
1293
|
-
import { logger as logger14 } from "@openzeppelin/ui-
|
|
1289
|
+
import { logger as logger14 } from "@openzeppelin/ui-utils";
|
|
1294
1290
|
|
|
1295
1291
|
// src/wallet/utils/walletImplementationManager.ts
|
|
1296
|
-
import { appConfigService as appConfigService6, logger as logger12 } from "@openzeppelin/ui-
|
|
1292
|
+
import { appConfigService as appConfigService6, logger as logger12 } from "@openzeppelin/ui-utils";
|
|
1297
1293
|
|
|
1298
1294
|
// src/wallet/implementation/wagmi-implementation.ts
|
|
1299
1295
|
import { injected, metaMask, safe, walletConnect } from "@wagmi/connectors";
|
|
@@ -1308,7 +1304,7 @@ import {
|
|
|
1308
1304
|
watchAccount
|
|
1309
1305
|
} from "@wagmi/core";
|
|
1310
1306
|
import { http as http2 } from "viem";
|
|
1311
|
-
import { appConfigService as appConfigService5, logger as logger11 } from "@openzeppelin/ui-
|
|
1307
|
+
import { appConfigService as appConfigService5, logger as logger11 } from "@openzeppelin/ui-utils";
|
|
1312
1308
|
|
|
1313
1309
|
// src/networks/mainnet.ts
|
|
1314
1310
|
import {
|
|
@@ -1910,22 +1906,19 @@ var evmNetworks = [...evmMainnetNetworks, ...evmTestnetNetworks];
|
|
|
1910
1906
|
// src/wallet/rainbowkit/components.tsx
|
|
1911
1907
|
import { Loader2 as Loader23 } from "lucide-react";
|
|
1912
1908
|
import { useContext as useContext2, useEffect as useEffect4, useRef, useState as useState4 } from "react";
|
|
1913
|
-
import { Button as Button4 } from "@openzeppelin/ui-
|
|
1914
|
-
import { cn as cn4, logger as logger8 } from "@openzeppelin/ui-
|
|
1909
|
+
import { Button as Button4 } from "@openzeppelin/ui-components";
|
|
1910
|
+
import { cn as cn4, logger as logger8 } from "@openzeppelin/ui-utils";
|
|
1915
1911
|
|
|
1916
1912
|
// src/wallet/components/connect/ConnectButton.tsx
|
|
1917
1913
|
import { Loader2, Wallet } from "lucide-react";
|
|
1918
1914
|
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
1919
|
-
import {
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
} from "@openzeppelin/ui-builder-react-core";
|
|
1923
|
-
import { Button as Button2 } from "@openzeppelin/ui-builder-ui";
|
|
1924
|
-
import { cn } from "@openzeppelin/ui-builder-utils";
|
|
1915
|
+
import { Button as Button2 } from "@openzeppelin/ui-components";
|
|
1916
|
+
import { useDerivedAccountStatus as useDerivedAccountStatus2, useDerivedConnectStatus as useDerivedConnectStatus2 } from "@openzeppelin/ui-react";
|
|
1917
|
+
import { cn } from "@openzeppelin/ui-utils";
|
|
1925
1918
|
|
|
1926
1919
|
// src/wallet/utils/SafeWagmiComponent.tsx
|
|
1927
1920
|
import { useEffect, useState } from "react";
|
|
1928
|
-
import { logger as logger6 } from "@openzeppelin/ui-
|
|
1921
|
+
import { logger as logger6 } from "@openzeppelin/ui-utils";
|
|
1929
1922
|
|
|
1930
1923
|
// src/wallet/hooks/useIsWagmiProviderInitialized.ts
|
|
1931
1924
|
import { useContext } from "react";
|
|
@@ -1980,10 +1973,6 @@ var SafeWagmiComponent = ({
|
|
|
1980
1973
|
|
|
1981
1974
|
// src/wallet/components/connect/ConnectorDialog.tsx
|
|
1982
1975
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
1983
|
-
import {
|
|
1984
|
-
useDerivedAccountStatus,
|
|
1985
|
-
useDerivedConnectStatus
|
|
1986
|
-
} from "@openzeppelin/ui-builder-react-core";
|
|
1987
1976
|
import {
|
|
1988
1977
|
Button,
|
|
1989
1978
|
Dialog,
|
|
@@ -1991,10 +1980,11 @@ import {
|
|
|
1991
1980
|
DialogDescription,
|
|
1992
1981
|
DialogHeader,
|
|
1993
1982
|
DialogTitle
|
|
1994
|
-
} from "@openzeppelin/ui-
|
|
1983
|
+
} from "@openzeppelin/ui-components";
|
|
1984
|
+
import { useDerivedAccountStatus, useDerivedConnectStatus } from "@openzeppelin/ui-react";
|
|
1995
1985
|
|
|
1996
1986
|
// src/wallet/hooks/useUiKitConfig.ts
|
|
1997
|
-
import { appConfigService as appConfigService4, logger as logger7 } from "@openzeppelin/ui-
|
|
1987
|
+
import { appConfigService as appConfigService4, logger as logger7 } from "@openzeppelin/ui-utils";
|
|
1998
1988
|
var defaultConfig = {
|
|
1999
1989
|
kitName: "custom",
|
|
2000
1990
|
// Default to using our custom implementation for EVM
|
|
@@ -2181,9 +2171,9 @@ var ConnectButtonContent = ({ className, dialogOpen, setDialogOpen, hideWhenConn
|
|
|
2181
2171
|
|
|
2182
2172
|
// src/wallet/components/account/AccountDisplay.tsx
|
|
2183
2173
|
import { LogOut } from "lucide-react";
|
|
2184
|
-
import {
|
|
2185
|
-
import {
|
|
2186
|
-
import { cn as cn2, truncateMiddle } from "@openzeppelin/ui-
|
|
2174
|
+
import { Button as Button3 } from "@openzeppelin/ui-components";
|
|
2175
|
+
import { useDerivedAccountStatus as useDerivedAccountStatus3, useDerivedDisconnect } from "@openzeppelin/ui-react";
|
|
2176
|
+
import { cn as cn2, truncateMiddle } from "@openzeppelin/ui-utils";
|
|
2187
2177
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
2188
2178
|
var CustomAccountDisplay = ({ className }) => {
|
|
2189
2179
|
return /* @__PURE__ */ jsx4(SafeWagmiComponent, { fallback: null, children: /* @__PURE__ */ jsx4(AccountDisplayContent, { className }) });
|
|
@@ -2215,19 +2205,19 @@ var AccountDisplayContent = ({ className }) => {
|
|
|
2215
2205
|
|
|
2216
2206
|
// src/wallet/components/network/NetworkSwitcher.tsx
|
|
2217
2207
|
import { Loader2 as Loader22 } from "lucide-react";
|
|
2218
|
-
import {
|
|
2219
|
-
useDerivedAccountStatus as useDerivedAccountStatus4,
|
|
2220
|
-
useDerivedChainInfo,
|
|
2221
|
-
useDerivedSwitchChainStatus
|
|
2222
|
-
} from "@openzeppelin/ui-builder-react-core";
|
|
2223
2208
|
import {
|
|
2224
2209
|
Select,
|
|
2225
2210
|
SelectContent,
|
|
2226
2211
|
SelectItem,
|
|
2227
2212
|
SelectTrigger,
|
|
2228
2213
|
SelectValue
|
|
2229
|
-
} from "@openzeppelin/ui-
|
|
2230
|
-
import {
|
|
2214
|
+
} from "@openzeppelin/ui-components";
|
|
2215
|
+
import {
|
|
2216
|
+
useDerivedAccountStatus as useDerivedAccountStatus4,
|
|
2217
|
+
useDerivedChainInfo,
|
|
2218
|
+
useDerivedSwitchChainStatus
|
|
2219
|
+
} from "@openzeppelin/ui-react";
|
|
2220
|
+
import { cn as cn3 } from "@openzeppelin/ui-utils";
|
|
2231
2221
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2232
2222
|
var CustomNetworkSwitcher = ({ className }) => {
|
|
2233
2223
|
return /* @__PURE__ */ jsx5(SafeWagmiComponent, { fallback: null, children: /* @__PURE__ */ jsx5(NetworkSwitcherContent, { className }) });
|
|
@@ -2386,7 +2376,7 @@ var RainbowKitConnectButton = (props) => {
|
|
|
2386
2376
|
};
|
|
2387
2377
|
|
|
2388
2378
|
// src/wallet/rainbowkit/utils.ts
|
|
2389
|
-
import { logger as logger9 } from "@openzeppelin/ui-
|
|
2379
|
+
import { logger as logger9 } from "@openzeppelin/ui-utils";
|
|
2390
2380
|
function validateRainbowKitConfig(kitConfig) {
|
|
2391
2381
|
logger9.debug(
|
|
2392
2382
|
"validateRainbowKitConfig",
|
|
@@ -2437,7 +2427,7 @@ function createRainbowKitComponents() {
|
|
|
2437
2427
|
|
|
2438
2428
|
// src/wallet/rainbowkit/config-service.ts
|
|
2439
2429
|
import { http } from "@wagmi/core";
|
|
2440
|
-
import { logger as logger10 } from "@openzeppelin/ui-
|
|
2430
|
+
import { logger as logger10 } from "@openzeppelin/ui-utils";
|
|
2441
2431
|
async function createRainbowKitWagmiConfig(userFullNativeConfig, chains, chainIdToNetworkIdMap, getRpcEndpointOverride) {
|
|
2442
2432
|
try {
|
|
2443
2433
|
const { getDefaultConfig } = await import("@rainbow-me/rainbowkit");
|
|
@@ -2598,7 +2588,7 @@ var WagmiWalletImplementation = class {
|
|
|
2598
2588
|
* when user changes RPC settings.
|
|
2599
2589
|
*/
|
|
2600
2590
|
setupRpcConfigListener() {
|
|
2601
|
-
import("@openzeppelin/ui-
|
|
2591
|
+
import("@openzeppelin/ui-utils").then(({ userRpcConfigService }) => {
|
|
2602
2592
|
this.rpcConfigUnsubscribe = userRpcConfigService.subscribe("*", (event) => {
|
|
2603
2593
|
if (event.type === "rpc-config-changed" || event.type === "rpc-config-cleared") {
|
|
2604
2594
|
logger11.info(
|
|
@@ -3315,17 +3305,17 @@ function generateRainbowKitExportables(uiKitConfig2) {
|
|
|
3315
3305
|
}
|
|
3316
3306
|
|
|
3317
3307
|
// src/wallet/services/configResolutionService.ts
|
|
3318
|
-
import { logger as logger19 } from "@openzeppelin/ui-
|
|
3308
|
+
import { logger as logger19 } from "@openzeppelin/ui-utils";
|
|
3319
3309
|
|
|
3320
3310
|
// src/wallet/utils.ts
|
|
3321
|
-
import { logger as logger18 } from "@openzeppelin/ui-
|
|
3311
|
+
import { logger as logger18 } from "@openzeppelin/ui-utils";
|
|
3322
3312
|
|
|
3323
3313
|
// src/wallet/utils/uiKitService.ts
|
|
3324
|
-
import { logger as logger17 } from "@openzeppelin/ui-
|
|
3314
|
+
import { logger as logger17 } from "@openzeppelin/ui-utils";
|
|
3325
3315
|
|
|
3326
3316
|
// src/wallet/utils/filterWalletComponents.ts
|
|
3327
|
-
import { ECOSYSTEM_WALLET_COMPONENT_KEYS } from "@openzeppelin/ui-
|
|
3328
|
-
import { logger as logger16 } from "@openzeppelin/ui-
|
|
3317
|
+
import { ECOSYSTEM_WALLET_COMPONENT_KEYS } from "@openzeppelin/ui-types";
|
|
3318
|
+
import { logger as logger16 } from "@openzeppelin/ui-utils";
|
|
3329
3319
|
function filterWalletComponents(allPossibleComponents, exclusions, kitName = "custom") {
|
|
3330
3320
|
logger16.debug(
|
|
3331
3321
|
"filterWalletComponents",
|
|
@@ -3504,7 +3494,7 @@ async function resolveFullUiKitConfiguration(programmaticOverrides, initialAppSe
|
|
|
3504
3494
|
}
|
|
3505
3495
|
|
|
3506
3496
|
// src/abi/etherscan.ts
|
|
3507
|
-
import { logger as logger20 } from "@openzeppelin/ui-
|
|
3497
|
+
import { logger as logger20 } from "@openzeppelin/ui-utils";
|
|
3508
3498
|
async function loadAbiFromEtherscan(address, networkConfig) {
|
|
3509
3499
|
if (shouldUseV2Api(networkConfig)) {
|
|
3510
3500
|
logger20.info("loadAbiFromEtherscan", "Using V2 API for fetching ABI");
|
|
@@ -3606,17 +3596,17 @@ import {
|
|
|
3606
3596
|
simpleHash as simpleHash2,
|
|
3607
3597
|
userNetworkServiceConfigService as userNetworkServiceConfigService4,
|
|
3608
3598
|
withTimeout
|
|
3609
|
-
} from "@openzeppelin/ui-
|
|
3599
|
+
} from "@openzeppelin/ui-utils";
|
|
3610
3600
|
|
|
3611
3601
|
// src/proxy/detection.ts
|
|
3612
3602
|
import { createPublicClient, http as http4, keccak256, parseAbi, toHex } from "viem";
|
|
3613
|
-
import { logger as logger23 } from "@openzeppelin/ui-
|
|
3603
|
+
import { logger as logger23 } from "@openzeppelin/ui-utils";
|
|
3614
3604
|
|
|
3615
3605
|
// src/configuration/execution.ts
|
|
3616
|
-
import { logger as logger22 } from "@openzeppelin/ui-
|
|
3606
|
+
import { logger as logger22 } from "@openzeppelin/ui-utils";
|
|
3617
3607
|
|
|
3618
3608
|
// src/validation/eoa.ts
|
|
3619
|
-
import { logger as logger21 } from "@openzeppelin/ui-
|
|
3609
|
+
import { logger as logger21 } from "@openzeppelin/ui-utils";
|
|
3620
3610
|
var SYSTEM_LOG_TAG = "EoaValidator";
|
|
3621
3611
|
async function validateEoaConfig(config, walletStatus) {
|
|
3622
3612
|
if (!config.allowAny) {
|
|
@@ -3969,7 +3959,7 @@ async function getContractBytecode(address, networkConfig) {
|
|
|
3969
3959
|
}
|
|
3970
3960
|
|
|
3971
3961
|
// src/abi/sourcify.ts
|
|
3972
|
-
import { logger as logger24 } from "@openzeppelin/ui-
|
|
3962
|
+
import { logger as logger24 } from "@openzeppelin/ui-utils";
|
|
3973
3963
|
var SOURCIFY_APP_BASE = "https://repo.sourcify.dev";
|
|
3974
3964
|
function getSourcifyContractAppUrl(chainId, address) {
|
|
3975
3965
|
return `${SOURCIFY_APP_BASE}/${chainId}/${address}`;
|
|
@@ -4274,6 +4264,23 @@ var EVM_TYPE_TO_FIELD_TYPE = {
|
|
|
4274
4264
|
bytes: "textarea",
|
|
4275
4265
|
bytes32: "text"
|
|
4276
4266
|
};
|
|
4267
|
+
var EVM_DYNAMIC_PATTERNS = [
|
|
4268
|
+
{ name: "array", syntax: "T[]", mapsTo: "array", description: "Dynamic array of primitives" },
|
|
4269
|
+
{ name: "fixed-array", syntax: "T[N]", mapsTo: "array", description: "Fixed-size array" },
|
|
4270
|
+
{
|
|
4271
|
+
name: "tuple-array",
|
|
4272
|
+
syntax: "tuple[]",
|
|
4273
|
+
mapsTo: "array-object",
|
|
4274
|
+
description: "Array of structs"
|
|
4275
|
+
},
|
|
4276
|
+
{ name: "tuple", syntax: "tuple", mapsTo: "object", description: "Struct/tuple type" }
|
|
4277
|
+
];
|
|
4278
|
+
function getEvmTypeMappingInfo() {
|
|
4279
|
+
return {
|
|
4280
|
+
primitives: { ...EVM_TYPE_TO_FIELD_TYPE },
|
|
4281
|
+
dynamicPatterns: EVM_DYNAMIC_PATTERNS
|
|
4282
|
+
};
|
|
4283
|
+
}
|
|
4277
4284
|
|
|
4278
4285
|
// src/mapping/type-mapper.ts
|
|
4279
4286
|
function mapEvmParamTypeToFieldType(parameterType) {
|
|
@@ -4329,7 +4336,7 @@ import { startCase } from "lodash";
|
|
|
4329
4336
|
import {
|
|
4330
4337
|
enhanceNumericValidation,
|
|
4331
4338
|
getDefaultValueForType
|
|
4332
|
-
} from "@openzeppelin/ui-
|
|
4339
|
+
} from "@openzeppelin/ui-utils";
|
|
4333
4340
|
function extractArrayElementType(parameterType) {
|
|
4334
4341
|
const arrayMatch = parameterType.match(/^(.+)\[\d*\]$/);
|
|
4335
4342
|
if (arrayMatch) {
|
|
@@ -4405,11 +4412,11 @@ function isEvmViewFunction(functionDetails) {
|
|
|
4405
4412
|
|
|
4406
4413
|
// src/query/handler.ts
|
|
4407
4414
|
import { createPublicClient as createPublicClient2, http as http5, isAddress as isAddress4 } from "viem";
|
|
4408
|
-
import { logger as logger28 } from "@openzeppelin/ui-
|
|
4415
|
+
import { logger as logger28 } from "@openzeppelin/ui-utils";
|
|
4409
4416
|
|
|
4410
4417
|
// src/transform/input-parser.ts
|
|
4411
4418
|
import { getAddress, isAddress as isAddress3 } from "viem";
|
|
4412
|
-
import { logger as logger26 } from "@openzeppelin/ui-
|
|
4419
|
+
import { logger as logger26 } from "@openzeppelin/ui-utils";
|
|
4413
4420
|
function parseEvmInput(param, rawValue, isRecursive = false) {
|
|
4414
4421
|
const { type, name } = param;
|
|
4415
4422
|
const baseType = type.replace(/\[\d*\]$/, "");
|
|
@@ -4540,7 +4547,7 @@ function parseEvmInput(param, rawValue, isRecursive = false) {
|
|
|
4540
4547
|
}
|
|
4541
4548
|
|
|
4542
4549
|
// src/transform/output-formatter.ts
|
|
4543
|
-
import { logger as logger27 } from "@openzeppelin/ui-
|
|
4550
|
+
import { logger as logger27 } from "@openzeppelin/ui-utils";
|
|
4544
4551
|
function formatEvmFunctionResult(decodedValue, functionDetails) {
|
|
4545
4552
|
if (!functionDetails.outputs || !Array.isArray(functionDetails.outputs)) {
|
|
4546
4553
|
logger27.warn(
|
|
@@ -4733,7 +4740,7 @@ import {
|
|
|
4733
4740
|
Configuration,
|
|
4734
4741
|
RelayersApi
|
|
4735
4742
|
} from "@openzeppelin/relayer-sdk";
|
|
4736
|
-
import { logger as logger29 } from "@openzeppelin/ui-
|
|
4743
|
+
import { logger as logger29 } from "@openzeppelin/ui-utils";
|
|
4737
4744
|
var RelayerExecutionStrategy = class {
|
|
4738
4745
|
async execute(transactionData, executionConfig, _walletImplementation, onStatusChange, runtimeApiKey) {
|
|
4739
4746
|
const relayerConfig = executionConfig;
|
|
@@ -4986,7 +4993,7 @@ var RelayerExecutionStrategy = class {
|
|
|
4986
4993
|
};
|
|
4987
4994
|
|
|
4988
4995
|
// src/transaction/sender.ts
|
|
4989
|
-
import { logger as logger30 } from "@openzeppelin/ui-
|
|
4996
|
+
import { logger as logger30 } from "@openzeppelin/ui-utils";
|
|
4990
4997
|
var SYSTEM_LOG_TAG3 = "adapter-evm-sender";
|
|
4991
4998
|
async function waitForEvmTransactionConfirmation(txHash, walletImplementation) {
|
|
4992
4999
|
logger30.info(SYSTEM_LOG_TAG3, `Waiting for tx: ${txHash}`);
|
|
@@ -5016,7 +5023,7 @@ async function waitForEvmTransactionConfirmation(txHash, walletImplementation) {
|
|
|
5016
5023
|
|
|
5017
5024
|
// src/transaction/formatter.ts
|
|
5018
5025
|
import { isAddress as isAddress5 } from "viem";
|
|
5019
|
-
import { logger as logger31 } from "@openzeppelin/ui-
|
|
5026
|
+
import { logger as logger31 } from "@openzeppelin/ui-utils";
|
|
5020
5027
|
function formatEvmTransactionData(contractSchema, functionId, submittedInputs, fields) {
|
|
5021
5028
|
logger31.info(
|
|
5022
5029
|
"formatEvmTransactionData",
|
|
@@ -5077,7 +5084,7 @@ function formatEvmTransactionData(contractSchema, functionId, submittedInputs, f
|
|
|
5077
5084
|
}
|
|
5078
5085
|
|
|
5079
5086
|
// src/transaction/eoa.ts
|
|
5080
|
-
import { logger as logger32 } from "@openzeppelin/ui-
|
|
5087
|
+
import { logger as logger32 } from "@openzeppelin/ui-utils";
|
|
5081
5088
|
var SYSTEM_LOG_TAG4 = "EoaExecutionStrategy";
|
|
5082
5089
|
var EoaExecutionStrategy = class {
|
|
5083
5090
|
async execute(transactionData, executionConfig, walletImplementation, onStatusChange, _runtimeApiKey) {
|
|
@@ -5136,11 +5143,11 @@ var EoaExecutionStrategy = class {
|
|
|
5136
5143
|
|
|
5137
5144
|
// src/transaction/components/EvmRelayerOptions.tsx
|
|
5138
5145
|
import React6 from "react";
|
|
5139
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@openzeppelin/ui-
|
|
5146
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@openzeppelin/ui-components";
|
|
5140
5147
|
|
|
5141
5148
|
// src/transaction/components/AdvancedInfo.tsx
|
|
5142
5149
|
import { Info } from "lucide-react";
|
|
5143
|
-
import { Button as Button5 } from "@openzeppelin/ui-
|
|
5150
|
+
import { Button as Button5 } from "@openzeppelin/ui-components";
|
|
5144
5151
|
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
5145
5152
|
var AdvancedInfo = ({ showAdvancedInfo, onToggle }) => {
|
|
5146
5153
|
return /* @__PURE__ */ jsxs7("div", { className: "space-y-2", children: [
|
|
@@ -5172,8 +5179,8 @@ import {
|
|
|
5172
5179
|
AccordionTrigger,
|
|
5173
5180
|
BooleanField,
|
|
5174
5181
|
NumberField
|
|
5175
|
-
} from "@openzeppelin/ui-
|
|
5176
|
-
import { cn as cn5 } from "@openzeppelin/ui-
|
|
5182
|
+
} from "@openzeppelin/ui-components";
|
|
5183
|
+
import { cn as cn5 } from "@openzeppelin/ui-utils";
|
|
5177
5184
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5178
5185
|
var CustomGasParameters = ({
|
|
5179
5186
|
control,
|
|
@@ -5334,7 +5341,7 @@ var CustomGasParameters = ({
|
|
|
5334
5341
|
|
|
5335
5342
|
// src/transaction/components/SpeedSelection.tsx
|
|
5336
5343
|
import { Speed as Speed2 } from "@openzeppelin/relayer-sdk";
|
|
5337
|
-
import { RadioGroup, RadioGroupItem } from "@openzeppelin/ui-
|
|
5344
|
+
import { RadioGroup, RadioGroupItem } from "@openzeppelin/ui-components";
|
|
5338
5345
|
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5339
5346
|
var speedOptions = [
|
|
5340
5347
|
{
|
|
@@ -5559,7 +5566,7 @@ var EvmRelayerOptions = ({ options, onChange }) => {
|
|
|
5559
5566
|
};
|
|
5560
5567
|
|
|
5561
5568
|
// src/wallet/utils/connection.ts
|
|
5562
|
-
import { logger as logger33 } from "@openzeppelin/ui-
|
|
5569
|
+
import { logger as logger33 } from "@openzeppelin/ui-utils";
|
|
5563
5570
|
var LOG_SYSTEM3 = "adapter-evm-connection";
|
|
5564
5571
|
function evmSupportsWalletConnection() {
|
|
5565
5572
|
return true;
|
|
@@ -6166,6 +6173,12 @@ Get your WalletConnect projectId from <a href="https://cloud.walletconnect.com"
|
|
|
6166
6173
|
hashContractDefinition(definition) {
|
|
6167
6174
|
return abiComparisonService.hashAbi(definition);
|
|
6168
6175
|
}
|
|
6176
|
+
/**
|
|
6177
|
+
* @inheritdoc
|
|
6178
|
+
*/
|
|
6179
|
+
getTypeMappingInfo() {
|
|
6180
|
+
return getEvmTypeMappingInfo();
|
|
6181
|
+
}
|
|
6169
6182
|
};
|
|
6170
6183
|
|
|
6171
6184
|
// src/config.ts
|