-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Labels
bugSomething isn't workingSomething isn't working
Description
[REQUIRED] Environment
- Browser version: N/A
- AA SDK version: v4.58.0
- Package:
@account-kit/smart-contracts
[REQUIRED] Describe the problem
The isAccountDeployed
function here just checks for the existence of any bytecode on an address to confirm that Modular Account V2 has been deployed. Instead, it should compare the result of getCode
to the known bytecode of a Modular Account V2. Otherwise, if an address has been delegated to any contract, this will return true
.
How to reproduce:
I am not using the SDK directly, but calling the API, which I assume is using this SDK code because the error I receive is consistent with the SDK's logic.
- Delegate your EOA to any contract besides a Modular Account V2
- Follow the EIP-7702 Wallet API Quickstart
- Call
wallet_prepareCalls
Expected:
- Accounts not already delegated to Modular Account V2 receive an authorization to sign
Actual:
- Error code -32000 received
Example request
https://api.g.alchemy.com/v2/<apiKey>
{
"jsonrpc": "2.0",
"method": "wallet_prepareCalls",
"params": [
{
"calls": [
{
"to": "0x036cbd53842c5426634e7929541ec2318f3dcf7e",
"data": "0x"
}
],
"from": "0x4233422fdaEEF2B4BdCA2080bCBBf39470039406",
"chainId": "0x14a34",
"capabilities": {
"eip7702Auth": true
}
}
],
"id": 1
}
Example response
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "The contract function \"getValidationData\" reverted."
}
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working