Git Product home page Git Product logo

scrypto_statictypes's People

Contributors

devmannic avatar iamyulong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

charliecooper45

scrypto_statictypes's Issues

runtime check ideas for alternate lifetime of the resource binding

Currently the resources are bound in a 'static HashMap. This works fine for simple use cases and in many settings as it matches the lifetime of a transaction.

But, for a component that could have methods called on multiple instances in the same transaction, a single mapping for the entire transaction may not be accurate. Instead there needs to be a mapping per component. We don't want to store this mapping on-ledger in generally, though maybe we could (optionally).

  • Need to see if the Radix Engine spins up a separate process per function/method call or not. If separate, everything is fine with the current implementation. If not, we need options:
  1. One option is a map of maps, the first level indexed on the component address, and the second level matching what currently exists. However, getting the current component without it being passed directly could be tricky.
    • Might require patching the dispatcher to store the current component or reference to the current map.
    • Or maybe Decode on the component could be overridden
    • or hooked via a custom type stored in the component. This would take up some space (unless we could do some matching with PhantomData) but could be minimal. -- this method is closest to just storing the entire mapping on-ledger so maybe this provides a consistent interface with levels of complexity/difficulty that can be adjusted later

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.