Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.
This repository was archived by the owner on Nov 27, 2018. It is now read-only.

Recomendation! #3

@idimon4uk

Description

@idimon4uk

https://github.com/robertsimoes/Solidity-Contract-Patterns/blob/master/IndexedStructMap/IndexedStructMap.sol
If I was u, I would develop update and add as one function, for example using

mapping(uint => address)

and have uint size; and write 2 maps and size in 1 struct;
something like this:

struct eDataStruct {
mapping(address => Entity) entityStructs;
mapping(uint=>address) entityList;
uint size;
}
struct Entity { 
    uint eData; 
    bool exists; 
  } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions