Skip to content

feat: add read contract check on session signer#132

Merged
celesteanglm merged 6 commits intomainfrom
feat/yang-check-acp-agent-env-correctness
Dec 3, 2025
Merged

feat: add read contract check on session signer#132
celesteanglm merged 6 commits intomainfrom
feat/yang-check-acp-agent-env-correctness

Conversation

@Ang-dot
Copy link
Copy Markdown
Contributor

@Ang-dot Ang-dot commented Dec 2, 2025

portover from Virtual-Protocol/acp-node#119

  • Happy Path:
    Connected to ACP: {
      agentWalletAddress: '0x2239461D0e0BE221397221b44fe0422Fcf480ddc',
      whitelistedWalletAddress: '0x2C976d905526523758C5C86166a1f9c3f3073E86',
      entityId: 1
    }
    Joined ACP Room
    
  • Valid entity id but wrong whitelisted pk:
          throw new AcpError(
                ^
    AcpError: ACP Contract Client validation failed:
    {
      "agentWalletAddress": "0x2239461D0e0BE221397221b44fe0422Fcf480ddc",
      "entityId": 2,
      "givenSessionSignerAddress": "0x2C976d905526523758C5C86166a1f9c3f3073E86",
      "expectedSignerAddress": "0x0Ce7D2950178C6F1c500e6836AC11DF4a2eC4071"
    }
        at AcpContractClientV2.<anonymous> (/Users/yang/Desktop/acp-node/src/contractClients/acpContractClientV2.ts:164:13)
        at Generator.next (<anonymous>)
        at fulfilled (/Users/yang/Desktop/acp-node/src/contractClients/acpContractClientV2.ts:5:58)
        at processTicksAndRejections (node:internal/process/task_queues:105:5)
    
  • Invalid entity id:
          throw new AcpError(
                ^
    AcpError: ACP Contract Client validation failed:
    {
      "reason": "no whitelisted wallet registered on-chain for entity id",
      "entityId": 9,
      "agentWalletAddress": "0x2239461D0e0BE221397221b44fe0422Fcf480ddc"
    }
        at AcpContractClientV2.<anonymous> (/Users/yang/Desktop/acp-node/src/contractClients/acpContractClientV2.ts:150:13)
        at Generator.next (<anonymous>)
        at fulfilled (/Users/yang/Desktop/acp-node/src/contractClients/acpContractClientV2.ts:5:58)
        at processTicksAndRejections (node:internal/process/task_queues:105:5)
    
  • Invalid agent wallet address:
          throw new AcpError(
                ^
    AcpError: ACP Contract Client validation failed: agent account 0x2239461D0e0BE221397221b44fe0422Fcf480dda is not deployed on-chain
        at AcpContractClientV2.<anonymous> (/Users/yang/Desktop/acp-node/src/contractClients/acpContractClientV2.ts:124:13)
        at Generator.next (<anonymous>)
        at fulfilled (/Users/yang/Desktop/acp-node/src/contractClients/acpContractClientV2.ts:5:58)
        at processTicksAndRejections (node:internal/process/task_queues:105:5)
    

@Ang-dot Ang-dot requested review from Zuhwa and celesteanglm December 2, 2025 09:06
@Ang-dot Ang-dot force-pushed the feat/yang-check-acp-agent-env-correctness branch from d085520 to e089563 Compare December 2, 2025 09:12
Comment thread virtuals_acp/constants.py Outdated
@Ang-dot Ang-dot requested a review from celesteanglm December 3, 2025 08:08
Comment thread virtuals_acp/contract_clients/base_contract_client.py Outdated
Comment thread virtuals_acp/contract_clients/base_contract_client.py
@Ang-dot Ang-dot requested a review from celesteanglm December 3, 2025 08:27
@celesteanglm celesteanglm merged commit 648f484 into main Dec 3, 2025
@celesteanglm celesteanglm deleted the feat/yang-check-acp-agent-env-correctness branch December 3, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants