# Global Data

**URL:** <https://forum.canton.network/t/global-data/791>\
**Category:** App Development\
**Tags:** daml\
**Created:** [July 4, 2020, 10:56am UTC](https://forum.canton.network/t/global-data/791 "2020-07-04T10:56:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean\_Safar](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/jean_safar/32/186_2.png) [@Jean\_Safar](https://forum.canton.network/u/Jean_Safar)\
**Post date:** [July 4, 2020, 10:56am UTC](https://forum.canton.network/t/global-data/791/1 "2020-07-04T10:56:22Z")

</div>

I am trying to overcome the necessity to hardcode in DAML.

I have some global data that all contracts need to have access to and that I have to make evolve over time. Think of some global config data.

This can be hardcoded in into summation types (enums) but it is very restrictive and instead of having an enum, I would need to have a list of strings for example that can be accessed by all contracts and can be changed over time.

Is this possible?

---

<div class="post-metadata">

**Author:** ![Leonid\_Rozenberg](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/leonid_rozenberg/32/48_2.png) [@Leonid\_Rozenberg](https://forum.canton.network/u/Leonid_Rozenberg)\
**Post date:** [July 5, 2020, 2:19pm UTC](https://forum.canton.network/t/global-data/791/2 "2020-07-05T14:19:30Z")

</div>

@Jean_Safar Remember that access to contracts depends on the `Party` that is performing the lookup, not other contracts. You could “hardcode” the name of a global party, and then have that global `Party` serve the data to other users. That global party would be responsible for updating that data and also accepting (ex. via triggers) requests to access that data. Ideally, you would manage access to that global contract via a simple key so that the observers could look up that data.

```haskell
template GlobalData
  with
    global : Party
    config_data : Text -- TODO
    observers : [Party]
  where
    signatory global
    observer observers
    key global : Party
    maintainer key

    controller global can
      AddObserver : ContractId GlobalData
        with
          who : Party
        do
          create this with observers = who :: observers
```

---

<div class="post-metadata">

**Author:** ![Jean\_Safar](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/jean_safar/32/186_2.png) [@Jean\_Safar](https://forum.canton.network/u/Jean_Safar)\
**Post date:** [July 10, 2020, 9:01am UTC](https://forum.canton.network/t/global-data/791/3 "2020-07-10T09:01:12Z")

</div>

Thanks @Leonid_Rozenberg, that’s indeed how I have it modeled, remembering indeed at all time that access control depends on the party,… 😇
