Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

2d array with web3 validator #6798

Closed
ernieyang09 opened this issue Feb 8, 2024 · 5 comments · Fixed by #6836
Closed

2d array with web3 validator #6798

ernieyang09 opened this issue Feb 8, 2024 · 5 comments · Fixed by #6836
Assignees
Labels
4.x 4.0 related Bug Addressing a bug

Comments

@ernieyang09
Copy link

ernieyang09 commented Feb 8, 2024

For below scenario, it will fail in web3 validator

    inputs: [
      { internalType: "address[]", name: "addr1", type: "address[]" },
      { internalType: "address[][]", name: "addr2", type: "address[][]" },
    ],
const addr1 = ['0xaddr']
const addr2 [['0xaddr','0xaddr','0xaddr'],['0xaddr'], ['0xaddr','0xaddr'], ...]
contract.methods.xxMethod(addr1, addr2).estimateGas()

check the jsonSchema

{"type":"array","items":[{"type":"array","$id":"addr1","items":{"format":"address","required":true}},{"type":"array","items":[{"type":"array","$id":"addr2","items":{"for
mat":"address","required":true}}]}],"maxItems":2,"minItems":2}

Also the encodeABI method gave wrong output.

Test in web3.js v1.10.2. Works as expected.

Logs

code: 1100,
      errors: [
        {
          keyword: 'maxItems',
          instancePath: '/1',
          schemaPath: '#1/maxItems',
          params: { limit: 1 },
          message: 'must NOT have more than 1 items'
        }
      ]

Environment

web3.js 4.4.0

@SantiagoDevRel SantiagoDevRel added 1.x 1.0 related issues 4.x 4.0 related labels Feb 8, 2024
@SantiagoDevRel
Copy link

Hi @ernieyang09 thanks for submitting the issue, the devs will take a look at it as soon as possible!👍

@mconnelly8 mconnelly8 added Bug Addressing a bug and removed 1.x 1.0 related issues labels Feb 20, 2024
@RaghavenderSingh
Copy link

Hi @ernieyang09

Hey, I'm interested in working on this one

@SantiagoDevRel
Copy link

Great! Feel free to submit a PR and mention this issue on it #6798
Pls tag me so I can ping the team to look into it once it's done @RaghavenderSingh

@EtlesL
Copy link
Contributor

EtlesL commented Feb 27, 2024

Hi @SantiagoDevRel @RaghavenderSingh , I encountered the same issue in my work. Since the project is quite urgent, I took the initiative to debug and identify the problem myself. I have already submitted a PR for it. Here is the link: #6836

@jdevcs
Copy link
Contributor

jdevcs commented Feb 27, 2024

@EtlesL Thanks

eduv09 added a commit to eduv09/blockchain-integration-framework that referenced this issue Nov 1, 2024
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge, and end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
eduv09 added a commit to eduv09/blockchain-integration-framework that referenced this issue Nov 1, 2024
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
eduv09 added a commit to eduv09/blockchain-integration-framework that referenced this issue Nov 1, 2024
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
RafaelAPB pushed a commit to hyperledger-cacti/cacti that referenced this issue Nov 1, 2024
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
RafaelAPB pushed a commit to hyperledger-cacti/cacti that referenced this issue Nov 9, 2024
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
RafaelAPB pushed a commit to hyperledger-cacti/cacti that referenced this issue Nov 13, 2024
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Nov 15, 2024
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Dec 16, 2024
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
RafaelAPB pushed a commit to hyperledger-cacti/cacti that referenced this issue Jan 31, 2025
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
RafaelAPB pushed a commit to hyperledger-cacti/cacti that referenced this issue Jan 31, 2025
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jan 31, 2025
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
RafaelAPB pushed a commit to hyperledger-cacti/cacti that referenced this issue Feb 12, 2025
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
RafaelAPB pushed a commit to hyperledger-cacti/cacti that referenced this issue Feb 21, 2025
* added logic for satp-bridge supporting the ethereum connector
* finished the integration with bungee
* changed common stringify for safeStableStringify across the package
* added test for the new bridge & end-to-end tests for the new features
* fabric-connector: fix bug handling empty read-write sets
* bungee: strategy fabric fix bug handling empty read-write sets
* bungee: hole package introduce safeStableStringify
* ethereum-connector: bump web3 packages versions to
    fix (web3/web3.js#6798)

Signed-off-by: Eduardo Vasques <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.x 4.0 related Bug Addressing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants