Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate from ethers to viem #46

Merged
merged 15 commits into from
Nov 29, 2024
Merged

migrate from ethers to viem #46

merged 15 commits into from
Nov 29, 2024

Conversation

kanthgithub
Copy link
Contributor

@kanthgithub kanthgithub commented Nov 13, 2024

Migrate etherspot-modular-sdk from ethers to viem

Description

  • viem dependency added to package.json
  • ModularSDK, EtherSpotWalletAPI and dependant typescript classes are refactored to
    • use viem account, PublicClient, WalletClient
    • remove references and injection of privateKey to SDK initialisation
    • create custom types for BigNumber, UserOpsStructs
    • remove typechain references of the etherspot-module-contracts
    • add ABI constants for all functions of modular-contracts being used in SDK

Manual Testing

Test Strategy:
Key functions of the Modular Smartcontracts:

  1. getCounterFactualAddress
  2. install module
  3. list modules
  4. uninstall modules
  5. native and erc20 transfer via UserOps to a recipient
  6. Smart Wallet creation for a new EOA account

Example scripts in the directory: are used to test above set of scenarios
The SDK function path will cove most of the migrated set of functions while testing above list of scenarios

Test Networks

Scenarios are tested on Sepolia and Amoy

Test Proofs

get Counterfactual Address

➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/basics/get-counterfactual-address.ts
Creating Modular SDK instance with chainId: 11155111
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6

get Gas Fees

➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/basics/get-gas-fees.ts
Creating Modular SDK instance with  chainId: 11155111
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
gasFees is: {"maxFeePerGas":"0x65e9284f8","maxPriorityFeePerGas":"0x59682f00"}

get Nonce

➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/basics/get-nonce.ts
Creating Modular SDK instance with privateKey: 0x204fad794a5cf55246d109e80a52193a3bcfc46fea9d0f7285192702351ca35a chainId: 11155111
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
nonce is: 63444984684045084841432712757840239866553663653566892880549259113021522837504

Transfer ERC20

➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/basics/transfer-erc20.ts
Creating Modular SDK instance with chainId: 11155111
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
transactions:  {
  to: [ '0x493f198225647DB41FB966ddCd5f63E8EE1012d3' ],
  data: [
    '0xa9059cbb00000000000000000000000080a1874e1046b1cc5defdf4d3153838b72ff94ac00000000000000000000000000000000000000000000000000000000000186a0'
  ],
  value: [ BigNumber { _hex: '0x00', _isBigNumber: true } ]
}
Estimate UserOp: {
  "sender": "0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6",
  "nonce": "0x8c4496ba340afe5ac4148cfea9ccbbcd54093143000000000000000000000001",
  "factoryData": "0x",
  "callData": "0xe9ae5c53010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000493f198225647db41fb966ddcd5f63e8ee1012d3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb00000000000000000000000080a1874e1046b1cc5defdf4d3153838b72ff94ac00000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000",
  "callGasLimit": "0x",
  "verificationGasLimit": "0x",
  "maxFeePerGas": "0x81f3d1c7a",
  "maxPriorityFeePerGas": "0x59682f00",
  "paymasterData": "0x",
  "preVerificationGas": "0x",
  "signature": "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"
}
UserOpHash: 0xd6f7b9b0d239d979a45c46df718b376ce361b8327b574bc48a0a644407eb9578
Waiting for transaction...
Transaction Receipt:  0x77f39bc1420d8204c8b80f98967d48e9e6a43d8dbf3a0e5f39607ebdbcf66961
➜  etherspot-modular-sdk git:(feature/viem) ✗ 

Transfer Funds

➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/basics/transfer-funds.ts
Creating Modular SDK instance with chainId: 11155111
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
transactions:  {
  to: [ '0x80a1874E1046B1cc5deFdf4D3153838B72fF94Ac' ],
  data: [ '0x' ],
  value: [ 100000000000n ]
}
balances:  0.1
Estimate UserOp: {
  "sender": "0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6",
  "nonce": "0x8c4496ba340afe5ac4148cfea9ccbbcd54093143000000000000000000000000",
  "factory": "0x93FB56A4a0B7160fbf8903d251Cc7A3fb9bA0933",
  "factoryData": "0xf8a593700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000004e00000000000000000000000001f019cb44b3ee21ad5dea1e895c803986c4319c00000000000000000000000001bacb2f1ef4fd02f02e32ccf70888d9caeb5f06600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000444642219af0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000008c4496ba340afe5ac4148cfea9ccbbcd54093143000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000446d61fe700000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000446d61fe7000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000446d61fe700000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000446d61fe70000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "callData": "0xe9ae5c530100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000080a1874e1046b1cc5defdf4d3153838b72ff94ac000000000000000000000000000000000000000000000000000000174876e80000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
  "callGasLimit": "0x",
  "verificationGasLimit": "0x",
  "maxFeePerGas": "0x6fa246372",
  "maxPriorityFeePerGas": "0x59682f00",
  "paymasterData": "0x",
  "preVerificationGas": "0x",
  "signature": "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"
}
UserOpHash: 0xbc04caac25533b59c4553495de19497897dc2fedfbb24d0b3b9a32e36ec31330
Waiting for transaction...
Transaction Receipt:  0x74760dedbf7208b58ae3fbea518bf8c80ad47b382c102d3ba6424e9aa684a391

List Modules

➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/modules/list-modules.ts
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
moduleInfo: {"validators":["0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143"],"executors":[],"hook":"0x0000000000000000000000000000000000000000","fallbacks":[]}

Install Module

  • List of Modules printed in console before installation of 0x22A55192a663591586241D42E603221eac49ed09
➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/modules/list-modules.ts
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
moduleInfo: {"validators":["0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143"],"executors":[],"hook":"0x0000000000000000000000000000000000000000","fallbacks":[]}
  • module installed is 0x22A55192a663591586241D42E603221eac49ed09
➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/modules/install-module.ts
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
UserOpHash: 0x7c7da099ebe0ffaba17c56afb2dbe332e7ae30eb8c35cc066bd2a095dd3cf20a
Waiting for transaction...
Transaction Receipt:  0x7483829568ff63ab6a47699a2293f3bc75efbf094a050a8bf0bc99998880585b
  • List of Modules printed in console after installation of 0x22A55192a663591586241D42E603221eac49ed09
➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/modules/list-modules.ts  
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
moduleInfo: {"validators":["0x22A55192a663591586241D42E603221eac49ed09","0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143"],"executors":[],"hook":"0x0000000000000000000000000000000000000000","fallbacks":[]}
  • module installed is 0xF4CDE8B11500ca9Ea108c5838DD26Ff1a4257a0c
➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/modules/install-module.ts
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
UserOpHash: 0x03d08d21819df19e98366b75926a4a548685f244a7f007eebd6323353ced6ed7
Waiting for transaction...
Transaction Receipt:  0xe81bfab6183a8365fdd5c50a6da45c96f72fc60869fd1b8d6530a22eeac5388f
  • List of Modules printed in console after installation of 0xF4CDE8B11500ca9Ea108c5838DD26Ff1a4257a0c
➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/modules/list-modules.ts  
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
moduleInfo: {"validators":["0xF4CDE8B11500ca9Ea108c5838DD26Ff1a4257a0c","0x22A55192a663591586241D42E603221eac49ed09","0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143"],"executors":[],"hook":"0x0000000000000000000000000000000000000000","fallbacks":[]}

Uninstall Module

  • List of Modules printed in console before Uninstallation of 0xF4CDE8B11500ca9Ea108c5838DD26Ff1a4257a0c
  • module removed is 0xF4CDE8B11500ca9Ea108c5838DD26Ff1a4257a0c
  • List of Modules printed in console after Uninstallation of 0xF4CDE8B11500ca9Ea108c5838DD26Ff1a4257a0c
➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/modules/list-modules.ts  
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
moduleInfo: {"validators":["0xF4CDE8B11500ca9Ea108c5838DD26Ff1a4257a0c","0x22A55192a663591586241D42E603221eac49ed09","0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143"],"executors":[],"hook":"0x0000000000000000000000000000000000000000","fallbacks":[]}

➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/modules/uninstall-module.ts
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
deinitData: 0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000
UserOpHash: 0x4eaa1f7eaf500a83f3982dd3cb8a47d5337fde747ca6ee39fc5063167f213d9b
Waiting for transaction...
Transaction Receipt:  0x761dfb27df4611f58145ef4b93bd9ae96db8d528b8f682da558ed6bf11a21c16

➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/modules/list-modules.ts    
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
moduleInfo: {"validators":["0x22A55192a663591586241D42E603221eac49ed09","0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143"],"executors":[],"hook":"0x0000000000000000000000000000000000000000","fallbacks":[]}

Enable SessionKey

  • Enable SessionKey on Installed ERC20SessionKeyValidator
➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/sessionkeys/enable-sessionkey-module.ts
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
UserOpHash:  0x5c9ef38e164d333429b46b346692c63592f84856cc47fae70bebb5144247d7d8
SessionKey:  0x0962348CD9208389679E0b70b55EDbd4411E81A0
Waiting for transaction...
Transaction Receipt:  0xa5397205f3f943fa9353e7701f4a81abe807419c50d118b1b3ff9688ceb3996a
AssociatedSessionKeys:  [ '0x0962348CD9208389679E0b70b55EDbd4411E81A0' ]

Rotate SessionKey

  • Rotating the SessionKey created in previous step of enableSessionKey
➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/sessionkeys/rotate-sessionkey-module.ts
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
UserOpHash:  0xb0ac84360545aca2725315970a23c940329501af5d99c2b78f5e4258e0a517ee
SessionKey:  0xd602420c70D0a8069B3eb2aD18c85C6e6A59731A
Waiting for transaction...
Transaction Receipt:  0xf121d1e34cde28988641fe7a34798853bef335126bb618af4b97877c8d8b651d
AssociatedSessionKeys:  [ '0xd602420c70D0a8069B3eb2aD18c85C6e6A59731A' ]
  • List of associated Sessionkeys after rotation of existing sessionKey
➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/sessionkeys/get-associated-session-keys.ts
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
AssociatedSessionKeys:  [ '0xd602420c70D0a8069B3eb2aD18c85C6e6A59731A' ]

Disable SessionKey

  • Disabled SessionKey: 0xd602420c70D0a8069B3eb2aD18c85C6e6A59731A
➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/sessionkeys/disable-sessionkey-module.ts
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
UserOpHash:  0xaa9c45bdb8be24ded3bf357bca5cb97656653c0af033920ee1e9150bb1638a0d
SessionKey:  0xd602420c70D0a8069B3eb2aD18c85C6e6A59731A
Waiting for transaction...
Transaction Receipt:  0x40195d522f4dc54f9c6bd2582c6ef4ebc79cd3f36d6846d48723dc327eaa5541
AssociatedSessionKeys:  []

Enable new SessionKey

➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/sessionkeys/enable-sessionkey-module.ts
Modular SDK instance created with address: 0x1f019cb44b3ee21AD5DeA1E895C803986C4319C0
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
UserOpHash:  0x50d654ca6b6aac55e662251e6a7c0f4157a245b64c65efc8037b2435138a8ba6
SessionKey:  0x5e11c3ac870Ed4bAF61E26976692Fa7661fF3fEa
Waiting for transaction...
Transaction Receipt:  0x6fa95a8c80cac738da12c790ef808d82fb8713855e476c8b7fe670be86e02a93
AssociatedSessionKeys:  [ '0x5e11c3ac870Ed4bAF61E26976692Fa7661fF3fEa' ]

Transfer ERC20 tokens Vai SessionKey

➜  etherspot-modular-sdk git:(feature/viem) ✗ tsx examples/sessionkeys/transfer-erc20-session-key.ts
sessionKey SDK initialized
EtherspotWallet address: 0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6
transactions:  {
  to: [ '0x493f198225647DB41FB966ddCd5f63E8EE1012d3' ],
  data: [
    '0xa9059cbb000000000000000000000000de79f0ef8a1268dad0df02a8e527819a3cd99d400000000000000000000000000000000000000000000000000000000000000001'
  ],
  value: [ BigNumber { _hex: '0x00', _isBigNumber: true } ]
}
erc20SessionKeyValidator 0x22A55192a663591586241D42E603221eac49ed09 as BigNumber is: 197792415163321831208326099012399626805989469449
Nonce: 15670729612648503866102855607894354141231806096137367614290888274976245284865
Estimate UserOp: {
  "sender": "0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6",
  "nonce": "0x22a55192a663591586241d42e603221eac49ed09000000000000000000000001",
  "factoryData": "0x",
  "callData": "0xe9ae5c53010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000493f198225647db41fb966ddcd5f63e8ee1012d3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000de79f0ef8a1268dad0df02a8e527819a3cd99d40000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000",
  "callGasLimit": "0x",
  "verificationGasLimit": "0x",
  "maxFeePerGas": "0x1fe091e3a",
  "maxPriorityFeePerGas": "0x59682f00",
  "paymasterData": "0x",
  "preVerificationGas": "0x",
  "signature": "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"
}
sessionKey: 0x5e11c3ac870Ed4bAF61E26976692Fa7661fF3fEa
etherspot-modular-sdk -> Signed UserOp: 0xcc61f87ab309ee9ac718e9b50de78c0fcb6cece4881fa276801e354c7efa7beb0b6bc7ee4f28fd9e3da6f147afd01a5606171718f00eda7982924bcb23b8508e1c
Signed UserOp: {
  "sender": "0xfCEc8BfEF89DF40764b69a6E73FC9b50DE17Cbf6",
  "nonce": "0x22a55192a663591586241d42e603221eac49ed09000000000000000000000001",
  "factoryData": "0x",
  "callData": "0xe9ae5c53010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000493f198225647db41fb966ddcd5f63e8ee1012d3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000de79f0ef8a1268dad0df02a8e527819a3cd99d40000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000",
  "callGasLimit": "0x146c7",
  "verificationGasLimit": "0xda47",
  "preVerificationGas": "0xcb90",
  "maxFeePerGas": "0x1fe091e3a",
  "maxPriorityFeePerGas": "0x59682f00",
  "paymasterData": "0x",
  "signature": "0xcc61f87ab309ee9ac718e9b50de78c0fcb6cece4881fa276801e354c7efa7beb0b6bc7ee4f28fd9e3da6f147afd01a5606171718f00eda7982924bcb23b8508e1c"
}
UserOpNonce is: 15670729612648503866102855607894354141231806096137367614290888274976245284865
UserOpHash from Signed UserOp: 0x5c9b42c5dec39e154ad4d5291d1b746a11d7a004e24f5bc0d8eef5c0c1da91fc
UserOpHash: 0x5c9b42c5dec39e154ad4d5291d1b746a11d7a004e24f5bc0d8eef5c0c1da91fc
Waiting for transaction...
Transaction Receipt:  0x32b64339541907c13cb103229ea21dcff88d82399a74f93b1e56c5844d72df88

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring
  • Build related changes

@kanthgithub kanthgithub changed the title feat: clear ethers version files migrate from ethers to viem Nov 14, 2024
src/sdk/base/BaseAccountAPI.ts Outdated Show resolved Hide resolved
src/sdk/base/BaseAccountAPI.ts Outdated Show resolved Hide resolved
src/sdk/common/abi/Factory.ts Outdated Show resolved Hide resolved
src/sdk/network/ViemChainConfig.ts Outdated Show resolved Hide resolved
src/sdk/network/constants.ts Show resolved Hide resolved
@0xSulpiride
Copy link
Member

Copy link
Member

@0xSulpiride 0xSulpiride left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ch4r10t33r ch4r10t33r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please amend bump the version number to 3.0.0 and then merge.

@kanthgithub kanthgithub merged commit 5f42253 into master Nov 29, 2024
2 of 3 checks passed
@kanthgithub kanthgithub deleted the feature/viem branch November 29, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants