trufflesuite / drizzle

Reactive Ethereum dapp UI suite
905 stars 235 forks source link

Possible name collisions in contract state #39

Open balasan opened 6 years ago

balasan commented 6 years ago

If a contract contains any of the following public variables it would create a naming collision in the drizzle store: initialized, 'synced', 'events'

I propose keeping the contract state in inside a separate state object:

contracts: {
    contractName: {
      initialized,
      synced,
      events,
      state: {
        callerFunctionName: {
          argsHash: {
            args,
            value
          }
        }
      },
      methods: {}
    }
  },
julien51 commented 6 years ago

Another approach would to be to let allow generateStore to be invoked with other arguments such as some app reducers, initialState and middlewares.

julien51 commented 6 years ago

I did this in my own branch:

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if there is no reply to further comments.

cds-amal commented 4 years ago

For 2.0 consideration