Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

is getSubState supposed to work ? #107

@SvenMeyer

Description

@SvenMeyer

deployed_contract.getState()gives me a full list of contract states :

{ _balance: '0',
  price: '0',
  ipfsInventory: [ { key: 'Qm001', val: [Object] } ],
  registered_items:
   [ { key: '0x7bb3b0e8a59f3f61d9bff038f4aeb42cae2ecce8',
       val: [Array] } ] }

but all calls to getSubStatereturn undefined :

const state_inv = await contract.getSubState('ipfsInventory');
const state_reg = await contract.getSubState('registered_items', ['0x'+ACCOUNT_0_ADDRESS]);

console.log(`\nGetting a particular entry in a map`);
const state3 = await proof_ipfs.getSubState('ipfsInventory', ['Qm001']);

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