@1llet.xyz/erc4337-gasless-sdk 0.4.10 → 0.4.12
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/index.js +33 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createPublicClient, http, createWalletClient, decodeErrorResult, parseSignature, maxUint256, encodeFunctionData, encodeAbiParameters, keccak256, padHex } from 'viem';
|
|
2
2
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
3
|
-
import { gnosis, baseSepolia, base, avalanche, worldchain, monad, bsc, polygon, unichain, arbitrum
|
|
3
|
+
import { optimism, gnosis, baseSepolia, base, avalanche, worldchain, monad, bsc, polygon, unichain, arbitrum } from 'viem/chains';
|
|
4
4
|
import axios from 'axios';
|
|
5
5
|
import { Networks } from 'stellar-sdk';
|
|
6
6
|
import { OpenAPI, QuoteRequest, OneClickService } from '@defuse-protocol/one-click-sdk-typescript';
|
|
@@ -713,6 +713,37 @@ var BASE_MAINNET = {
|
|
|
713
713
|
}
|
|
714
714
|
]
|
|
715
715
|
};
|
|
716
|
+
var OPTIMISM_MAINNET = {
|
|
717
|
+
chain: optimism,
|
|
718
|
+
bundlerUrl: `${BUNDLER_URL}/rpc?chain=optimism`,
|
|
719
|
+
// Dynamic Bundler URL
|
|
720
|
+
// Addresses
|
|
721
|
+
entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
|
|
722
|
+
factoryAddress: "0x3CE963866d3Be7Fe4354DBe892Aab52a0a18aeb2",
|
|
723
|
+
paymasterAddress: "0x0dB771d11F84E8541AA651363DF14E4401d01216",
|
|
724
|
+
tokens: [
|
|
725
|
+
{
|
|
726
|
+
symbol: "USDC",
|
|
727
|
+
decimals: 6,
|
|
728
|
+
address: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
symbol: "USDT",
|
|
732
|
+
decimals: 6,
|
|
733
|
+
address: "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
symbol: "OP",
|
|
737
|
+
decimals: 18,
|
|
738
|
+
address: "0x4200000000000000000000000000000000000042"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
symbol: "ETH",
|
|
742
|
+
decimals: 18,
|
|
743
|
+
address: "0x0000000000000000000000000000000000000000"
|
|
744
|
+
}
|
|
745
|
+
]
|
|
746
|
+
};
|
|
716
747
|
var GNOSIS_MAINNET = {
|
|
717
748
|
chain: gnosis,
|
|
718
749
|
bundlerUrl: `${BUNDLER_URL}/rpc?chain=gnosis`,
|
|
@@ -778,7 +809,8 @@ var BASE_SEPOLIA = {
|
|
|
778
809
|
var CHAIN_CONFIGS = {
|
|
779
810
|
[base.id]: BASE_MAINNET,
|
|
780
811
|
[baseSepolia.id]: BASE_SEPOLIA,
|
|
781
|
-
[gnosis.id]: GNOSIS_MAINNET
|
|
812
|
+
[gnosis.id]: GNOSIS_MAINNET,
|
|
813
|
+
[optimism.id]: OPTIMISM_MAINNET
|
|
782
814
|
};
|
|
783
815
|
|
|
784
816
|
// src/constants/facilitator.ts
|
|
@@ -1936,7 +1968,6 @@ var NearStrategy = class {
|
|
|
1936
1968
|
}
|
|
1937
1969
|
canHandle(context) {
|
|
1938
1970
|
const { sourceChain, destChain } = context;
|
|
1939
|
-
if (sourceChain === destChain) return false;
|
|
1940
1971
|
const sourceConfig = NETWORKS[sourceChain];
|
|
1941
1972
|
const destConfig = NETWORKS[destChain];
|
|
1942
1973
|
if (!sourceConfig || !destConfig) return false;
|