Skip to content

Commit

Permalink
Merge branch 'main' into feat/update-vue-web3modal-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomas committed Jul 19, 2024
2 parents fd44b4e + 909c7e1 commit cfd10d7
Show file tree
Hide file tree
Showing 58 changed files with 19,371 additions and 1,556 deletions.
6 changes: 3 additions & 3 deletions advanced/dapps/react-dapp-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"@polkadot/util-crypto": "^10.1.2",
"@solana/web3.js": "^1.36.0",
"@walletconnect/encoding": "^1.0.1",
"@walletconnect/sign-client": "2.13.3",
"@walletconnect/types": "2.13.3",
"@walletconnect/utils": "2.13.3",
"@walletconnect/sign-client": "2.14.0",
"@walletconnect/types": "2.14.0",
"@walletconnect/utils": "2.14.0",
"@web3modal/standalone": "2.4.3",
"axios": "^1.0.0",
"blockies-ts": "^1.0.0",
Expand Down
44 changes: 22 additions & 22 deletions advanced/dapps/react-dapp-v2/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3693,10 +3693,10 @@
"@typescript-eslint/types" "5.59.7"
eslint-visitor-keys "^3.3.0"

"@walletconnect/core@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.3.tgz#d98fccefe36c6b365812fd0f7237a0f9634bafb6"
integrity sha512-TdF+rC6rONJGyOUtt/nLkbyQWjnkwbD3kXq3ZA0Q7+tYtmSjTDE4wbArlLbHIbtf69g+9/DpEVEQimWWcEOn2g==
"@walletconnect/core@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.14.0.tgz#e8afb01455968b02aaf26c74f3bfcc9b82678a39"
integrity sha512-E/dgBM9q3judXnTfZQ5ILvDpeSdDpabBLsXtYXa3Nyc26cfNplfLJ2nXm9FgtTdhM1nZ7yx4+zDPiXawBRZl2g==
dependencies:
"@walletconnect/heartbeat" "1.2.2"
"@walletconnect/jsonrpc-provider" "1.0.14"
Expand All @@ -3709,8 +3709,8 @@
"@walletconnect/relay-auth" "1.0.4"
"@walletconnect/safe-json" "1.0.2"
"@walletconnect/time" "1.0.2"
"@walletconnect/types" "2.13.3"
"@walletconnect/utils" "2.13.3"
"@walletconnect/types" "2.14.0"
"@walletconnect/utils" "2.14.0"
events "3.3.0"
isomorphic-unfetch "3.1.0"
lodash.isequal "4.5.0"
Expand Down Expand Up @@ -3911,19 +3911,19 @@
dependencies:
tslib "1.14.1"

"@walletconnect/sign-client@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.13.3.tgz#9f8c826000bf3d6ea782f7325bc87e9f260e71ce"
integrity sha512-3Pcq6trHWdBZn5X0VUFQ3zJaaqyEbMW9WNVKcZ2SakIpQAwySd08Mztvq48G98jfucdgP3tjGPbBvzHX9vJX7w==
"@walletconnect/sign-client@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.14.0.tgz#36533ef0976a869d815624217527482c90937fc8"
integrity sha512-UrB3S3eLjPYfBLCN3WJ5u7+WcZ8kFMe/QIDqLf76Jk6TaLwkSUy563LvnSw4KW/kA+/cY1KBSdUDfX1tzYJJXg==
dependencies:
"@walletconnect/core" "2.13.3"
"@walletconnect/core" "2.14.0"
"@walletconnect/events" "1.0.1"
"@walletconnect/heartbeat" "1.2.2"
"@walletconnect/jsonrpc-utils" "1.0.8"
"@walletconnect/logger" "2.1.2"
"@walletconnect/time" "1.0.2"
"@walletconnect/types" "2.13.3"
"@walletconnect/utils" "2.13.3"
"@walletconnect/types" "2.14.0"
"@walletconnect/utils" "2.14.0"
events "3.3.0"

"@walletconnect/sign-client@~2.8.1":
Expand All @@ -3948,10 +3948,10 @@
dependencies:
tslib "1.14.1"

"@walletconnect/types@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.13.3.tgz#0280b5c64df9a2e07752c4121eeb81dc4a59b2c2"
integrity sha512-9UdtLoQqwGFfepCPprUAXeUbKg9zyDarPRmEJVco51OWXHCOpvRgroWk54fQHDhCUIfDELjObY6XNAzNrmNYUA==
"@walletconnect/types@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.14.0.tgz#af3d4799b8ac5d166251af12bc024276f82f9b91"
integrity sha512-vevMi4jZLJ55vLuFOicQFmBBbLyb+S0sZS4IsaBdZkQflfGIq34HkN13c/KPl4Ye0aoR4/cUcUSitmGIzEQM5g==
dependencies:
"@walletconnect/events" "1.0.1"
"@walletconnect/heartbeat" "1.2.2"
Expand All @@ -3972,10 +3972,10 @@
"@walletconnect/logger" "^2.0.1"
events "^3.3.0"

"@walletconnect/utils@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.13.3.tgz#500d88342c193ce92ab9d2fae3bd343be71821b2"
integrity sha512-hjyyNhnhTCezGNr6OCfKRzqRsiak+p+YP57iRo1Tsf222fsj/9JD++MP97YiDwc4e4xXaZp/boiLB+8hJHsCog==
"@walletconnect/utils@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.14.0.tgz#48493ffe1e902815fda3cbd5cc5409288a066d35"
integrity sha512-vRVomYQEtEAyCK2c5bzzEvtgxaGGITF8mWuIL+WYSAMyEJLY97mirP2urDucNwcUczwxUgI+no9RiNFbUHreQQ==
dependencies:
"@stablelib/chacha20poly1305" "1.0.1"
"@stablelib/hkdf" "1.0.1"
Expand All @@ -3985,7 +3985,7 @@
"@walletconnect/relay-api" "1.0.10"
"@walletconnect/safe-json" "1.0.2"
"@walletconnect/time" "1.0.2"
"@walletconnect/types" "2.13.3"
"@walletconnect/types" "2.14.0"
"@walletconnect/window-getters" "1.0.1"
"@walletconnect/window-metadata" "1.0.1"
detect-browser "5.3.0"
Expand Down
4 changes: 4 additions & 0 deletions advanced/wallets/react-wallet-v2/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ NEXT_PUBLIC_PROJECT_ID=
NEXT_PUBLIC_RELAY_URL=wss://relay.walletconnect.com
NEXT_PUBLIC_PIMLICO_KEY=
NEXT_PUBLIC_ZERODEV_PROJECT_ID=
#if using local AA infra then set these values
NEXT_PUBLIC_LOCAL_BUNDLER_URL=
NEXT_PUBLIC_LOCAL_PAYMASTER_URL=
NEXT_PUBLIC_LOCAL_CLIENT_URL=
4 changes: 2 additions & 2 deletions advanced/wallets/react-wallet-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@taquito/signer": "^15.1.0",
"@taquito/taquito": "^15.1.0",
"@types/semver": "^7.5.8",
"@walletconnect/web3wallet": "1.12.3",
"@walletconnect/web3wallet": "1.13.0",
"@zerodev/ecdsa-validator": "5.3.0",
"@zerodev/presets": "5.3.0",
"@zerodev/sdk": "5.3.1",
Expand All @@ -47,7 +47,7 @@
"graphql": "^16.8.2",
"near-api-js": "^0.45.0",
"next": "12.1.5",
"permissionless": "0.1.31",
"permissionless": "0.1.39",
"react": "17.0.2",
"react-code-blocks": "0.1.5",
"react-dom": "17.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import {
Address,
bytesToHex,
concat,
concatHex,
createPublicClient,
getAddress,
getTypesForEIP712Domain,
hashTypedData,
Hex,
hexToBytes,
http,
keccak256,
PrivateKeyAccount,
Expand All @@ -32,7 +29,6 @@ import {
createZeroDevPaymasterClient,
KernelAccountClient
} from '@zerodev/sdk'
import { sepolia } from 'viem/chains'
import { serializeSessionKeyAccount, signerToSessionKeyValidator } from '@zerodev/session-key'
import { getUpdateConfigCall } from '@zerodev/weighted-ecdsa-validator'
import {
Expand All @@ -48,7 +44,6 @@ import {
PERMISSION_VALIDATOR_ADDRESS,
SECP256K1_SIGNATURE_VALIDATOR_ADDRESS
} from '@/utils/permissionValidatorUtils/constants'
import { executeAbi } from '@/utils/safe7579AccountUtils/abis/Account'
import {
getPermissionScopeData,
PermissionContext,
Expand All @@ -58,6 +53,7 @@ import { KERNEL_V2_4, KERNEL_V3_1 } from '@zerodev/sdk/constants'
import { KERNEL_V2_VERSION_TYPE, KERNEL_V3_VERSION_TYPE } from '@zerodev/sdk/types'
import { decodeDIDToSecp256k1PublicKey } from '@/utils/HelperUtil'
import { KeySigner } from 'viem/_types/experimental/erc7715/types/signer'
import { AccountExecuteAbi } from '@/utils/ERC7579AccountUtils'

type DonutPurchasePermissionData = {
target: string
Expand Down Expand Up @@ -133,13 +129,13 @@ export class KernelSmartAccountLib implements EIP155Wallet {
})
const client = createKernelAccountClient({
account,
chain: sepolia,
chain: this.chain,
entryPoint: this.entryPoint,
bundlerTransport: bundlerRpc,
middleware: {
sponsorUserOperation: async ({ userOperation }) => {
const zerodevPaymaster = createZeroDevPaymasterClient({
chain: sepolia,
chain: this.chain,
entryPoint: this.entryPoint,
// Get this RPC from ZeroDev dashboard
transport: http(`https://rpc.zerodev.app/api/v2/paymaster/${projectId}`)
Expand Down Expand Up @@ -434,7 +430,7 @@ export class KernelSmartAccountLib implements EIP155Wallet {
const validatorInitData = '0x'
const hookAddress = zeroAddress
const hookData = '0x'
const selectorData = toFunctionSelector(executeAbi[0])
const selectorData = toFunctionSelector(AccountExecuteAbi[0])

const validatorPluginEnableTypeData = {
domain: {
Expand Down
Loading

0 comments on commit cfd10d7

Please sign in to comment.