Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility for new getData([]) with backward comp. of getData() #44

Closed
Hugoo opened this issue Oct 13, 2021 · 1 comment · Fixed by #48
Closed

Add compatibility for new getData([]) with backward comp. of getData() #44

Hugoo opened this issue Oct 13, 2021 · 1 comment · Fixed by #48
Assignees

Comments

@Hugoo
Copy link
Contributor

Hugoo commented Oct 13, 2021

Latest version of the standard uses a new signature for getData([]), the lib should work with this new signature and be backward compatible with contracts using the previous signature of getData()

  • Old ERC725Y interfaceId: 0x2bd57b73
{
      "stateMutability": "view",
      "type": "function",
        "outputs": [
          {
            "type": "bytes",
            "name": "_value",
            "internalType": "bytes"
          },
        ],
        "name": "getData",
        "inputs": [
          {
            "type": "bytes32",
            "name": "_key",
            "internalType": "bytes32"
          },
        ]
 }
  • New ERC725Y interfaceId: 0x5a988c0f
{
      "stateMutability": "view",
      "type": "function",
      "inputs": [
        {
          "internalType": "bytes32[]",
          "name": "_keys",
          "type": "bytes32[]"
        }
      ],
      "name": "getData",
      "outputs": [
        {
          "internalType": "bytes[]",
          "name": "values",
          "type": "bytes[]"
        }
      ]
 }

the way to detect them is to use upcontract.methods.supportsInterface('0x37e619de').call() > true

@Hugoo Hugoo self-assigned this Oct 13, 2021
@frozeman
Copy link
Contributor

important for the erc725cache and UP website.

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 a pull request may close this issue.

2 participants