CityOfZion / props

Ecosystem props than can be used to enhance project functionality
5 stars 3 forks source link

Introduce 'code' field to generator instance whitelists for contracts #24

Closed lllwvlvwlll closed 2 years ago

lllwvlvwlll commented 2 years ago

In its currently implementation, the generator instance uses a simple array of addresses to whitelist users. This has a number of limitations:

There are two solutions:

  1. Introduce an optional code field when whitelisting. This would allow users to populate the field with an id which is checked on invocation. This field would most likely be controlled by the smart contract so it would mitigate this issue.
  2. Limit the scope of this release. This would mean that only COZ would have the ability to mint puppets. It would also limit the ability to create instanced scenarios on all other smart contracts which want to securely use the generator instances. We could push a new version in the future which implements this functionality, but it would be a breaking change.