Skip to content

The 8004 script update-profile.sh uses incorrect function selector for setAgentURI #115

@squirt11e

Description

@squirt11e

The erc-8004/scripts/update-profile.sh script has an incorrect function selector for setAgentURI(uint256,string).

Current (wrong): 0x862440e2
Correct: 0x0af28bd3

This causes all setAgentURI calls to revert onchain with no informative error message, since the selector doesn't match any function on the Identity Registry contract.

Error with wrong selector (0x862440e2) and success with correct selector (0x0af28bd3) transaction landed onchain. However even with a successful update the returned response from bankr was I don't have enough verified information to answer that question accurately. Please try asking again or provide more specific details

The correct selector can be verified with viem:

  const { toFunctionSelector } = require('viem');
  toFunctionSelector('function setAgentURI(uint256 agentId, string newURI)');
  // '0x0af28bd3'

Fix: In erc-8004/scripts/update-profile.sh, line 35:

  # Function selector: 0x0af28bd3 (setAgentURI(uint256,string))

  const selector = '0x0af28bd3';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions