rchain / rchain-api

Obsoleted in favor of https://github.com/rchain-community/rchain-api. Use at your own risk.
Other
8 stars 4 forks source link

URIs not expressible in rhocore #19

Closed JoshOrndorff closed 5 years ago

JoshOrndorff commented 5 years ago

Some relevant context is in #17 An example of the problem this creates is

const rholangCode = rho`
new lookup(\`rho:registry:lookup\`), registerCh in {
  lookup!(\`URI\`, *registerCh)|

  for (registerForStatus <- registerCh){
    registerForStatus!(${req.params.name}, ${req.query.sig}, ${req.query.pubKey}, "bogusReturn")
  }
}
`.replace("URI", uri) //TODO Do this better

This is really more of a problem with the design of rhocore. I guess our options are.

  1. Figure out a way to express uris in RHOCore and implement it
  2. Figure out a work around so the hack is in the API rather than each dApp
  3. Do nothing and let dApps write code like the example above.