Skip to content

feat: add read contract check on session signer#119

Merged
Ang-dot merged 3 commits intomainfrom
feat/yang-check-acp-agent-env-correctness
Dec 2, 2025
Merged

feat: add read contract check on session signer#119
Ang-dot merged 3 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

  • 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 a review from Zuhwa December 2, 2025 04:16
@Ang-dot Ang-dot force-pushed the feat/yang-check-acp-agent-env-correctness branch 5 times, most recently from 7739c39 to 7def754 Compare December 2, 2025 09:03
@Ang-dot Ang-dot force-pushed the feat/yang-check-acp-agent-env-correctness branch from 7def754 to 0ee4a03 Compare December 2, 2025 09:10
@Ang-dot Ang-dot force-pushed the feat/yang-check-acp-agent-env-correctness branch from 0ee4a03 to 2493438 Compare December 2, 2025 09:11
@Ang-dot Ang-dot merged commit 288d03e into main Dec 2, 2025
@Ang-dot Ang-dot deleted the feat/yang-check-acp-agent-env-correctness branch December 2, 2025 15:25
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.

2 participants